0.22 Python bindings/MythVideo
This class provides several canned queries for interfacing with database data of the MythVideo plugin.
Contents
- 1 MythVideo()
- 2 getcastId(cast_name)
- 3 getGenreId(genre_name)
- 4 getMetadata(id)
- 5 getMetadataId(path)
- 6 hasMetadata(path)
- 7 pruneMetadata()
- 8 setCast(cast_name, idvideo)
- 9 setMetadata(data, id=None)
- 10 getTitleId(title, subtitle=None, season=None, episode=None, array=False)
- 11 getTableFieldNames(tablename)
- 12 getMetadataDictionary(id)
- 13 getCategoryID(category_name)
- 14 getFieldID(field, name)
- 15 setField(field, name, idvideo)
- 16 getGenresId(genre_name)
- 17 setGenres(genre_name, idvideo)
- 18 getCountryId(country_name)
- 19 setCountry(country_name, idvideo)
- 20 cleanGenres(idvideo)
- 21 cleanCountry(idvideo)
- 22 cleanCast(idvideo)
MythVideo()
Returns an initialized class.
getcastId(cast_name)
Returns ID of cast member from table videocast.
getGenreId(genre_name)
Returns ID of genre from table videogenre.
getMetadata(id)
Returns tuple of metadata for the specified video id
getMetadataId(path)
Returns intid from videometadata from file path.
hasMetadata(path)
Returns bool if file path exists in videometadata.
pruneMetadata()
Removes videos from videometadata with no matching file.
setCast(cast_name, idvideo)
Adds entry in videometadatacast to add a cast member to a video in videometadata. Adds cast member in videocast if necessary.
setMetadata(data, id=None)
Updates videometadata with data as a dictionary indexed by field name in videometadata. Inserts new video if 'id' is undefined.
getTitleId(title, subtitle=None, season=None, episode=None, array=False)
Returns ID for video of specified title, with optional additional search fields
getTableFieldNames(tablename)
Returns list of fieldnames for specified table
getMetadataDictionary(id)
Returns dictionary of metadata for specified video id, indexed by field name
getCategoryID(category_name)
Returns category IDs from videocategory, insert if not found
getFieldID(field, name)
setField(field, name, idvideo)
getGenresId(genre_name)
Returns genre ID from videogenre, insert if not found
setGenres(genre_name, idvideo)
Add video to genre, add genre if needed
getCountryId(country_name)
Returns Country id from videocountry, insert if not found
setCountry(country_name, idvideo)
Add video to country, add country if needed
cleanGenres(idvideo)
Remove all genre cross-references in videometadatagenres for specified video, does not remove genres from videogenre
cleanCountry(idvideo)
Remove all country cross-references in videometadatacountry for specified video, does not remove countries from videocountry
cleanCast(idvideo)
Remove all cast cross-references in videometadatacast for specified video, does not remove cast from videocast