Wiki Navigation
- Loading...
List of public interface methods
Some things to understand:
Term "Movie" is not a "Movie" which you can see in cinema or TV. Movie in the videodatabase is an entity which is link to the video files (one or more) and can be any video (TV recording, home video, downloaded video stream...). Every video file which is played through MyVideos is recorded in the videodatabase as "Movie" and videodatabase holds it stop, duration and mediaInfo data.
So, even you don't use MyVideos as Movie catalog, MP will use videodatabase for video files tracking.
For better understanding of videodatabase tables, you can see their structure here.
Files & Path
int AddFile(int lMovieId, int lPathId, string strFileName);
· Function:
o add new video file for existing video and it's mediainfo in database,
o returns fileId from Movie table
o this will create new video file record in the database if it doesn't exists
· Affected tables
o files
o filesmediainfo
· Note
o this should be avoided because there is more powerful function which do the same with just one parameter "int AddMovieFile(string strFile)"
int GetFile(string strFilenameAndPath, out int lPathId, out int lMovieId, bool bExact);
· Function
o returns fileId from full videofile path and filename, parameter "bExact" if set to TRUE will skip files stack check
· Table used
o files
int AddMovieFile(string strFile);
· Function
o add video file in database or get video file Id from the database,
o video file parameter should be with full path
o this will create new video file record in the database if it doesn't exists
· Affected tables
o movie
o files
o path
o filesmediainfo
int AddPath(string strPath);
· Function
o add-update or get pathId for new/old video files path
· Affected table
o path
int GetPath(string strPath);
· Function
o get path Id from the database
· Table used
o path
void DeleteFile(int iFileId);
· Function
o deletes file from database,
o this will also delete all resume, duration and mediaInfo data for file
· Affected tables
o files
o resume
o duration
o filesmediainfo
o function does not deletes file from HDD
void RemoveFilesForMovie(int lMovieId);
· Function
o deletes all files related to movie,
o this will also delete all resume, duration and mediaInfo data for files
o function does not deletes files from HDD
· Affected tables
o files
o resume
o duration
o filesmediainfo
int GetFileId(string strFilenameAndPath);
· Function
o returns video file Id form the database
· Table used
o files
void GetFilesForMovie(int lMovieId, ref ArrayList movies);
· Function
o returns all files (with full path) related to movie in ArrayList as strings
· Tables used
o files
o path
Genre
int AddGenre(string strGenre1);
· Function
o add new genre or get genreId from the database,
o returns genreId
· Affected tables
o genre
void GetGenres(ArrayList genres);
· Function
o returns all genres in ArrayList as strings
· Table used
o genre
string GetGenreById(int genreId);
· Function
o returns genre as string
· Table used
o genre
void AddGenreToMovie(int lMovieId, int lGenreId);
· Function
o link genre with video file
· Affected table
o genrelinkmovie
void DeleteGenre(string genre);
· Function
o delete genre,
o this also unlinks all movies in the database from that genre
· Affected tables
o genre
o genrelinkmovie
void RemoveGenresForMovie(int lMovieId);
· Function
o unlink all genres from movie,
o doesn't delete genres
· Affected table
o genrelinkmovie
User groups
int AddUserGroup(string strUserGroup1);
· Function
o add new userGroup or get userGroup Id from the database
· Affected table
o usergroup
void GetUserGroups(ArrayList userGroups);
· Function
o get list of existing userGroups in Array as strings
· Table used
o usergroup
string GetUserGroupById(int groupId);
· Function
o get usergroup by UserGroupId
· Table used
o usergroup
void GetMovieUserGroups(int movieId, ArrayList userGroups);
· Function
o get list of all userGroups in Array as strings for movie
· Table used
o usergroup
string GetUserGroupRule(string group);
· Function
o get rule for userGroup
· Table used
o usergroup
void AddUserGroupRuleByGroupId(int groupId, string rule);
· Function
o add new rule for userGroup
· Affected table
o usergroup
void AddUserGroupRuleByGroupName(string groupName, string rule);
· Function
o add new rule for UserGroup
· Affected table
o usergroup
void AddUserGroupToMovie(int lMovieId, int lUserGroupId);
· Function
o link movie to userGroup
· Affected tables
o usergroup
o usergrouplinkmovie
void RemoveUserGroupFromMovie(int lMovieId, int lUserGroupId);
· Function
o unlink movie from userGroup
o doesn’t delete user group
· Affected tables
o usergroup
o usergrouplinkmovie
void DeleteUserGroup(string userGroup);
· Function
o deletes userGroup and rule created for that group,
o also unlinks all movies related to that group
· Affected tables
o usergroup
o usergrouplinkmovie
void RemoveUserGroupsForMovie(int lMovieId);
· Function
o unlink movie from userGroups,
o doesn't delete groups itself
· Affected tables
o usergrouplinkmovie
void RemoveUserGroupRule(string groupName);
· Function
o deletes userGroup rule
· Affected tables
o usergroup
Actors
int AddActor(string strActorImdbId, string strActorName);
· Function
o add new actor or get actorid from the database,
o parameter strActorImdbId can be empty string but this is not recommended
· Affected table
o actors
void GetActors(ArrayList actors);
· Function
o get actors list in Array as strings
· Table used
o actors
string GetActorNameById(int actorId);
· Function
o get actor name
· Table used
o actors
void GetActorByName(string actorName, ArrayList actors);
· Function
o get actor/actors by name,
o returned array item contain actorId, actorName and actorImdbId separated by "|" character
· Table used
o actors
void GetActorsByMovieID(int idMovie, ref ArrayList actors);
· Function
o returns actors for movie,
o returned array item contain actorId, actorName, actorImdbId and role separated by "|" character
· Tables used
o actors
o actorlinkmovie
string GetRoleByMovieAndActorId(int lMovieId, int lActorId);
· Function
o get role for actor in movie
· Table used
o actorlinkmovie
void AddActorToMovie(int lMovieId, int lActorId, string role);
· Function
o link actor to movie
· Affected table
o actorlinkmovie
void DeleteActorFromMovie(int movieId, int actorId);
· Function
o remove actor from movie,
o doesn't delete actor itself
· Affected table
o actorlinkmovie
void DeleteActor(string actorImdbId);
· Function
o delete actor from database,
o also removes all movies links for that actor
· Affected tables
o actors
o actorlinkmovie
void RemoveActorsForMovie(int lMovieId);
· Function
o unlink all actors for movie,
o doesn't delete actors
· Affected table
o actorlinkmovie
Actor info (uses IMDBActor object)
void SetActorInfo(int idActor, IMDBActor actor);
· Function
o add-update actor info
· Affected table
o actorinfo
void AddActorInfoMovie(int idActor, IMDBActor.IMDBActorMovie movie);
· Function
o add-update actor movie list
· Affected tables
o actorinfomovies
o IMDBMovies
IMDBActor GetActorInfo(int idActor);
· Function
o returns actor info together with actor movie list in IMDBActorMovie sub object
· Tables used
o actorinfo
o IMDBMovies
string GetActorImdbId(int idActor);
· Function
o get actor IMDBId (nm1234567)
· Table used
o actorinfo
Movie info
void SetMovieInfo(string strFilenameAndPath, ref IMDBMovie details);
· Function
o add-update movie info data for full path filename
· Affected table
o movieinfo
void SetMovieInfoById(int lMovieId, ref IMDBMovie details);
· Function
o add-update movieInfo data by movieId,
o executes function below with timestamp as false
· Affected table
o movieinfo
void SetMovieInfoById(int lMovieId, ref IMDBMovie details, bool updateTimeStamp);
· Function
o new version of method above which adds-update timeStamp if timeStamp parameter is set to TRUE
· Affected table
o movieinfo
void DeleteMovieInfo(string strFileNameAndPath);
· Function
o deletes movieInfo,
o use this if you don't know movieId but it's full path+filename,
o executes function below
· Affected tables
o movieinfo
o resume
o genrelinkmovie
o actorlinkmovie
o files
o movie
o usergrouplinkmovie
void DeleteMovieInfoById(long lMovieId);
· Function
o delete movieInfo together with covers and fanart,
o also unlink all other data for movie like genres, actors..,
o removes all files related to movie and movie itself [movie table], in short, cleans videodatabase moviecatalog records for movie,
o doesn't delete video files from HDD
· Affected tables
o movieinfo
o resume
o genrelinkmovie
o actorlinkmovie
o files
o movie
o usergrouplinkmovie
bool HasMovieInfo(string strFilenameAndPath);
· Function
o returns TRUE if movie have info data
· Table used
o movieinfo
int GetMovieInfo(string strFilenameAndPath, ref IMDBMovie details);
· Function
o get movie information,
o use this if you don't know movieId,
o executes function below
· Table used
o movieinfo
void GetMovieInfoById(int lMovieId, ref IMDBMovie details);
· Function
o get movie information
· Table used
o movieinfo
void SetWatched(IMDBMovie details);
· Function
o flag movie as watched,
o also sets watchedDate with current system date
· Affected table
o movieinfo
void SetDateWatched(IMDBMovie details);
· Function
o set-update last watched date for movie,
o date has value from system date
· Affected table
o movieinfo
Stop time & duration
void DeleteMovieStopTime(int iFileId);
· Function
o remove stop time for video file
· Affected table
o resume
int GetMovieStopTime(int iFileId);
· Function
o get stop time for file,
o stopTime is in seconds
· Table used
o resume
void SetMovieStopTime(int iFileId, int stoptime);
· Function
o set file stop time,
o stopTime is in seconds
· Affected table
o resume
int GetMovieStopTimeAndResumeData(int iFileId, out byte[] resumeData);
· Function
o get stop time and resumedata [only for DVDs],
o stopTime is in seconds
· Table used
o resume
void SetMovieStopTimeAndResumeData(int iFileId, int stoptime, byte[] resumeData);
· Function
o set stop time and resumeData [only for DVDs],
o stopTime is in seconds
· Affected table
o resume
int GetVideoDuration(int iFileId);
· Function
o get duration time for video file,
o duration time is in seconds
· Table used
o duration
int GetMovieDuration(int iMovieId);
· Function
o get total movie duration (movie can have link to more than one video file),
o duration time is in seconds
· Table used
o movie
void SetVideoDuration(int iFileId, int duration);
· Function
o set video file duration,
o duration time is in seconds
· Affected table
o duration
void SetMovieDuration(int iMovieId, int duration);
· Function
o set total movie duration [movie can have more files],
o duration time is in seconds
· Affected table
o movie
Watched status
void SetMovieWatchedStatus(int iFileId, bool watched, int percent);
· Function
o set-update watched status for movie
· Affected table
o movie
void MovieWatchedCountIncrease(int idMovie);
· Function
o increase watched count for movie
· Affected table
o movie
void SetMovieWatchedCount(int movieId, int watchedCount);
· Function
o set watched count for movie
· Affected table
o movie
bool GetMovieWatchedStatus(int iFileId, out int percent, out int timesWatched);
· Function
o get watched data for movie
· Table used
o movie
Movie files and movies
int AddMovie(string strFilenameAndPath, bool bHassubtitles);
· Function
o add movie to database
· Affected tables
o movie
o files
o path
o filesmediainfo
void DeleteMovie(string strFilenameAndPath);
· Function
o parameter can be path or full path filename,
o if parameter is path, all movies linked to that path will be removed
o remove all info related to movie including covers and fanart,
o doesn't delete file/files from HDD
· Affected tables
o movie
o bookmark
o files
o genrelinkmovie
o usergrouplinkmovie
o actorlinkmovie
o movieinfo
o resume
o duration
o filesmediainfo
void GetMovies(ref ArrayList movies);
· Function
o returns IMDBMovie objects in ArrayList
· Tables used
o movie
o movieinfo
int GetMovieId(string strFilenameAndPath);
· Function
o get movieId for fullpath filename
· Tables used
o files
o path
bool HasSubtitle(string strFilenameAndPath);
· Function
o check if video file has subtitle file in video file folder
· Table used
o movie
void SetThumbURL(int lMovieId, string thumbURL);
· Function
o set-update cover url for movie
· Affected table
o movieinfo
void SetFanartURL(int lMovieId, string fanartURL);
· Function
o set-update fanart url for movie
· Affected table
o movieinfo
Movies by filters (returned object in array is IMDBMovie)
void GetYears(ArrayList years);
void GetMoviesByGenre(string strGenre1, ref ArrayList movies);
void GetMoviesByUserGroup(string strUserGroup1, ref ArrayList movies);
void GetMoviesByActor(string strActor1, ref ArrayList movies);
void GetMoviesByYear(string strYear, ref ArrayList movies);
void GetMoviesByPath(string strPath1, ref ArrayList movies);
void GetMoviesByFilter(string sql, out ArrayList movies, bool actorTable, bool movieinfoTable, bool
genreTable, bool usergroupTable);
· Function
o get movies by using SQL syntax and declaring what tables should be used in returned data
void GetIndexByFilter(string sql, bool filterNonWordChar, out ArrayList movieList);
· Function
o returns first letter from movies called as INDEXES,
o "title" property carries index letter and "runtime" property carries count of that letter,
o if parameter filterNonWordChar is set to TRUE, all non-word characters like numbers or parentheses will be grouped into index letter "#"

This page has no comments.