Don't start service if scrobbling switched off

This commit is contained in:
warwickh 2021-09-10 09:24:48 +10:00
parent 8ca52e6cc8
commit f97b9e1de9
1 changed files with 20 additions and 18 deletions

View File

@ -69,6 +69,7 @@ def scrobble_track(track_id):
return False
if __name__ == '__main__':
if(scrobbleEnabled):
monitor = xbmc.Monitor()
xbmc.log("Subsonic service started", xbmc.LOGINFO)
popup("Subsonic service started")
@ -77,7 +78,7 @@ if __name__ == '__main__':
break
if (xbmc.getCondVisibility("Player.HasMedia")):
try:
if(scrobbleEnabled):
currentFileName = xbmc.getInfoLabel("Player.Filenameandpath")
currentFileProgress = xbmc.getInfoLabel("Player.Progress")
pattern = re.compile(r'plugin:\/\/plugin\.audio\.subsonic\/\?action=play_track&id=(.*?)&')
@ -100,4 +101,5 @@ if __name__ == '__main__':
else:
pass
#xbmc.log("Playing stopped", xbmc.LOGINFO)
else:
xbmc.log("Subsonic service not started due to settings", xbmc.LOGINFO)