From f22ca2783c0e038be1e63c3fcfee402dcd32cc62 Mon Sep 17 00:00:00 2001 From: im85288 Date: Wed, 25 Mar 2015 09:59:23 +0000 Subject: [PATCH] Move theme music sync to update and make it an option --- addon.xml | 4 ++-- resources/language/English/strings.xml | 6 +++++- resources/lib/WriteKodiDB.py | 18 ++++++++++++------ resources/settings.xml | 7 ++++++- 4 files changed, 25 insertions(+), 10 deletions(-) diff --git a/addon.xml b/addon.xml index 6cb4f7ae..6496fda0 100644 --- a/addon.xml +++ b/addon.xml @@ -1,8 +1,8 @@ + provider-name="Emby.media"> diff --git a/resources/language/English/strings.xml b/resources/language/English/strings.xml index 00814d50..d6b8a02e 100644 --- a/resources/language/English/strings.xml +++ b/resources/language/English/strings.xml @@ -12,7 +12,7 @@ Enable Performance Profiling Local caching system - MediaBrowser + Emby Network Device Name @@ -233,6 +233,10 @@ Don't Show Skin Compatibility Message Add Show Name (Season + Episode) + Extras + Sync Theme Music + Sync Extra Fanart + Active Clear Settings diff --git a/resources/lib/WriteKodiDB.py b/resources/lib/WriteKodiDB.py index 99be3ad4..4235a761 100644 --- a/resources/lib/WriteKodiDB.py +++ b/resources/lib/WriteKodiDB.py @@ -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"]) diff --git a/resources/settings.xml b/resources/settings.xml index d13ed3c6..db460547 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -15,7 +15,7 @@ - + @@ -24,6 +24,11 @@ + + + + +