C# Class TraktPlugin.TraktHandlers.MovingPictures

Support for MovingPictures
Inheritance: ITraktHandler
Mostrar archivo Open project: trakt/Trakt-for-Mediaportal Class Usage Examples

Public Properties

Property Type Description
player MediaPortal.Plugins.MovingPictures.MainUI.MoviePlayer
tmdbSource DBSourceInfo

Private Properties

Property Type Description
AddCustomListNode void
AddDummyBlacklistToFilter void
AddMovieCriteriaToCustomlistNode void
AddMovieCriteriaToNode void
AddMovieCriteriaToWatchlistNode void
AddMoviesCriteriaToNode void
CreateNode DBNode
CreateNodeInMenu void
CreateScrobbleData TraktPlugin.TraktAPI.DataStructures.TraktScrobbleMovie
DatabaseManager_ObjectDeleted void
DatabaseManager_ObjectInserted void
DatabaseManager_ObjectUpdatedEx void
GetAdvancedUserRating int
GetFirstWatchedDate string
GetMovieAudioChannels string
GetMovieAudioCodec string
GetMovieDuration double
GetMovieMediaType string
GetMovieResolution string
GetNodeByName DBNode
HasAdvancedRating bool
IsMovie3D bool
MovieMatch bool
RemoveCustomListNode void
RemoveMovieCriteriaFromCustomlistNode void
RemoveMovieCriteriaFromNode void
RemoveMovieCriteriaFromRecommendationsNode void
RemoveMovieCriteriaFromWatchlistNode void
RemoveNode void
RemoveTraktFromCategoryMenu void
RemoveTraktFromFiltersMenu void
SetAdvancedRating void
ShowRateDialog void
StartMovieScrobble void
StopMovieScrobble void
UpdateCategoriesMenu void
UpdateFiltersMenu void

Public Methods

Method Description
DisposeEvents ( ) : void
FindMovieID ( string title, int year, string imdbid, int &movieID ) : bool
GetMoviePersonInfo ( int movieID, SearchPeople &searchPeople ) : bool
GetTmdbID ( DBMovieInfo movie ) : string
MovingPictures ( int priority ) : System
PlayMovie ( DBMovieInfo movie ) : void
PlayMovie ( int movieID ) : void
Scrobble ( String filename ) : bool
SetUserRating ( int rating ) : void
StopScrobble ( ) : void
SyncLibrary ( ) : void
SyncProgress ( ) : void
UpdateSettingAsBool ( string setting, bool value ) : void

Private Methods

Method Description
AddCustomListNode ( string listName ) : void

Add a new node for a Custom list e.g. new list created A blacklist filter will be created until items are adding to the list

AddDummyBlacklistToFilter ( DBFilter filter ) : void

Creates a dummy blacklist list constraint as opposed to a real Blacklist. A real blacklist can add a huge amount of records to the filters table. The purpose of the blacklist in this context is to simply ensure that there is always at least one criteria added to a filter so that it doesn't show All Movies.

AddMovieCriteriaToCustomlistNode ( string listName, string movieId ) : void

Adds a movie criteria to a custom list node in the Categories and Filters menu(s)

AddMovieCriteriaToNode ( DBNode node, string movieId ) : void

Adds a movie criteria to a node

AddMovieCriteriaToWatchlistNode ( string movieId ) : void

Adds a movie criteria to the Watchlist node in the Categories and Filters menu(s)

AddMoviesCriteriaToNode ( DBNode node, IEnumerable movieIMDbList ) : void

Add criteria (IMDb ID's) for a movie list to a nodes filter criteria We don't need to worry about movies that don't exist as they will simply not be visible

CreateNode ( DBNode rootNode, string name, bool createBlacklist = false ) : DBNode

Created a child node

CreateNodeInMenu ( DBMenu menu, string name ) : void

Creates a node in a menu

CreateScrobbleData ( DBMovieInfo movie ) : TraktScrobbleMovie

Creates Scrobble data based on a DBMovieInfo object

DatabaseManager_ObjectDeleted ( DatabaseTable obj ) : void

Fired when an object is removed from the MovingPictures Database

DatabaseManager_ObjectInserted ( DatabaseTable obj ) : void

Fired when an object is inserted in the Moving Pictures Database

DatabaseManager_ObjectUpdatedEx ( DatabaseTable dbObject, TableUpdateInfo ui ) : void

Fired when an object is updated in the Moving Pictures Database

GetAdvancedUserRating ( DBMovieInfo movie ) : int

gets the user rating for a movie out of 10 this should only be called if the plugin is v1.8.1 or greater!

GetFirstWatchedDate ( DBMovieInfo movie ) : string

gets the first watched date of a movie

GetMovieAudioChannels ( DBMovieInfo movie ) : string

Gets the trakt compatible string for the movies Audio Channels

GetMovieAudioCodec ( DBMovieInfo movie ) : string

Gets the trakt compatible string for the movies Audio

GetMovieDuration ( DBMovieInfo movie, bool isDVD ) : double

returns the movie duration in seconds

GetMovieMediaType ( DBMovieInfo movie ) : string

Gets the trakt compatible string for the movies Media Type

GetMovieResolution ( DBMovieInfo movie ) : string

Gets the trakt compatible string for the movies Resolution

GetNodeByName ( DBNode rootNode, string name ) : DBNode

Gets a child node by name from a parent node

HasAdvancedRating ( DBMovieInfo movie ) : bool

Checks if a movie has a user rating out of 10 this should only be called if the plugin is v1.8.1 or greater!

IsMovie3D ( DBMovieInfo movie ) : bool

Checks if the movie is 3D or not

MovieMatch ( DBMovieInfo movPicsMovie, TraktMovie traktMovie ) : bool

Checks if a local movie is the same as an online movie

RemoveCustomListNode ( string listName ) : void

Removes a custom list from the Trakt Categories and Filters menu Only should remove a node if it no longer exists online at trakt.tv

RemoveMovieCriteriaFromCustomlistNode ( string listName, string movieId ) : void

Removes a movie criteria from a custom list node in the Categories and Filters menu(s)

RemoveMovieCriteriaFromNode ( DBNode node, string movieId ) : void

Removes a movie criteria from a node

RemoveMovieCriteriaFromRecommendationsNode ( string movieId ) : void

Removes a movie criteria from the Recommendations node in the Categories and Filters menu(s)

RemoveMovieCriteriaFromWatchlistNode ( string movieId ) : void

Removes a movie criteria from the Watchlist node in the Categories and Filters menu(s)

RemoveNode ( DBNode rootNode, string name ) : void

Removes a child node

RemoveTraktFromCategoryMenu ( ) : void

Removes top level trakt node from MovingPictures categories

RemoveTraktFromFiltersMenu ( ) : void

Removes top level trakt node from MovingPictures filters

SetAdvancedRating ( DBMovieInfo movie, int userRating ) : void

sets the user rating for a movie out of 10 this should only be called if the plugin is v1.8.1 or greater!

ShowRateDialog ( DBMovieInfo movie ) : void

Shows the Rate Movie Dialog after playback has ended

StartMovieScrobble ( DBMovieInfo movie ) : void

Starts or un-pauses a movie scrobble

StopMovieScrobble ( DBMovieInfo movie, bool forceWatched = false ) : void

Stops a movie scrobble

UpdateCategoriesMenu ( SyncListType syncLists = SyncListType.All ) : void

Creates/Updates Trakt categories menu

UpdateFiltersMenu ( SyncListType syncLists = SyncListType.All ) : void

Creates/Updates Trakt filters menu

Method Details

DisposeEvents() public method

public DisposeEvents ( ) : void
return void

FindMovieID() public static method

public static FindMovieID ( string title, int year, string imdbid, int &movieID ) : bool
title string
year int
imdbid string
movieID int
return bool

GetMoviePersonInfo() public static method

public static GetMoviePersonInfo ( int movieID, SearchPeople &searchPeople ) : bool
movieID int
searchPeople TraktPlugin.GUI.SearchPeople
return bool

GetTmdbID() public static method

public static GetTmdbID ( DBMovieInfo movie ) : string
movie MediaPortal.Plugins.MovingPictures.Database.DBMovieInfo
return string

MovingPictures() public method

public MovingPictures ( int priority ) : System
priority int
return System

PlayMovie() public static method

public static PlayMovie ( DBMovieInfo movie ) : void
movie MediaPortal.Plugins.MovingPictures.Database.DBMovieInfo
return void

PlayMovie() public static method

public static PlayMovie ( int movieID ) : void
movieID int
return void

Scrobble() public method

public Scrobble ( String filename ) : bool
filename String
return bool

SetUserRating() public static method

public static SetUserRating ( int rating ) : void
rating int
return void

StopScrobble() public method

public StopScrobble ( ) : void
return void

SyncLibrary() public method

public SyncLibrary ( ) : void
return void

SyncProgress() public method

public SyncProgress ( ) : void
return void

UpdateSettingAsBool() public static method

public static UpdateSettingAsBool ( string setting, bool value ) : void
setting string
value bool
return void

Property Details

player public_oe static_oe property

public static MoviePlayer,MediaPortal.Plugins.MovingPictures.MainUI player
return MediaPortal.Plugins.MovingPictures.MainUI.MoviePlayer

tmdbSource public_oe static_oe property

public static DBSourceInfo tmdbSource
return DBSourceInfo