C# Class TraktPlugin.TraktCache

The TraktCache is used to store anything online that me need often e.g. collected, seen, ratings for movies, shows and episodes during plugin syncing
Show file Open project: trakt/Trakt-for-Mediaportal

Private Properties

Property Type Description
AddCommentToLikes void
AddEpisodeToCollection void
AddEpisodeToPausedData void
AddEpisodeToRatings void
AddEpisodeToWatchHistory void
AddEpisodeToWatchlist void
AddEpisodesToCollection void
AddEpisodesToRatings void
AddEpisodesToWatchHistory void
AddListToLikes void
AddMovieToCollection void
AddMovieToPausedData void
AddMovieToRatings void
AddMovieToWatchHistory void
AddMovieToWatchlist void
AddMoviesToCollection void
AddMoviesToRatings void
AddMoviesToWatchHistory void
AddSeasonToRatings void
AddSeasonToWatchlist void
AddShowToCollection void
AddShowToRatings void
AddShowToWatchedHistory void
AddShowToWatchlist void
AddShowsToRatings void
ClearCustomListCache void
ClearLastActivityCache void
ClearLastMoviesActivityCache void
ClearLastShowsActivityCache void
ClearRecommendationsCache void
ClearSyncCache void
GetCustomLists List>.Dictionary
GetCustomListsFromTrakt IEnumerable
LoadFileCache string
RemoveCommentFromLikes void
RemoveEpisodeFromCollection void
RemoveEpisodeFromPausedData void
RemoveEpisodeFromRatings void
RemoveEpisodeFromWatchHistory void
RemoveEpisodeFromWatchlist void
RemoveEpisodeFromWatchlist void
RemoveEpisodesFromCollection void
RemoveEpisodesFromWatchHistory void
RemoveListFromLikes void
RemoveMovieFromCollection void
RemoveMovieFromPausedData void
RemoveMovieFromRatings void
RemoveMovieFromWatchHistory void
RemoveMovieFromWatchlist void
RemoveMoviesFromCollection void
RemoveMoviesFromRatings void
RemoveMoviesFromWatchHistory void
RemoveSeasonFromRatings void
RemoveSeasonFromWatchlist void
RemoveShowFromCollection void
RemoveShowFromRatings void
RemoveShowFromWatchedHistory void
RemoveShowFromWatchlist void
RemoveShowsFromRatings void
Save void
SaveFileCache void

Public Methods

Method Description
Collected ( this show ) : int
Collected ( this season, TraktShowSummary show ) : int
GetCollectedEpisodesFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable

Get the users collected episodes from Trakt

GetCollectedMoviesFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable

Get the users collected movies from Trakt

GetCommentedEpisodesFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable

Get the users commented episodes from Trakt

GetCommentedListsFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable

Get the users commented lists from Trakt

GetCommentedMoviesFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable

Get the users commented movies from Trakt

GetCommentedSeasonsFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable

Get the users commented seasons from Trakt

GetCommentedShowsFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable

Get the users commented shows from Trakt

GetLikedCommentsFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable
GetLikedListsFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable
GetPausedEpisodes ( string &lastEpisodeProcessedAt, bool ignoreLastSyncTime = false ) : IEnumerable
GetPausedMovies ( string &lastMovieProcessedAt, bool ignoreLastSyncTime = false ) : IEnumerable
GetRatedEpisodesFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable

Get the users rated episodes from Trakt

GetRatedMoviesFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable

Get the users rated movies from Trakt

GetRatedSeasonsFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable

Get the users rated seasons from Trakt

GetRatedShowsFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable

Get the users rated shows from Trakt

GetRecommendedMoviesFromTrakt ( ) : IEnumerable
GetUnWatchedEpisodesFromTrakt ( ) : IEnumerable

Get the users unwatched episodes since last sync This is something that has been previously watched but now has been removed from the users watched history either by toggling the watched state on a client or from online

GetUnWatchedMoviesFromTrakt ( ) : IEnumerable

Get the users unwatched movies since last sync This is something that has been previously watched but now has been removed from the users watched history either by toggling the watched state on a client or from online

GetWatchedEpisodesFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable

Get the users watched episodes from Trakt

GetWatchedMoviesFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable

Get the users watched movies from Trakt

GetWatchlistedEpisodesFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable

Get the users watchlisted episodes from Trakt

GetWatchlistedMoviesFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable
GetWatchlistedSeasonsFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable

Get the users watchlisted seasons from Trakt

GetWatchlistedShowsFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable

Get the users watchlisted shows from Trakt

IsCollected ( this movie ) : bool
IsCollected ( this episode, TraktShow show ) : bool
IsCollected ( this season, TraktShowSummary show ) : bool
IsLiked ( this list ) : bool
IsWatched ( this movie ) : bool
IsWatched ( this episode, TraktShow show ) : bool
IsWatched ( this season, TraktShowSummary show ) : bool
IsWatchlisted ( this movie ) : bool
IsWatchlisted ( this episode, TraktShow show ) : bool
IsWatchlisted ( this season, TraktShowSummary show ) : bool
Plays ( this movie ) : int
Plays ( this episode, TraktShow show ) : int
Plays ( this season, TraktShowSummary show ) : int
RefreshData ( ) : bool

Refreshes local cache from online data This should be called before doing a sync

StatsEpisodesHated ( ) : int
StatsEpisodesLoved ( ) : int
StatsMoviesHated ( ) : int
StatsMoviesLoved ( ) : int
StatsShowsHated ( ) : int
StatsShowsLoved ( ) : int
UserRating ( this movie ) : int?
UserRating ( this episode, TraktShow show ) : int?
UserRating ( this season, TraktShowSummary show ) : int?

Private Methods

Method Description
AddCommentToLikes ( TraktComment comment ) : void
AddEpisodeToCollection ( TraktShow show, TraktEpisode episode ) : void
AddEpisodeToPausedData ( TraktShow show, TraktEpisode episode, float progress ) : void
AddEpisodeToRatings ( TraktShow show, TraktEpisode episode, int rating ) : void
AddEpisodeToWatchHistory ( TraktShow show, TraktEpisode episode ) : void
AddEpisodeToWatchlist ( TraktShowSummary show, TraktEpisodeSummary episode ) : void
AddEpisodesToCollection ( TraktSyncShowCollectedEx show ) : void
AddEpisodesToRatings ( TraktPlugin.TraktAPI.DataStructures.TraktSyncShowRatedEx show ) : void
AddEpisodesToWatchHistory ( TraktSyncShowWatchedEx show ) : void
AddListToLikes ( TraktListDetail list ) : void
AddMovieToCollection ( TraktMovie movie ) : void
AddMovieToPausedData ( TraktMovie movie, float progress ) : void
AddMovieToRatings ( TraktMovie movie, int rating ) : void
AddMovieToWatchHistory ( TraktMovie movie ) : void
AddMovieToWatchlist ( TraktMovie movie ) : void
AddMoviesToCollection ( List movies ) : void
AddMoviesToRatings ( List movies ) : void
AddMoviesToWatchHistory ( List movies ) : void
AddSeasonToRatings ( TraktShow show, TraktSeason season, int rating ) : void
AddSeasonToWatchlist ( TraktShow show, TraktSeason season ) : void
AddShowToCollection ( TraktShow show, List episodes ) : void
AddShowToRatings ( TraktShow show, int rating ) : void
AddShowToWatchedHistory ( TraktShow show, List episodes ) : void
AddShowToWatchlist ( TraktShow show ) : void
AddShowsToRatings ( List shows ) : void
ClearCustomListCache ( string listName = null ) : void
ClearLastActivityCache ( bool force = false ) : void
ClearLastMoviesActivityCache ( ) : void
ClearLastShowsActivityCache ( ) : void
ClearRecommendationsCache ( ) : void
ClearSyncCache ( ) : void
GetCustomLists ( bool ignoreLastSyncTime = false ) : List>.Dictionary

Returns the users custom lists with list item details

GetCustomListsFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable
LoadFileCache ( string file, string defaultValue ) : string
RemoveCommentFromLikes ( TraktComment comment ) : void
RemoveEpisodeFromCollection ( TraktShow show, TraktEpisode episode ) : void
RemoveEpisodeFromPausedData ( TraktShow show, TraktEpisode episode ) : void
RemoveEpisodeFromRatings ( TraktEpisode episode ) : void
RemoveEpisodeFromWatchHistory ( TraktShow show, TraktEpisode episode ) : void
RemoveEpisodeFromWatchlist ( TraktEpisode episode ) : void
RemoveEpisodeFromWatchlist ( TraktShow show, TraktEpisode episode ) : void
RemoveEpisodesFromCollection ( TraktSyncShowEx show ) : void
RemoveEpisodesFromWatchHistory ( TraktSyncShowEx show ) : void
RemoveListFromLikes ( TraktListDetail list ) : void
RemoveMovieFromCollection ( TraktMovie movie ) : void
RemoveMovieFromPausedData ( TraktMovie movie ) : void
RemoveMovieFromRatings ( TraktMovie movie ) : void
RemoveMovieFromWatchHistory ( TraktMovie movie ) : void
RemoveMovieFromWatchlist ( TraktMovie movie ) : void
RemoveMoviesFromCollection ( List movies ) : void
RemoveMoviesFromRatings ( List movies ) : void
RemoveMoviesFromWatchHistory ( List movies ) : void
RemoveSeasonFromRatings ( TraktShow show, TraktSeason season ) : void
RemoveSeasonFromWatchlist ( TraktShow show, TraktSeason season ) : void
RemoveShowFromCollection ( TraktShow show ) : void
RemoveShowFromRatings ( TraktShow show ) : void
RemoveShowFromWatchedHistory ( TraktShow show ) : void
RemoveShowFromWatchlist ( TraktShow show ) : void
RemoveShowsFromRatings ( List shows ) : void
Save ( ) : void

Save cached data which gets updated from real-time events

SaveFileCache ( string file, string value ) : void

Method Details

Collected() public static method

public static Collected ( this show ) : int
show this
return int

Collected() public static method

public static Collected ( this season, TraktShowSummary show ) : int
season this
show TraktPlugin.TraktAPI.DataStructures.TraktShowSummary
return int

GetCollectedEpisodesFromTrakt() public static method

Get the users collected episodes from Trakt
public static GetCollectedEpisodesFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable
ignoreLastSyncTime bool
return IEnumerable

GetCollectedMoviesFromTrakt() public static method

Get the users collected movies from Trakt
public static GetCollectedMoviesFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable
ignoreLastSyncTime bool
return IEnumerable

GetCommentedEpisodesFromTrakt() public static method

Get the users commented episodes from Trakt
public static GetCommentedEpisodesFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable
ignoreLastSyncTime bool
return IEnumerable

GetCommentedListsFromTrakt() public static method

Get the users commented lists from Trakt
public static GetCommentedListsFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable
ignoreLastSyncTime bool
return IEnumerable

GetCommentedMoviesFromTrakt() public static method

Get the users commented movies from Trakt
public static GetCommentedMoviesFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable
ignoreLastSyncTime bool
return IEnumerable

GetCommentedSeasonsFromTrakt() public static method

Get the users commented seasons from Trakt
public static GetCommentedSeasonsFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable
ignoreLastSyncTime bool
return IEnumerable

GetCommentedShowsFromTrakt() public static method

Get the users commented shows from Trakt
public static GetCommentedShowsFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable
ignoreLastSyncTime bool
return IEnumerable

GetLikedCommentsFromTrakt() public static method

public static GetLikedCommentsFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable
ignoreLastSyncTime bool
return IEnumerable

GetLikedListsFromTrakt() public static method

public static GetLikedListsFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable
ignoreLastSyncTime bool
return IEnumerable

GetPausedEpisodes() public static method

public static GetPausedEpisodes ( string &lastEpisodeProcessedAt, bool ignoreLastSyncTime = false ) : IEnumerable
lastEpisodeProcessedAt string
ignoreLastSyncTime bool
return IEnumerable

GetPausedMovies() public static method

public static GetPausedMovies ( string &lastMovieProcessedAt, bool ignoreLastSyncTime = false ) : IEnumerable
lastMovieProcessedAt string
ignoreLastSyncTime bool
return IEnumerable

GetRatedEpisodesFromTrakt() public static method

Get the users rated episodes from Trakt
public static GetRatedEpisodesFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable
ignoreLastSyncTime bool
return IEnumerable

GetRatedMoviesFromTrakt() public static method

Get the users rated movies from Trakt
public static GetRatedMoviesFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable
ignoreLastSyncTime bool
return IEnumerable

GetRatedSeasonsFromTrakt() public static method

Get the users rated seasons from Trakt
public static GetRatedSeasonsFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable
ignoreLastSyncTime bool
return IEnumerable

GetRatedShowsFromTrakt() public static method

Get the users rated shows from Trakt
public static GetRatedShowsFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable
ignoreLastSyncTime bool
return IEnumerable

GetRecommendedMoviesFromTrakt() public static method

public static GetRecommendedMoviesFromTrakt ( ) : IEnumerable
return IEnumerable

GetUnWatchedEpisodesFromTrakt() public static method

Get the users unwatched episodes since last sync This is something that has been previously watched but now has been removed from the users watched history either by toggling the watched state on a client or from online
public static GetUnWatchedEpisodesFromTrakt ( ) : IEnumerable
return IEnumerable

GetUnWatchedMoviesFromTrakt() public static method

Get the users unwatched movies since last sync This is something that has been previously watched but now has been removed from the users watched history either by toggling the watched state on a client or from online
public static GetUnWatchedMoviesFromTrakt ( ) : IEnumerable
return IEnumerable

GetWatchedEpisodesFromTrakt() public static method

Get the users watched episodes from Trakt
public static GetWatchedEpisodesFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable
ignoreLastSyncTime bool
return IEnumerable

GetWatchedMoviesFromTrakt() public static method

Get the users watched movies from Trakt
public static GetWatchedMoviesFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable
ignoreLastSyncTime bool
return IEnumerable

GetWatchlistedEpisodesFromTrakt() public static method

Get the users watchlisted episodes from Trakt
public static GetWatchlistedEpisodesFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable
ignoreLastSyncTime bool
return IEnumerable

GetWatchlistedMoviesFromTrakt() public static method

public static GetWatchlistedMoviesFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable
ignoreLastSyncTime bool
return IEnumerable

GetWatchlistedSeasonsFromTrakt() public static method

Get the users watchlisted seasons from Trakt
public static GetWatchlistedSeasonsFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable
ignoreLastSyncTime bool
return IEnumerable

GetWatchlistedShowsFromTrakt() public static method

Get the users watchlisted shows from Trakt
public static GetWatchlistedShowsFromTrakt ( bool ignoreLastSyncTime = false ) : IEnumerable
ignoreLastSyncTime bool
return IEnumerable

IsCollected() public static method

public static IsCollected ( this movie ) : bool
movie this
return bool

IsCollected() public static method

public static IsCollected ( this episode, TraktShow show ) : bool
episode this
show TraktPlugin.TraktAPI.DataStructures.TraktShow
return bool

IsCollected() public static method

public static IsCollected ( this season, TraktShowSummary show ) : bool
season this
show TraktPlugin.TraktAPI.DataStructures.TraktShowSummary
return bool

IsLiked() public static method

public static IsLiked ( this list ) : bool
list this
return bool

IsWatched() public static method

public static IsWatched ( this movie ) : bool
movie this
return bool

IsWatched() public static method

public static IsWatched ( this episode, TraktShow show ) : bool
episode this
show TraktPlugin.TraktAPI.DataStructures.TraktShow
return bool

IsWatched() public static method

public static IsWatched ( this season, TraktShowSummary show ) : bool
season this
show TraktPlugin.TraktAPI.DataStructures.TraktShowSummary
return bool

IsWatchlisted() public static method

public static IsWatchlisted ( this movie ) : bool
movie this
return bool

IsWatchlisted() public static method

public static IsWatchlisted ( this episode, TraktShow show ) : bool
episode this
show TraktPlugin.TraktAPI.DataStructures.TraktShow
return bool

IsWatchlisted() public static method

public static IsWatchlisted ( this season, TraktShowSummary show ) : bool
season this
show TraktPlugin.TraktAPI.DataStructures.TraktShowSummary
return bool

Plays() public static method

public static Plays ( this movie ) : int
movie this
return int

Plays() public static method

public static Plays ( this episode, TraktShow show ) : int
episode this
show TraktPlugin.TraktAPI.DataStructures.TraktShow
return int

Plays() public static method

public static Plays ( this season, TraktShowSummary show ) : int
season this
show TraktPlugin.TraktAPI.DataStructures.TraktShowSummary
return int

RefreshData() public static method

Refreshes local cache from online data This should be called before doing a sync
public static RefreshData ( ) : bool
return bool

StatsEpisodesHated() public static method

public static StatsEpisodesHated ( ) : int
return int

StatsEpisodesLoved() public static method

public static StatsEpisodesLoved ( ) : int
return int

StatsMoviesHated() public static method

public static StatsMoviesHated ( ) : int
return int

StatsMoviesLoved() public static method

public static StatsMoviesLoved ( ) : int
return int

StatsShowsHated() public static method

public static StatsShowsHated ( ) : int
return int

StatsShowsLoved() public static method

public static StatsShowsLoved ( ) : int
return int

UserRating() public static method

public static UserRating ( this movie ) : int?
movie this
return int?

UserRating() public static method

public static UserRating ( this episode, TraktShow show ) : int?
episode this
show TraktPlugin.TraktAPI.DataStructures.TraktShow
return int?

UserRating() public static method

public static UserRating ( this season, TraktShowSummary show ) : int?
season this
show TraktPlugin.TraktAPI.DataStructures.TraktShowSummary
return int?