Video Service
From MythTV Official Wiki
Revision as of 04:13, 3 October 2011 by Iamlindoro (Talk | contribs)
Contents |
Video Service API List
| API Command | POST Required? | Description |
| GetVideos | No | Get a list of videos and their metadata. |
| GetVideoById | 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 | No | 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. |
Video APIs
GetVideos
The GetVideos 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/GetVideos?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>
<Host>holmes</Host>
<Coverart>607_coverart.jpg</Coverart>
<Fanart>607_fanart.jpg</Fanart>
<Banner></Banner>
<Screenshot></Screenshot>
<Trailer></Trailer>
</VideoMetadataInfo>
</VideoMetadataInfos>
</VideoMetadataInfoList>
GetVideoById
The GetVideoById API takes the following arguments:
- Id (Required)
- Parameter Type: Integer
- The database id of the requested metadata record.
Example Query:
http://BackendServerIP:6544/Video/GetVideoById?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>
<Host>holmes</Host>
<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>
<Host>holmes</Host>
<Coverart>607_coverart.jpg</Coverart>
<Fanart>607_fanart.jpg</Fanart>
<Banner></Banner>
<Screenshot></Screenshot>
<Trailer></Trailer>
</VideoMetadataInfo>