mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 18:26:15 +00:00
Add warning for clean on update
This commit is contained in:
parent
82ab2f2311
commit
23b5b93bdd
4 changed files with 39 additions and 0 deletions
|
@ -27,6 +27,7 @@ The Emby addon synchronizes your media on your Emby server to the native Kodi da
|
||||||
- To achieve direct play, you will need to ensure your Emby library paths point to network paths (e.g: "\\\\server\Media\Movies"). See the [Emby wiki](https://github.com/MediaBrowser/Wiki/wiki/Path%20Substitution) for additional information.
|
- To achieve direct play, you will need to ensure your Emby library paths point to network paths (e.g: "\\\\server\Media\Movies"). See the [Emby wiki](https://github.com/MediaBrowser/Wiki/wiki/Path%20Substitution) for additional information.
|
||||||
- **The addon is not (and will not be) compatible with the MySQL database replacement in Kodi.** In fact, Emby takes over the point of having a MySQL database because it acts as a "man in the middle" for your entire media library.
|
- **The addon is not (and will not be) compatible with the MySQL database replacement in Kodi.** In fact, Emby takes over the point of having a MySQL database because it acts as a "man in the middle" for your entire media library.
|
||||||
- Emby for Kodi is not currently compatible with Kodi's Video Extras addon unless native playback mode is used. **Deactivate Video Extras if content start randomly playing.**
|
- Emby for Kodi is not currently compatible with Kodi's Video Extras addon unless native playback mode is used. **Deactivate Video Extras if content start randomly playing.**
|
||||||
|
- Emby for Kodi adds entries to your Kodi database. To stop them from being removed, make sure <cleanonupdate> is not enabled in your advancedsettings.xml
|
||||||
|
|
||||||
### What is currently supported?
|
### What is currently supported?
|
||||||
|
|
||||||
|
|
|
@ -354,5 +354,6 @@
|
||||||
<string id="33093">Backup folder</string>
|
<string id="33093">Backup folder</string>
|
||||||
<string id="33094">Select content type to repair</string>
|
<string id="33094">Select content type to repair</string>
|
||||||
<string id="33095">Failed to retrieve latest updates using fast sync, using full sync.</string>
|
<string id="33095">Failed to retrieve latest updates using fast sync, using full sync.</string>
|
||||||
|
<string id="33096">Important, cleanonupdate was removed in your advanced settings to prevent conflict with Emby for Kodi. Kodi will restart now.</string>
|
||||||
|
|
||||||
</strings>
|
</strings>
|
|
@ -644,6 +644,10 @@ class LibrarySync(threading.Thread):
|
||||||
startupComplete = False
|
startupComplete = False
|
||||||
|
|
||||||
log.warn("---===### Starting LibrarySync ###===---")
|
log.warn("---===### Starting LibrarySync ###===---")
|
||||||
|
if utils.verify_advancedsettings():
|
||||||
|
# Advancedsettings was modified, Kodi needs to restart
|
||||||
|
log.warn("###===--- LibrarySync Aborted ---===###")
|
||||||
|
return
|
||||||
|
|
||||||
while not self.monitor.abortRequested():
|
while not self.monitor.abortRequested():
|
||||||
|
|
||||||
|
|
|
@ -347,3 +347,36 @@ def passwordsXML():
|
||||||
icon="special://home/addons/plugin.video.emby/icon.png",
|
icon="special://home/addons/plugin.video.emby/icon.png",
|
||||||
time=1000,
|
time=1000,
|
||||||
sound=False)
|
sound=False)
|
||||||
|
|
||||||
|
def verify_advancedsettings():
|
||||||
|
# Track the existance of <cleanonupdate>true</cleanonupdate>
|
||||||
|
# incompatible with plugin paths
|
||||||
|
log.info("verifying advanced settings")
|
||||||
|
if settings('useDirectPaths') != "0": return
|
||||||
|
|
||||||
|
path = xbmc.translatePath("special://userdata/").decode('utf-8')
|
||||||
|
xmlpath = "%sadvancedsettings.xml" % path
|
||||||
|
|
||||||
|
try:
|
||||||
|
xmlparse = etree.parse(xmlpath)
|
||||||
|
except: # Document is blank or missing
|
||||||
|
return
|
||||||
|
else:
|
||||||
|
root = xmlparse.getroot()
|
||||||
|
|
||||||
|
video = root.find('videolibrary')
|
||||||
|
if video is not None:
|
||||||
|
cleanonupdate = video.find('cleanonupdate')
|
||||||
|
if cleanonupdate is not None and cleanonupdate.text == "true":
|
||||||
|
log.warn("cleanonupdate disabled")
|
||||||
|
video.remove(cleanonupdate)
|
||||||
|
|
||||||
|
try:
|
||||||
|
indent(root)
|
||||||
|
except: pass
|
||||||
|
etree.ElementTree(root).write(xmlpath)
|
||||||
|
|
||||||
|
xbmcgui.Dialog().ok(heading=language(29999), line1=language(33096))
|
||||||
|
xbmc.executebuiltin('RestartApp')
|
||||||
|
return True
|
||||||
|
return
|
||||||
|
|
Loading…
Reference in a new issue