Skip to content
This repository has been archived by the owner on Apr 8, 2022. It is now read-only.

Commit

Permalink
Move music playback to plex timelines.
Browse files Browse the repository at this point in the history
  • Loading branch information
hippojay committed May 5, 2015
1 parent 02e2d9f commit a63a27a
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions resources/lib/plexbmc.py
Expand Up @@ -1088,6 +1088,8 @@ def playPlaylist ( server, data ):
printDebug.debug("Playlist complete. Starting playback from track %s [playlist index %s] " % (data['extra'].get('index',0), index ))
xbmc.Player().playselected( index )



return

def playLibraryMedia( vids, override=False, force=None, full_data=False, shelf=False ):
Expand Down Expand Up @@ -1207,7 +1209,7 @@ def playLibraryMedia( vids, override=False, force=None, full_data=False, shelf=F
if not override:
setAudioSubtitles(streams)

if streams['type'] == "video":
if streams['type'] == "video" or streams['type'] == "music":
monitorPlayback(id,server, session)

return
Expand Down Expand Up @@ -2171,21 +2173,16 @@ def trackTag( server, tree, track, sectionart="", sectionthumb="", listing=True
'rating' : float(track.get('rating',0)) ,
'album' : track.get('parentTitle', tree.get('parentTitle','')).encode('utf-8') ,
'artist' : track.get('grandparentTitle', tree.get('grandparentTitle','')).encode('utf-8') ,
'duration' : int(track.get('duration',0))/1000
}
'duration' : int(track.get('duration',0))/1000 }

extraData={'type' : "Music" ,
#'fanart_image' : getFanart(track, server) ,
#'thumb' : getThumb(track, server) ,
'fanart_image' : sectionart ,
'thumb' : sectionthumb ,
'ratingKey' : track.get('key','') }
extraData={'type' : "music" ,
'fanart_image' : sectionart ,
'thumb' : sectionthumb ,
'key' : track.get('key','') }

#If we are streaming, then get the virtual location
url=mediaType(partDetails,server)

extraData['mode']=MODE_BASICPLAY
u="%s" % (url)
extraData['mode']=MODE_PLAYLIBRARY
u="%s%s" % (server.get_url_location(), extraData['key'])

if listing:
addGUIItem(u,details,extraData,folder=False)
Expand Down

0 comments on commit a63a27a

Please sign in to comment.