Video Service
Contents
What is this?
See Services API
Video Service API List
API Command | POST Required? | Description |
GetVideoList | No | Get a list of videos and their metadata. |
GetVideo | No | Get a single video's metadata by database id. |
GetVideoByFileName | No | Get a single video's metadata by filename. |
AddVideo | Yes | Add a new filename to the video database. |
RemoveVideoFromDB | Yes | Remove a single video from the database by database id. |
LookupVideo | No | Perform an online metadata lookup for a given title, subtitle, inetref, season, or episode number. |
GetBluray | No | Query technical data for a Blu-ray disc or folder. |
UpdateVideoMetadata | Yes | Updates the metadata of a video |
Video APIs
GetVideoList
The GetVideoList API takes the following arguments:
- Descending (Optional)
- Parameter Type: Boolean
- Whether to return results in ascending or descending order.
- StartIndex (Optional)
- Parameter Type: Integer
- The first index number to return.
- Count (Optional)
- Parameter Type: Integer
- The number of records to return.
Example Query:
http://BackendServerIP:6544/Video/GetVideoList?StartIndex=100&Count=1
Example Return:
<?xml version="1.0" encoding="UTF-8"?> <VideoMetadataInfoList version="1.01" serializerVersion="1.1"> <StartIndex>100</StartIndex> <Count>1</Count> <CurrentPage>101</CurrentPage> <TotalPages>1656</TotalPages> <TotalAvailable>1656</TotalAvailable> <AsOf>2011-10-02T21:03:35</AsOf> <Version>0.25.20110928-1</Version> <ProtoVer>69</ProtoVer> <VideoMetadataInfos> <VideoMetadataInfo> <Id>106</Id> <Title>Men In Black</Title> <SubTitle></SubTitle> <Tagline>Protecting the Earth from the scum of the universe.</Tagline> <Director>Barry Sonnenfeld</Director> <Studio>Amblin Entertainment</Studio> The American science fiction comedy about a conspiracy theory. Two secret agents are searching the streets for aliens in this blockbuster film that earned 590 million dollars at the box-office and birthed a sequel; Men in Black II. <Certification>PG-13</Certification> <Inetref>607</Inetref> <HomePage>http://www.themoviedb.org/movie/607</HomePage> <ReleaseDate>1997-07-01T00:00:00</ReleaseDate> <AddDate>2010-06-03T00:00:00</AddDate> <UserRating>7</UserRating> <Length>98</Length> <Season>0</Season> <Episode>0</Episode> <ParentalLevel>3</ParentalLevel> <Visible>true</Visible> <Watched>false</Watched> <Processed>true</Processed> <FileName>Men in Black.mkv</FileName> <Hash>22be408157d11281</Hash> <HostName>holmes</HostName> <Coverart>607_coverart.jpg</Coverart> <Fanart>607_fanart.jpg</Fanart> <Banner></Banner> <Screenshot></Screenshot> <Trailer></Trailer> </VideoMetadataInfo> </VideoMetadataInfos> </VideoMetadataInfoList>
GetVideo
The GetVideo API takes the following arguments:
- Id (Required)
- Parameter Type: Integer
- The database id of the requested metadata record.
Example Query:
http://BackendServerIP:6544/Video/GetVideo?Id=106
Example Return:
<VideoMetadataInfo> <Id>106</Id> <Title>Men In Black</Title> <SubTitle></SubTitle> <Tagline>Protecting the Earth from the scum of the universe.</Tagline> <Director>Barry Sonnenfeld</Director> <Studio>Amblin Entertainment</Studio> The American science fiction comedy about a conspiracy theory. Two secret agents are searching the streets for aliens in this blockbuster film that earned 590 million dollars at the box-office and birthed a sequel; Men in Black II. <Certification>PG-13</Certification> <Inetref>607</Inetref> <HomePage>http://www.themoviedb.org/movie/607</HomePage> <ReleaseDate>1997-07-01T00:00:00</ReleaseDate> <AddDate>2010-06-03T00:00:00</AddDate> <UserRating>7</UserRating> <Length>98</Length> <Season>0</Season> <Episode>0</Episode> <ParentalLevel>3</ParentalLevel> <Visible>true</Visible> <Watched>false</Watched> <Processed>true</Processed> <FileName>Men in Black.mkv</FileName> <Hash>22be408157d11281</Hash> <HostName>holmes</HostName> <Coverart>607_coverart.jpg</Coverart> <Fanart>607_fanart.jpg</Fanart> <Banner></Banner> <Screenshot></Screenshot> <Trailer></Trailer> </VideoMetadataInfo>
GetVideoByFileName
The GetVideoByFileName API takes the following arguments:
- FileName (Required)
- Parameter Type: String
- The filename of the requested metadata record.
Example Query:
http://BackendServerIP:6544/Video/GetVideoByFileName?FileName=Men%20in%20Black.mkv
Example Return:
<VideoMetadataInfo> <Id>106</Id> <Title>Men In Black</Title> <SubTitle></SubTitle> <Tagline>Protecting the Earth from the scum of the universe.</Tagline> <Director>Barry Sonnenfeld</Director> <Studio>Amblin Entertainment</Studio> The American science fiction comedy about a conspiracy theory. Two secret agents are searching the streets for aliens in this blockbuster film that earned 590 million dollars at the box-office and birthed a sequel; Men in Black II. <Certification>PG-13</Certification> <Inetref>607</Inetref> <HomePage>http://www.themoviedb.org/movie/607</HomePage> <ReleaseDate>1997-07-01T00:00:00</ReleaseDate> <AddDate>2010-06-03T00:00:00</AddDate> <UserRating>7</UserRating> <Length>98</Length> <Season>0</Season> <Episode>0</Episode> <ParentalLevel>3</ParentalLevel> <Visible>true</Visible> <Watched>false</Watched> <Processed>true</Processed> <FileName>Men in Black.mkv</FileName> <Hash>22be408157d11281</Hash> <HostName>holmes</HostName> <Coverart>607_coverart.jpg</Coverart> <Fanart>607_fanart.jpg</Fanart> <Banner></Banner> <Screenshot></Screenshot> <Trailer></Trailer> </VideoMetadataInfo>
AddVideo
The AddVideo API takes the following arguments:
- FileName (Required)
- Parameter Type: String
- The filename (including relative path from the root of the video storage group) to be added to the database.
- HostName (Required)
- Parameter Type: String
- The backend hostname where the file can be found.
Example Query:
http://BackendServerIP:6544/Video/AddVideo?FileName=300.mkv&HostName=localhost
Example Return:
Returns a boolean value. True if the file was successfully added, false if the insert failed for any reason.
<bool>true</bool>
RemoveVideoFromDB
The RemoveVideoFromDB API takes the following arguments:
- Id (Required)
- Parameter Type: Integer
- The database id of the metadata record to be removed.
Example Query:
http://BackendServerIP:6544/Video/RemoveVideoFromDB?Id=106
Example Return:
Returns a boolean value. True if the file was successfully removed, false if the removal failed for any reason.
<bool>true</bool>
LookupVideo
The LookupVideo API takes the following arguments:
- Title (Required)
- Parameter Type: String
- The title to be looked up.
- Subtitle (Optional)
- Parameter Type: String
- The subtitle to be looked up.
- Inetref (Optional)
- Parameter Type: String
- The internet reference number to be looked up.
- Season (Optional)
- Parameter Type: Integer
- The season to be looked up.
- Episode (Optional)
- Parameter Type: Integer
- The episode number to be looked up.
Example Query:
http://BackendServerIP:6544/Video/LookupVideo?Title=Family%20Guy&Subtitle=Pilot
Example Return:
<?xml version="1.0" encoding="UTF-8"?> <VideoLookupList version="1.0" serializerVersion="1.1"> <Count>1</Count> <AsOf>2011-10-02T21:28:33</AsOf> <Version>0.25.20110928-1</Version> <ProtoVer>69</ProtoVer> <VideoLookups> <VideoLookup> <Title>Family Guy</Title> <SubTitle></SubTitle> <Season>1</Season> <Episode>1</Episode> <Year>1999</Year> <Tagline></Tagline> Sick, twisted, politically incorrect and Freakin' Sweet animated series featuring the adventures of the dysfunctional Griffin family. Bumbling Peter and long-suffering Lois have three kids. Stewie (a brilliant but sadistic baby bent on killing his mother and taking over the world), Meg (the oldest, and is the most unpopular girl in town) and Chris (the middle kid, he's not very bright but has a passion for movies). The final member of the family is Brian - a talking dog and much more than a pet, he keeps Stewie in check whilst sipping Martinis and sorting through his own life issues. <Certification></Certification> <Inetref>75978</Inetref> <HomePage></HomePage> <ReleaseDate>1999-01-31T00:00:00</ReleaseDate> <UserRating>0</UserRating> <Length>0</Length> <Language>en</Language> <Countries/> <Popularity>0</Popularity> <Budget>0</Budget> <Revenue>0</Revenue> <IMDB>0182576</IMDB> <TMSRef>SH296001</TMSRef> <Artwork> <ArtworkItem> <Type>banner</Type> <Url>http://www.thetvdb.com/banners/graphical/75978-g.jpg</Url> <Thumbnail>http://www.thetvdb.com/banners/_cache/graphical/75978-g.jpg</Thumbnail> <Width>0</Width> <Height>0</Height> </ArtworkItem> </Artwork> </VideoLookup> </VideoLookups> </VideoLookupList>
GetBluray
The GetBluray API takes the following arguments:
- Path (Required)
- Parameter Type: String
- The path to a Blu-ray drive or folder structure.
Example Query:
http://BackendServerIP:6544/Video/GetBluray?Path=/MythMedia/movies/Ratatouille
Example Return:
<?xml version="1.0" encoding="UTF-8"?> <BlurayInfo version="1.0" serializerVersion="1.1"> <Path>/MythMedia/movies/Ratatouille</Path> <Title>Ratatouille</Title> <AltTitle></AltTitle> <DiscLang>en</DiscLang> <DiscNum>0</DiscNum> <TotalDiscNum>0</TotalDiscNum> <TitleCount>0</TitleCount> <ThumbCount>0</ThumbCount> <ThumbPath></ThumbPath> <TopMenuSupported>true</TopMenuSupported> <FirstPlaySupported>true</FirstPlaySupported> <NumHDMVTitles>14</NumHDMVTitles> <NumBDJTitles>4</NumBDJTitles> <NumUnsupportedTitles>4</NumUnsupportedTitles> <AACSDetected>false</AACSDetected> <LibAACSDetected>false</LibAACSDetected> <AACSHandled>false</AACSHandled> <BDPlusDetected>false</BDPlusDetected> <LibBDPlusDetected>false</LibBDPlusDetected> <BDPlusHandled>false</BDPlusHandled> </BlurayInfo>
UpdateVideoMetadata
Version: 0.29
|
This method requires 0.29 or later |
The UpdateVideoMetadata API takes the following arguments:
- Id (Required)
- Parameter Type: Integer
- The ID of the video to change metadata.
- Title (Optional)
- Parameter Type: String
- The new title.
- SubTitle (Optional)
- Parameter Type: String
- The new subtitle.
- TagLine (Optional)
- Parameter Type: String
- The new TagLine.
- Director (Optional)
- Parameter Type: String
- The new Director.
- Studio (Optional)
- Parameter Type: String
- The new Studio.
- Plot (Optional)
- Parameter Type: String
- The new Plot.
- Rating (Optional)
- Parameter Type: String
- The new Rating.
- Inetref (Optional)
- Parameter Type: String
- The new Inetref.
- CollectionRef (Optional)
- Parameter Type: Integer
- The new CollectionRef.
- HomePage (Optional)
- Parameter Type: String
- The new HomePage.
- Year (Optional)
- Parameter Type: Integer
- The new Year.
- ReleaseDate (Optional)
- Parameter Type: Date
- The new ReleaseDate.
- UserRating (Optional)
- Parameter Type: Float
- The new UserRating.
- Length (Optional)
- Parameter Type: Integer
- The new Length.
- PlayCount (Optional)
- Parameter Type: Integer
- The new PlayCount.
- Season (Optional)
- Parameter Type: Integer
- The new Season.
- Episode (Optional)
- Parameter Type: Integer
- The new Episode.
- ShowLevel (Optional)
- Parameter Type: Integer
- The new ShowLevel.
- FileName (Optional)
- Parameter Type: String
- The new FileName.
- Hash (Optional)
- Parameter Type: String
- The new Hash.
- CoverFile (Optional)
- Parameter Type: String
- The new CoverFile.
- ChildID (Optional)
- Parameter Type: Integer
- The new ChildID.
- Browse (Optional)
- Parameter Type: Boolean
- The new Browse flag.
- Watched (Optional)
- Parameter Type: Boolean
- The new Watched flag.
- Processed (Optional)
- Parameter Type: Boolean
- The new Processed flag.
- PlayCommand (Optional)
- Parameter Type: String
- The new PlayCommand.
- Category (Optional)
- Parameter Type: Integer
- The new Category ID.
- Trailer (Optional)
- Parameter Type: String
- The new Trailer.
- Host (Optional)
- Parameter Type: String
- The new Host.
- Screenshot (Optional)
- Parameter Type: String
- The new Screenshot.
- Banner (Optional)
- Parameter Type: String
- The new Banner.
- Fanart (Optional)
- Parameter Type: String
- The new Fanart.
- InsertDate (Optional)
- Parameter Type: Date
- The new InsertDate.
- ContentType (Optional)
- Parameter Type: String
- The new ContentType. Valid values are 'MOVIE','TELEVISION','ADULT','MUSICVIDEO','HOMEVIDEO'
- Genres (Optional)
- Parameter Type: String
- The new comma separated list of Genres.
- Cast (Optional)
- Parameter Type: String
- The new comma separated list of Cast members.
- Countries (Optional)
- Parameter Type: String
- The new comma separated list of Countries.
Example Query:
http://BackendServerIP:6544/Video/UpdateVideoMetadata?Id=1234&Title=Star+Wars&Year=1977
Example Return:
Returns a boolean value. True if the metadata successfully updated, false if the update failed for any reason.
<bool>true</bool>