Move theme music sync to update and make it an option

This commit is contained in:
im85288 2015-03-25 09:59:23 +00:00
parent 64f3161518
commit f22ca2783c
4 changed files with 25 additions and 10 deletions

View file

@ -168,6 +168,10 @@ class WriteKodiDB():
CreateFiles().createSTRM(MBitem)
CreateFiles().createNFO(MBitem)
#add theme music
if addon.getSetting("syncThemeMusic") == "true":
CreateFiles().copyThemeMusic(MBitem)
if(changes):
utils.logMsg("Updated item to Kodi Library", MBitem["Id"] + " - " + MBitem["Name"], level=0)
@ -307,6 +311,10 @@ class WriteKodiDB():
CreateFiles().createSTRM(MBitem)
CreateFiles().createNFO(MBitem)
#add theme music
if addon.getSetting("syncThemeMusic") == "true":
CreateFiles().copyThemeMusic(MBitem)
if changes:
utils.logMsg("Updated item to Kodi Library", MBitem["Id"] + " - " + MBitem["Name"])
@ -368,6 +376,10 @@ class WriteKodiDB():
CreateFiles().createNFO(MBitem)
#add theme music
if addon.getSetting("syncThemeMusic") == "true":
CreateFiles().copyThemeMusic(MBitem)
if changes:
utils.logMsg("Updated item to Kodi Library", MBitem["Id"] + " - " + MBitem["Name"])
@ -683,9 +695,6 @@ class WriteKodiDB():
# create strm file
changes |= CreateFiles().createSTRM(item)
#add theme music
CreateFiles().copyThemeMusic(item)
if changes:
utils.logMsg("MB3 Sync","Added movie to Kodi Library",item["Id"] + " - " + item["Name"])
@ -771,9 +780,6 @@ class WriteKodiDB():
#create nfo file
changes = CreateFiles().createNFO(item)
#add theme music
CreateFiles().copyThemeMusic(item)
if changes:
utils.logMsg("Added TV Show to Kodi Library ",item["Id"] + " - " + item["Name"])