mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-06-18 06:06:14 +00:00
added musicvideos support
This commit is contained in:
parent
62dda17680
commit
c6e5bc28ac
6 changed files with 341 additions and 9 deletions
|
@ -40,7 +40,36 @@ class ReadEmbyDB():
|
|||
result = result['Items']
|
||||
|
||||
return result
|
||||
|
||||
|
||||
def getMusicVideos(self, fullinfo = False, fullSync = True):
|
||||
result = None
|
||||
|
||||
addon = xbmcaddon.Addon(id='plugin.video.mb3sync')
|
||||
port = addon.getSetting('port')
|
||||
host = addon.getSetting('ipaddress')
|
||||
server = host + ":" + port
|
||||
|
||||
downloadUtils = DownloadUtils()
|
||||
userid = downloadUtils.getUserId()
|
||||
|
||||
if not fullSync:
|
||||
sortstring = "&Limit=20&SortBy=DateCreated"
|
||||
else:
|
||||
sortstring = "&SortBy=SortName"
|
||||
|
||||
if fullinfo:
|
||||
url = server + '/mediabrowser/Users/' + userid + '/items?' + sortstring + '&Fields=Path,Genres,SortName,Studios,Writer,ProductionYear,Taglines,CommunityRating,OfficialRating,CumulativeRunTimeTicks,Metascore,AirTime,DateCreated,MediaStreams,People,Overview&Recursive=true&SortOrder=Descending&IncludeItemTypes=MusicVideo&format=json&ImageTypeLimit=1'
|
||||
else:
|
||||
url = server + '/mediabrowser/Users/' + userid + '/items?' + sortstring + '&Fields=CumulativeRunTimeTicks&Recursive=true&SortOrder=Descending&IncludeItemTypes=MusicVideo&CollapseBoxSetItems=false&format=json&ImageTypeLimit=1'
|
||||
|
||||
jsonData = downloadUtils.downloadUrl(url, suppress=True, popup=0)
|
||||
if jsonData != None and jsonData != "":
|
||||
result = json.loads(jsonData)
|
||||
if(result.has_key('Items')):
|
||||
result = result['Items']
|
||||
|
||||
return result
|
||||
|
||||
def getItem(self, id):
|
||||
result = None
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue