Skip to content

Commit

Permalink
connections always on try/catch
Browse files Browse the repository at this point in the history
  • Loading branch information
lusum committed Feb 16, 2020
1 parent 446bc60 commit cd00a3f
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions default.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,16 +195,18 @@ def play_track(object_id,song_url):
pass

liz = xbmcgui.ListItem()

if old_object_id == None or old_object_id != object_id:
ampConn = ampache_connect.AmpacheConnect()
xbmc.log("AmpachePlugin::play_track refresh infoLabels", xbmc.LOGDEBUG)
ampConn.filter = object_id
elem = ampConn.ampache_http_request("song")
for thisnode in elem:
node = thisnode
fillListItemWithSongInfo(liz,node)
liz.setProperty("IsPlayable", "true")
try:
if old_object_id == None or old_object_id != object_id:
ampConn = ampache_connect.AmpacheConnect()
xbmc.log("AmpachePlugin::play_track refresh infoLabels", xbmc.LOGDEBUG)
ampConn.filter = object_id
elem = ampConn.ampache_http_request("song")
for thisnode in elem:
node = thisnode
fillListItemWithSongInfo(liz,node)
liz.setProperty("IsPlayable", "true")
except:
pass

liz.setPath(song_url)
#rating = xbmc.getInfoLabel('ListItem.UserRating')
Expand Down

0 comments on commit cd00a3f

Please sign in to comment.