@@ -8,6 +8,8 @@ import type { TraktEpisodeExtended, TraktEpisodeShort } from '~/models/trakt/tra
8
8
import type { TraktFavoriteGetQuery } from '~/models/trakt/trakt-favorite.model' ;
9
9
import type { TraktHistoryGetQuery } from '~/models/trakt/trakt-history.model' ;
10
10
import type { TraktList , TraktListItemsGetQuery } from '~/models/trakt/trakt-list.model' ;
11
+ import type { TraktMovieExtended } from '~/models/trakt/trakt-movie.model' ;
12
+ import type { TraktPersonExtended } from '~/models/trakt/trakt-people.model' ;
11
13
import type { TraktSearch } from '~/models/trakt/trakt-search.model' ;
12
14
import type { TraktSeasonExtended } from '~/models/trakt/trakt-season.model' ;
13
15
import type { TraktShowExtended } from '~/models/trakt/trakt-show.model' ;
@@ -342,14 +344,26 @@ export class TraktService {
342
344
return response . json ( ) ;
343
345
}
344
346
347
+ static async movie ( id : string | number ) {
348
+ const response = await this . traktClient . movies . summary . cached ( { id, extended : 'full' } ) ;
349
+ return response . json ( ) as Promise < TraktMovieExtended > ;
350
+ }
351
+
352
+ static async person ( id : string | number ) {
353
+ const response = await this . traktClient . people . summary . cached ( { id, extended : 'full' } ) ;
354
+ return response . json ( ) as Promise < TraktPersonExtended > ;
355
+ }
356
+
345
357
static evict = {
346
- tmdb : TraktService . caches . tmdb . clear ,
347
- trakt : TraktService . caches . trakt . clear ,
348
- tvdb : TraktService . caches . tvdb . clear ,
358
+ tmdb : ( ) => TraktService . tmdbClient . clearCache ( ) ,
359
+ trakt : ( ) => TraktService . traktClient . clearCache ( ) ,
360
+ tvdb : ( ) => TraktService . tvdbClient . clearCache ( ) ,
349
361
history : TraktService . traktClient . sync . history . get . cached . evict ,
350
362
watchlist : TraktService . traktClient . sync . watchlist . get . cached . evict ,
351
363
favorites : TraktService . traktClient . sync . favorites . get . cached . evict ,
352
364
collection : TraktService . traktClient . sync . collection . get . cached . evict ,
365
+ movies : TraktService . traktClient . movies . summary . cached . evict ,
366
+ people : TraktService . traktClient . people . summary . cached . evict ,
353
367
shows : TraktService . traktClient . shows . summary . cached . evict ,
354
368
seasons : ( ) => Promise . all ( [ TraktService . traktClient . seasons . summary . cached . evict ( ) , TraktService . traktClient . seasons . season . cached . evict ( ) ] ) ,
355
369
episodes : TraktService . traktClient . episodes . summary . cached . evict ,
0 commit comments