Settings overhaul. Also added many German translations

This commit is contained in:
tomkat83 2016-03-03 14:00:48 +01:00
parent 9e9f61f9ba
commit c2ecdacec4
9 changed files with 259 additions and 148 deletions

View file

@ -8,6 +8,7 @@ import urlparse
import xbmc
import xbmcaddon
import xbmcgui
#################################################################################################
@ -101,24 +102,7 @@ class Main:
if mode == "settings":
xbmc.executebuiltin('Addon.OpenSettings(plugin.video.plexkodiconnect)')
elif mode in ("manualsync", "repair"):
if utils.window('emby_online') != "true":
# Server is not online, do not run the sync
xbmcgui.Dialog().ok(heading="Emby for Kodi",
line1=("Unable to run the sync, the add-on is not "
"connected to the Emby server."))
utils.logMsg("EMBY", "Not connected to the emby server.", 1)
return
if utils.window('emby_dbScan') != "true":
import librarysync
lib = librarysync.LibrarySync()
if mode == "manualsync":
librarysync.ManualSync(dialog=True)
else:
lib.fullSync(repair=True)
else:
utils.logMsg("EMBY", "Database scan is already running.", 1)
entrypoint.RunLibScan(mode)
elif mode == "texturecache":
import artwork
artwork.Artwork().FullTextureCacheSync()

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<strings>
<!-- Add-on settings -->
<string id="30000">Primary Server Address</string><!-- Verified -->
<string id="30002">Play from HTTP instead of SMB</string><!-- Verified -->
<string id="30000">Server Address (IP)</string><!-- Verified -->
<string id="30002">Deactivate Direct Play and enforce Transcoding</string><!-- Verified -->
<string id="30004">Log level</string><!-- Verified -->
<string id="30005">Username: </string>
<string id="30006">Password: </string>
@ -12,7 +12,7 @@
<string id="30010">Enable Performance Profiling</string>
<string id="30011">Local caching system</string>
<string id="30014">Emby</string>
<string id="30014">Connection</string>
<string id="30015">Network</string>
<string id="30016">Device Name</string>
@ -213,7 +213,7 @@
<string id="30237">Sync Extra Fanart</string>
<string id="30238">Sync Movie BoxSets</string>
<string id="30239">Reset local Kodi database</string><!-- Verified -->
<string id="30239">[COLOR yellow]Reset local Kodi database[/COLOR]</string><!-- Verified -->
<string id="30240">Enable watched/resume status sync</string>
<string id="30241">DB Sync Indication:</string>
<string id="30242">Play Count Sync Indication:</string>
@ -262,16 +262,16 @@
<string id="30409">Delete item from the server</string>
<!-- add-on settings -->
<string id="30500">Verify Host SSL Certificate</string>
<string id="30500">Verify Host SSL Certificate (more secure)</string>
<string id="30501">Client SSL certificate</string>
<string id="30502">Use alternate address</string>
<string id="30503">Alternate Server Address</string>
<string id="30504">Use altername device Name</string>
<string id="30505">[COLOR yellow]Retry login[/COLOR]</string>
<string id="30504">Use alternate device Name</string>
<string id="30505">[COLOR yellow]Reset login attempts[/COLOR]</string>
<string id="30506">Sync Options</string>
<string id="30507">Show syncing progress</string>
<string id="30508">Sync empty TV Shows</string>
<string id="30509">Enable Music Library</string>
<string id="30509">Enable Music Library (restart Kodi!)</string>
<string id="30510">Direct stream music library</string>
<string id="30511">Playback Mode</string>
<string id="30512">Force artwork caching</string>
@ -279,8 +279,8 @@
<string id="30514">Enable fast startup (requires server plugin)</string>
<string id="30515">Maximum items to request from the server at once</string>
<string id="30516">Playback</string>
<string id="30517">Network credentials</string>
<string id="30518">Enable Emby cinema mode</string>
<string id="30517">[COLOR yellow]Enter network credentials[/COLOR]</string>
<string id="30518">Enable Plex Trailers (Plexpass is needed)</string>
<string id="30519">Ask to play trailers</string>
<string id="30520">Skip Emby delete confirmation for the context menu (use at your own risk)</string>
<string id="30521">Jump back on resume (in seconds)</string>
@ -335,4 +335,58 @@
<string id="33032">Failed to generate a new device Id. See your logs for more information.</string>
<string id="33033">A new device Id has been generated. Kodi will now restart.</string>
<!-- New to Plex -->
<string id="39000">- Number of trailers to play before a movie</string>
<string id="39001">Boost audio when transcoding</string>
<string id="39002">Subtitle size when transcoding</string>
<string id="39003">Limit download sync threads (recommended for rpi: 1)</string>
<string id="39004">Enable Plex Companion</string>
<string id="39005">Plex Companion Port (change only if needed)</string>
<string id="39006">Activate Plex Companion debug log</string>
<string id="39007">Activate Plex Companion GDM debug log</string>
<string id="39008">Allows flinging media to Kodi through Plex</string>
<string id="39009">Could not login to plex.tv. Please try signing in again.</string>
<string id="39010">Problems connecting to plex.tv. Network or internet issue?</string>
<string id="39011">Could not find any Plex server in the network. Aborting...</string>
<string id="39012">Choose your Plex server</string>
<string id="39013">Not yet authorized for Plex server </string>
<string id="39014">Please sign in to plex.tv.</string>
<string id="39015">Problems connecting to server. Pick another server?</string>
<string id="39016">Disable Plex music library?</string>
<string id="39017">Would you now like to go to the plugin's settings?
(This is hopefully unneccessary ;-))</string>
<string id="39018">[COLOR yellow]Repair local database (force update all content)[/COLOR]</string>
<string id="39019">[COLOR yellow]Perform local database reset (full resync)[/COLOR]</string>
<string id="39020">[COLOR yellow]Cache all images to Kodi texture cache[/COLOR]</string>
<string id="39021">[COLOR yellow]Sync Emby Theme Media to Kodi[/COLOR]</string>
<!-- Plex Entrypoint.py -->
<string id="39200">Switch Plex Home User</string>
<string id="39201">Settings</string>
<string id="39202">Network credentials</string>
<string id="39203">Refresh Plex playlists/nodes</string>
<string id="39204">Perform manual library sync</string>
<string id="39205">Unable to run the sync, the add-on is not connected to a Plex server.</string>
<string id="39206">Plex might lock your account if you fail to log in too many times. Proceed anyway?</string>
<!-- Plex Artwork.py -->
<string id="39250">Running the image cache process can take some time. Are you sure you want continue?</string>
<string id="39251">Reset all existing cache data first?</string>
<!-- Plex PlexAPI.py -->
<string id="39300">: Enter plex.tv username. Or nothing to cancel.</string>
<string id="39301">Enter password for plex.tv user </string>
<string id="39302">Could not sign in user </string>
<string id="39303">Problems trying to contact plex.tv. Try again later</string>
<string id="39304">Go to https://plex.tv/pin and enter the code:
</string>
<string id="39305">Could not sign in to plex.tv. Try again later</string>
<string id="39306">: Select User</string>
<string id="39307">Enter PIN for user </string>
<string id="39308">Could not log in user </string>
<string id="39309">Please try again.</string>
</strings>

View file

@ -2,7 +2,7 @@
<strings>
<string id="30000">IP-Adresse des Servers</string>
<string id="30001">Automatisches Öffnen von Ordnern mit einem Eintrag</string>
<string id="30002">Via HTTP abspielen statt SMB/NFS:</string>
<string id="30002">Direct Play deaktivieren and Transkodieren erzwingen</string>
<string id="30004">Log Level:</string>
<string id="30005">Benutzername: </string>
<string id="30006">Passwort: </string>
@ -11,8 +11,21 @@
<string id="30009">Transkodieren: </string>
<string id="30010">Performancemessung aktivieren</string>
<string id="30011">Caching-Mechanismus</string>
<string id="30500">Host SSL Zertifikat überprüfen (sicherer)</string>
<string id="30507">Synchronisations-Fortschritt anzeigen</string>
<string id="30512">Zwischenspeichern von PMS Bildern erzwingen</string>
<string id="30509">Plex Musik-Bibliotheken aktivieren (Kodi Neustart!)</string>
<string id="30518">Plex Trailer aktivieren (Plexpass benötigt)</string>
<string id="30519">Nachfragen, ob Trailer gespielt werden sollen</string>
<string id="30522">H265 Codec Transkodierung erzwingen</string>
<string id="30517">Netzwerk Credentials eingeben</string>
<string id="30529">PlexKodiConnect Start Verzögerung (in Sekunden)</string>
<string id="30527">Extras ignorieren, wenn Nächste Episode gespielt wird</string>
<string id="30521">Bei Wiederaufnahme zurückspulen (in Sekunden)</string>
<string id="30505">[COLOR yellow]Anzahl Login-Versuche zurücksetzen[/COLOR]</string>
<string id="30014">Emby</string>
<string id="30014">Verbindung</string>
<string id="30015">Netzwerk</string>
<string id="30016">Gerätename</string>
@ -252,4 +265,56 @@
<string id="30311">Musikstücke</string>
<string id="30312">Kanäle</string>
<!-- New to Plex -->
<string id="39000">- Anzahl abzuspielender Trailer vor einem Film</string>
<string id="39001">Audio Verstärkung (audio boost) wenn transkodiert wird</string>
<string id="39002">Grösse des Untertitels wenn transkodiert wird</string>
<string id="39003">Anzahl Download Sync Threads beschränken (Empfehlung für rpi: 1)</string>
<string id="39004">Plex Companion aktivieren</string>
<string id="39005">Plex Companion Port (nur bei Bedarf ändern)</string>
<string id="39006">Plex Companion debug log aktivieren</string>
<string id="39007">Plex Companion GDM debug log aktivieren</string>
<string id="39008">Spiele Inhalt von anderen Plex Geräten ab</string>
<string id="39009">Login bei plex.tv fehlgeschlagen. Bitte erneut versuchen.</string>
<string id="39010">Netzwerk Verbindungsprobleme für plex.tv. Funktionieren Netzwerk und/oder Internet?</string>
<string id="39011">Konnte keine Plex Server im Netzwerk finden. Abbruch...</string>
<string id="39012">Wählen Sie Ihren Plex Server</string>
<string id="39013">Noch nicht authorisiert für Plex Server </string>
<string id="39014">Bitte loggen Sie sich in plex.tv ein.</string>
<string id="39015">Beim Verbinden mit dem Server sind Probleme aufgetreten. Mit einem anderen Server versuchen?</string>
<string id="39016">Plex Musik Bibliotheken deaktivieren?</string>
<string id="39017">Möchten Sie nun die Einstellungen des Plugins öffnen? (Was hoffentlich unnötig ist ;-))"</string>
<string id="39018">[COLOR yellow]Lokale Datenbank reparieren (allen Inhalt aktualisieren)[/COLOR]</string>
<string id="39019">[COLOR yellow]Lokale Datenbank zurücksetzen (kompletter Resync nötig)[/COLOR]</string>
<string id="39020">[COLOR yellow]Alle Plex Bilder in Kodi zwischenspeichern[/COLOR]</string>
<string id="39021">[COLOR yellow]Plex Themes zu Kodi synchronisieren[/COLOR]</string>
<!-- Plex Entrypoint.py -->
<string id="39200">Plex Home Benutzer wechseln</string>
<string id="39201">Einstellungen</string>
<string id="39202">Netzwerk Credentials</string>
<string id="39203">Plex Playlisten und Nodes zurücksetzen</string>
<string id="39204">Manuellen Scan der Plex Bibliotheken starten</string>
<string id="39205">Plex Bibliothek kann nicht gescannt werden, da keine Verbindung mit einem Plex Server besteht.</string>
<string id="39206">Plex könnte möglicherweise Ihren Account sperren, wenn Sie zu oft versuchen, sich erfolglos anzumelden. Trotzdem fortfahren?</string>
<!-- Plex Artwork.py -->
<string id="39250">Alle Plex Bilder in Kodi zwischenzuspeichern kann sehr lange dauern. Möchten Sie wirklich fortfahren?</string>
<string id="39251">Sollen erst alle bestehenden Bilder im Cache gelöscht werden?</string>
<!-- Plex PlexAPI.py -->
<string id="39300">: plex.tv Benutzernamen eingeben. Oder nichts, um abzubrechen.</string>
<string id="39301">Passwort eingeben für plex.tv Benutzer </string>
<string id="39302">Anmeldung fehlgeschlagen für Benutzer </string>
<string id="39303">Probleme beim Verbinden mit plex.tv. Bitte später erneut versuchen.</string>
<string id="39304">https://plex.tv/pin besuchen und den folgenden Code eingeben:
</string>
<string id="39305">Anmeldung bei plex.tv fehlgeschlagen. Bitte später erneut versuchen.</string>
<string id="39306">: Benutzer auswählen</string>
<string id="39307">PIN eingeben für Benutzer </string>
<string id="39308">Anmeldung fehlgeschlagen für Benutzer </string>
<string id="39309">Bitte erneut versuchen.</string>
</strings>

View file

@ -113,20 +113,23 @@ class PlexAPI():
Also writes 'plexLogin' and 'token_plex.tv' to Kodi settings file
If not logged in, empty strings are returned for both.
"""
string = self.__language__
retrievedPlexLogin = ''
plexLogin = 'dummy'
authtoken = ''
while retrievedPlexLogin == '' and plexLogin != '':
dialog = xbmcgui.Dialog()
# Enter plex.tv username. Or nothing to cancel.
plexLogin = dialog.input(
self.addonName +
': Enter plex.tv username. Or nothing to cancel.',
self.addonName + string(39300),
type=xbmcgui.INPUT_ALPHANUM,
)
if plexLogin != "":
dialog = xbmcgui.Dialog()
# Enter password for plex.tv user
plexPassword = dialog.input(
'Enter password for plex.tv user %s' % plexLogin,
string(39301) + plexLogin,
type=xbmcgui.INPUT_ALPHANUM,
option=xbmcgui.ALPHANUM_HIDE_INPUT
)
@ -139,8 +142,8 @@ class PlexAPI():
% (plexLogin, authtoken), 1)
if plexLogin == '':
dialog = xbmcgui.Dialog()
dialog.ok(self.addonName, 'Could not sign in user %s'
% plexLogin)
# Could not sign in user
dialog.ok(self.addonName, string(39302) + plexLogin)
# Write to Kodi settings file
utils.settings('plexLogin', value=retrievedPlexLogin)
utils.settings('plexToken', value=authtoken)
@ -159,16 +162,17 @@ class PlexAPI():
}
Returns False if authentication did not work.
"""
string = self.__language__
code, identifier = self.GetPlexPin()
dialog = xbmcgui.Dialog()
if not code:
dialog.ok(self.addonName,
'Problems trying to contact plex.tv',
'Try again later')
# Problems trying to contact plex.tv. Try again later
dialog.ok(self.addonName, string(39303))
return False
# Go to https://plex.tv/pin and enter the code:
answer = dialog.yesno(self.addonName,
'Go to https://plex.tv/pin and enter the code:',
'',
string(39304),
code)
if not answer:
return False
@ -182,9 +186,8 @@ class PlexAPI():
xbmc.sleep(5000)
count += 1
if not xml:
dialog.ok(self.addonName,
'Could not sign in to plex.tv',
'Try again later')
# Could not sign in to plex.tv Try again later
dialog.ok(self.addonName, string(39305))
return False
# Parse xml
home = xml.get('home', '0')
@ -1043,6 +1046,8 @@ class PlexAPI():
Will return empty strings if failed.
"""
string = self.__language__
plexLogin = utils.settings('plexLogin')
plexToken = utils.settings('plexToken')
machineIdentifier = utils.settings('plex_machineIdentifier')
@ -1066,7 +1071,8 @@ class PlexAPI():
while trials < 3:
if usernumber > 1:
dialog = xbmcgui.Dialog()
user_select = dialog.select(self.addonName + ": Select User",
# Select user
user_select = dialog.select(self.addonName + string(39306),
userlist)
if user_select == -1:
self.logMsg("No user selected.", 1)
@ -1083,8 +1089,9 @@ class PlexAPI():
# Ask for PIN, if protected:
if user['protected'] == '1':
dialog = xbmcgui.Dialog()
# Please enter pin for user
pin = dialog.input(
'Enter PIN for user %s' % selected_user,
string(39307) + selected_user,
type=xbmcgui.INPUT_NUMERIC,
option=xbmcgui.ALPHANUM_HIDE_INPUT
)
@ -1100,10 +1107,11 @@ class PlexAPI():
# Couldn't get user auth
if not username:
dialog = xbmcgui.Dialog()
# Could not login user, please try again
dialog.ok(
self.addonName,
'Could not log in user %s' % selected_user,
'Please try again.'
string(39308) + selected_user,
string(39309)
)
# Successfully retrieved: break out of while loop
else:

View file

@ -159,8 +159,10 @@ class Artwork():
def FullTextureCacheSync(self):
# This method will sync all Kodi artwork to textures13.db
# and cache them locally. This takes diskspace!
if not xbmcgui.Dialog().yesno("Image Texture Cache", "Running the image cache process can take some time.", "Are you sure you want continue?"):
import xbmcaddon
string = xbmcaddon.Addon().getLocalizedString
if not xbmcgui.Dialog().yesno("Image Texture Cache", string(39250)):
return
self.logMsg("Doing Image Cache Sync", 1)
@ -169,7 +171,7 @@ class Artwork():
dialog.create("Emby for Kodi", "Image Cache Sync")
# ask to rest all existing or not
if xbmcgui.Dialog().yesno("Image Texture Cache", "Reset all existing cache data first?", ""):
if xbmcgui.Dialog().yesno("Image Texture Cache", string(39251), ""):
self.logMsg("Resetting all cache data first", 1)
# Remove all existing textures first
path = xbmc.translatePath("special://thumbnails/").decode('utf-8')

View file

@ -17,12 +17,10 @@ import artwork
import utils
import clientinfo
import downloadutils
import librarysync
import read_embyserver as embyserver
import embydb_functions as embydb
import playbackutils as pbutils
import playutils
import PlexAPI
import playlist
import PlexFunctions
@ -141,11 +139,10 @@ def doPlayback(itemid, dbid):
##### DO RESET AUTH #####
def resetAuth():
# User tried login and failed too many times
string = xbmcaddon.Addon().getLocalizedString
resp = xbmcgui.Dialog().yesno(
heading="Warning",
line1=(
"Plex might lock your account if you fail to log in too many times. "
"Proceed anyway?"))
heading="Warning",
line1=string(39206))
if resp == 1:
utils.logMsg("PLEX", "Reset login attempts.", 1)
utils.window('emby_serverStatus', value="Auth")
@ -160,6 +157,7 @@ def addDirectoryItem(label, path, folder=True):
xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]), url=path, listitem=li, isFolder=folder)
def doMainListing():
string = xbmcaddon.Addon().getLocalizedString
xbmcplugin.setContent(int(sys.argv[1]), 'files')
# Get emby nodes from the window props
embyprops = utils.window('Emby.nodes.total')
@ -182,7 +180,7 @@ def doMainListing():
# Plex user switch, if Plex home is in use
if utils.settings('plexhome') == 'true':
addDirectoryItem("Switch Plex Home User",
addDirectoryItem(string(39200),
"plugin://plugin.video.plexkodiconnect/"
"?mode=switchuser")
@ -191,16 +189,11 @@ def doMainListing():
# addDirectoryItem("Live Tv Recordings (experimental)", "plugin://plugin.video.plexkodiconnect/?mode=browsecontent&type=recordings&folderid=root")
# some extra entries for settings and stuff. TODO --> localize the labels
addDirectoryItem("Settings", "plugin://plugin.video.plexkodiconnect/?mode=settings")
addDirectoryItem("Network credentials", "plugin://plugin.video.plexkodiconnect/?mode=passwords")
addDirectoryItem(string(39201), "plugin://plugin.video.plexkodiconnect/?mode=settings")
# addDirectoryItem("Add user to session", "plugin://plugin.video.plexkodiconnect/?mode=adduser")
addDirectoryItem("Refresh Plex playlists/nodes", "plugin://plugin.video.plexkodiconnect/?mode=refreshplaylist")
addDirectoryItem("Perform manual library sync", "plugin://plugin.video.plexkodiconnect/?mode=manualsync")
addDirectoryItem("Repair local database (force update all content)", "plugin://plugin.video.plexkodiconnect/?mode=repair")
addDirectoryItem("Perform local database reset (full resync)", "plugin://plugin.video.plexkodiconnect/?mode=reset")
addDirectoryItem("Cache all images to Kodi texture cache", "plugin://plugin.video.plexkodiconnect/?mode=texturecache")
addDirectoryItem("Sync Emby Theme Media to Kodi", "plugin://plugin.video.plexkodiconnect/?mode=thememedia")
addDirectoryItem(string(39203), "plugin://plugin.video.plexkodiconnect/?mode=refreshplaylist")
addDirectoryItem(string(39204), "plugin://plugin.video.plexkodiconnect/?mode=manualsync")
xbmcplugin.endOfDirectory(int(sys.argv[1]))
@ -1127,4 +1120,14 @@ def getExtraFanArt():
utils.logMsg("EMBY", "Error getting extrafanart: %s" % e, 1)
# Always do endofdirectory to prevent errors in the logs
xbmcplugin.endOfDirectory(int(sys.argv[1]))
xbmcplugin.endOfDirectory(int(sys.argv[1]))
def RunLibScan(mode):
if utils.window('emby_online') != "true":
# Server is not online, do not run the sync
string = xbmcaddon.Addon().getLocalizedString
xbmcgui.Dialog().ok(heading=addonName,
line1=string(39205))
else:
utils.window('plex_runLibScan', value='full')

View file

@ -36,6 +36,7 @@ class InitialSetup():
Check server, user, direct paths, music, direct stream if not direct
path.
"""
string = self.__language__
# SERVER INFO #####
self.logMsg("Initial setup called.", 0)
server = self.userClient.getServer()
@ -51,10 +52,10 @@ class InitialSetup():
chk = self.plx.CheckConnection('plex.tv', plexToken)
# HTTP Error: unauthorized
if chk == 401:
# Could not login, please try again
dialog.ok(
self.addonName,
'Could not login to plex.tv.',
'Please try signing in again.'
string(39009)
)
result = self.plx.PlexTvSignInWithPin()
if result:
@ -63,8 +64,7 @@ class InitialSetup():
elif chk is False or chk >= 400:
dialog.ok(
self.addonName,
'Problems connecting to plex.tv.',
'Network or internet issue?'
string(39010)
)
# If a Plex server IP has already been set, return.
if server:
@ -99,8 +99,7 @@ class InitialSetup():
if len(serverlist) == 0:
dialog.ok(
self.addonName,
'Could not find any Plex server in the network.'
'Aborting...'
string(39011)
)
break
for server in serverlist:
@ -110,7 +109,7 @@ class InitialSetup():
else:
dialoglist.append(str(server['name']))
resp = dialog.select(
'Choose your Plex server',
string(39012),
dialoglist)
server = serverlist[resp]
activeServer = server['machineIdentifier']
@ -129,9 +128,8 @@ class InitialSetup():
# Unauthorized
if chk == 401:
dialog.ok(self.addonName,
'Not yet authorized for Plex server %s'
% str(server['name']),
'Please sign in to plex.tv.')
string(39013) + str(server['name']),
string(39014))
result = self.plx.PlexTvSignInWithPin()
if result:
plexLogin = result['username']
@ -142,8 +140,7 @@ class InitialSetup():
# Problems connecting
elif chk >= 400 or chk is False:
resp = dialog.yesno(self.addonName,
'Problems connecting to server.',
'Pick another server?')
string(39015))
# Exit while loop if user chooses No
if not resp:
break
@ -169,33 +166,26 @@ class InitialSetup():
server['scheme']), 0)
# ADDITIONAL PROMPTS #####
directPaths = dialog.yesno(
heading="%s: Playback Mode" % self.addonName,
line1=(
"Caution! If you choose Native mode, you "
"will probably lose access to certain Plex "
"features."),
nolabel="Addon (Default)",
yeslabel="Native (Direct Paths)")
if directPaths:
self.logMsg("User opted to use direct paths.", 1)
utils.settings('useDirectPaths', value="1")
# directPaths = dialog.yesno(
# heading="%s: Playback Mode" % self.addonName,
# line1=(
# "Caution! If you choose Native mode, you "
# "will probably lose access to certain Plex "
# "features."),
# nolabel="Addon (Default)",
# yeslabel="Native (Direct Paths)")
# if directPaths:
# self.logMsg("User opted to use direct paths.", 1)
# utils.settings('useDirectPaths', value="1")
musicDisabled = dialog.yesno(
heading="%s: Music Library" % self.addonName,
line1="Disable Plex music library?")
if musicDisabled:
if dialog.yesno(
heading=self.addonName,
line1=string(39016)):
self.logMsg("User opted to disable Plex music library.", 1)
utils.settings('enableMusic', value="false")
else:
# Only prompt if the user didn't select direct paths for videos
if not directPaths:
musicAccess = dialog.yesno(
heading="%s: Music Library" % self.addonName,
line1=(
"Direct stream the music library? Select "
"this option only if you plan on listening "
"to music outside of your network."))
if musicAccess:
self.logMsg("User opted to direct stream music.", 1)
utils.settings('streamMusic', value="true")
if dialog.yesno(
heading=self.addonName,
line1=string(39017)):
xbmc.executebuiltin(
'Addon.OpenSettings(plugin.video.plexkodiconnect)')

View file

@ -13,7 +13,7 @@ import downloadutils
@utils.logging
class Read_EmbyServer():
limitIndex = int(utils.settings('limitindex'))
# limitIndex = int(utils.settings('limitindex'))
def __init__(self):

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<settings>
<category label="30014"><!-- Emby -->
<category label="30014"><!-- Connection -->
<!-- Primary address -->
<setting id="ipaddress" label="30000" type="text" default="" />
<setting id="port" label="30030" type="number" default="32400" />
@ -8,7 +8,7 @@
<setting id="sslverify" subsetting="true" label="30500" type="bool" default="false" visible="eq(-1,true)" />
<setting id="sslcert" subsetting="true" label="30501" type="file" default="None" visible="eq(-2,true)" />
<!-- Secondary address -->
<setting id="altip" label="30502" type="bool" default="false" />
<setting id="altip" label="30502" type="bool" default="false" visible="false"/>
<setting id="secondipaddress" subsetting="true" label="30503" type="text" default="" visible="eq(-1,true)" />
<setting id="secondport" subsetting="true" label="30030" type="number" default="8096" visible="eq(-2,true)" />
<setting id="secondhttps" subsetting="true" label="30243" type="bool" default="false" visible="eq(-3,true)" />
@ -16,9 +16,9 @@
<setting id="secondsslcert" subsetting="true" label="30501" type="file" default="None" visible="eq(-2,true)" />
<!-- User settings -->
<setting type="sep" />
<setting id="deviceNameOpt" label="30504" type="bool" default="false" />
<setting id="deviceName" label="30016" type="text" visible="eq(-1,true)" default="Kodi" />
<setting label="30505" type="action" visible="eq(1,) + !eq(-15,)" action="RunPlugin(plugin://plugin.video.plexkodiconnect?mode=resetauth)" option="close" />
<setting label="30517" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect?mode=passwords)" option="close" /><!-- Network credentials -->
<setting id="accessToken" type="text" visible="false" default="" />
<setting id="pathsub" type="bool" visible="false" default="false" />
</category>
@ -27,70 +27,75 @@
<!-- Primary address -->
<setting id="myplexlogin" label="Log into plex.tv?" type="bool" default="true" />
<setting id="plexLogin" label="plex.tv username" type="text" default="" visible="eq(-1,true)" />
<setting id="plexhome" label="Plex home in use" type="bool" default="true" visible="false" />
<setting id="plexToken" label="plexToken" type="text" default="" visible="false" />
</category>
<category label="Plex Companion">
<setting type="lsep" label="39008" />
<setting id="plexCompanion" label="39004" type="bool" default="true" />
<setting id="deviceNameOpt" label="30504" type="bool" default="false" />
<setting id="companionPort" label="39005" type="number" default="3005" option="int" visible="eq(-1,true)"/>
<setting id="companionDebugging" label="39006" type="bool" default="false" visible="eq(-3,true)"/>
<setting id="companionGDMDebugging" label="39007" type="bool" default="false" visible="eq(-4,true)"/>
</category>
<category label="30506"><!-- Sync Options -->
<setting id="serverSync" type="bool" label="30514" default="true" />
<setting id="serverSync" type="bool" label="30514" default="true" visible="false"/><!-- Enable fast startup (requires server plugin) -->
<setting id="dbSyncIndicator" label="30507" type="bool" default="false" />
<setting type="sep" />
<setting id="limitindex" type="number" label="30515" default="200" option="int" />
<setting id="enableTextureCache" label="30512" type="bool" default="true" />
<setting id="imageCacheLimit" type="enum" label="30513" values="Disabled|5|10|15|20|25" default="0" visible="eq(-1,true)" subsetting="true" />
<setting id="syncEmptyShows" type="bool" label="30508" default="false" />
<setting id="useDirectPaths" type="enum" label="30511" values="Addon(Default)|Native(Direct paths)" default="0" />
<setting type="sep" /><!-- show syncing progress -->
<setting id="limitindex" type="number" label="30515" default="200" option="int" visible="false"/><!-- Maximum items to request from the server at once -->
<setting id="enableTextureCache" label="30512" type="bool" default="true" /> <!-- Force Artwork Caching -->
<setting id="imageCacheLimit" type="enum" label="30513" values="Disabled|5|10|15|20|25" default="5" visible="eq(-1,true)" subsetting="true" /> <!-- Limit artwork cache threads -->
<setting id="syncThreadNumber" type="slider" label="39003" default="5" option="int" range="1,1,20"/>
<setting id="syncEmptyShows" type="bool" label="30508" default="false" visible="false"/>
<setting id="useDirectPaths" type="enum" label="30511" values="Addon(Default)|Native(Direct paths)" default="0" visible="false"/> <!-- Playback mode -->
<setting id="enableMusic" type="bool" label="30509" default="true" />
<setting id="streamMusic" type="bool" label="30510" default="false" visible="eq(-1,true)" subsetting="true" />
<setting type="lsep" label="30523" />
<setting id="enableImportSongRating" type="bool" label="30524" default="true" />
<setting id="enableExportSongRating" type="bool" label="30525" default="false" />
<setting id="enableUpdateSongRating" type="bool" label="30526" default="false" />
<setting id="streamMusic" type="bool" label="30510" default="false" visible="false" subsetting="true"/> <!-- Direct stream Music library -->
<setting type="lsep" label="30523" visible="false"/> <!-- Music metadata options -->
<setting id="enableImportSongRating" type="bool" label="30524" default="true" visible="false"/>
<setting id="enableExportSongRating" type="bool" label="30525" default="false" visible="false" />
<setting id="enableUpdateSongRating" type="bool" label="30526" default="false" visible="false" />
</category>
<category label="30516"><!-- Playback -->
<setting label="30517" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect?mode=passwords)" option="close" />
<setting type="sep" />
<setting id="enableCinema" type="bool" label="30518" default="true" />
<setting id="askCinema" type="bool" label="30519" default="false" visible="eq(-1,true)" subsetting="true" />
<setting id="trailerNumber" type="number" label="Number of trailers to play before movie" default="3" visible="eq(-2,true)" option="int" />
<setting id="offerDelete" type="bool" label="30114" default="false" />
<setting id="trailerNumber" type="slider" label="39000" default="3" visible="eq(-2,true)" range="1,1,15" option="int" />
<setting id="ignoreSpecialsNextEpisodes" type="bool" label="30527" default="false" />
<setting id="offerDelete" type="bool" label="30114" default="false" visible="false"/>
<setting id="deleteTV" type="bool" label="30115" visible="eq(-1,true)" default="false" subsetting="true" />
<setting id="deleteMovies" type="bool" label="30116" visible="eq(-2,true)" default="false" subsetting="true" />
<setting id="resumeJumpBack" type="slider" label="30521" default="10" range="0,1,120" option="int" />
<setting type="sep" />
<setting id="playFromStream" type="bool" label="30002" default="false" />
<setting id="transcoderVideoQualities" type="enum" label="30160" values="420x420, 320Kbps|576x320, 720Kbps|720x480, 1.5Mbps|1024x768, 2Mbps|1280x720, 3Mbps|1280x720, 4Mbps|1920x1080, 8Mbps|1920x1080, 10Mbps|1920x1080, 12Mbps|1920x1080, 20Mbps|1920x1080, 40Mbps" visible="eq(-1,true)" default="11" />
<setting id="audioBoost" type="slider" label="Boost audio when transcoding" default="0" range="0,10,100" option="int"/>
<setting id="audioBoost" type="slider" label="39001" default="0" range="0,10,100" option="int"/>
<setting id="transcodeH265" type="enum" label="30522" default="0" values="Disabled (default)|480p (and higher)|720p (and higher)|1080p" />
<setting id="subtitleSize" label="Subtitle size when transcoding" type="slider" option="int" range="0,30,300" default="100" />
<setting id="subtitleSize" label="39002" type="slider" option="int" range="0,30,300" default="100" />
<setting id="markPlayed" type="number" visible="false" default="95" />
<setting id="failedCount" type="number" visible="false" default="0" />
<setting id="networkCreds" type="text" visible="false" default="" />
</category>
<category label="30235"><!-- Extras -->
<setting id="enableCoverArt" type="bool" label="30157" default="true" />
<setting id="ignoreSpecialsNextEpisodes" type="bool" label="30527" default="false" />
<setting id="skipContextMenu" type="bool" label="30520" default="false" />
<setting id="additionalUsers" type="text" label="30528" default="" />
<setting type="lsep" label="30534" />
<setting id="connectMsg" type="bool" label="30249" default="true" />
<setting id="restartMsg" type="bool" label="30530" default="false" />
<setting id="newContent" type="bool" label="30531" default="false" />
<setting id="newvideotime" type="number" label="30532" visible="eq(-1,true)" default="5" option="int" subsetting="true" />
<setting id="newmusictime" type="number" label="30533" visible="eq(-2,true)" default="2" option="int" subsetting="true" />
<!--
<category label="30235" visible="false">
<setting id="enableCoverArt" type="bool" label="30157" default="true" visible="false"/>
<setting id="skipContextMenu" type="bool" label="30520" default="false" visible="false"/>
<setting id="additionalUsers" type="text" label="30528" default="" visible="false"/>
<setting type="lsep" label="30534" visible="false" />
<setting id="connectMsg" type="bool" label="30249" default="true" visible="false" />
<setting id="restartMsg" type="bool" label="30530" default="false" visible="false" />
<setting id="newContent" type="bool" label="30531" default="false" visible="false" />
<setting id="newvideotime" type="number" label="30532" visible="false" default="5" option="int" subsetting="true" />
<setting id="newmusictime" type="number" label="30533" visible="false" default="2" option="int" subsetting="true" />
</category>
-->
<category label="30022"><!-- Advanced -->
<setting id="logLevel" type="enum" label="30004" values="Disabled|Info|Debug" default="1" />
<setting id="startupDelay" type="number" label="30529" default="0" option="int" />
<setting label="30239" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect?mode=reset)" option="close" />
<setting id="syncThreadNumber" type="number" label="Number of parallel threads while syncing" default="5" option="int"/>
</category>
<category label="Plex Companion">
<setting id="plexCompanion" label="Enable Plex Companion" type="bool" default="true" />
<setting id="companionPort" label="Plex Companion Port" type="number" default="3005" option="int" visible="eq(-1,true)"/>
<setting id="companionDebugging" label="Plex Companion Debugging" type="bool" default="false" visible="eq(-2,true)"/>
<setting id="companionGDMDebugging" label="Plex Companion GDM Debugging" type="bool" default="false" visible="eq(-3,true)"/>
<setting label="39018" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect/?mode=repair)" option="close" /> <!-- Repair local database (force update all content) -->
<setting label="39019" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect/?mode=reset)" option="close" /> <!-- Perform local database reset (full resync) -->
<setting label="39020" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect/?mode=texturecache)" option="close" /> <!-- Cache all images to Kodi texture cache -->
<setting label="39021" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect/?mode=thememedia)" option="close" visible="false" /> <!-- Sync Plex Theme Media to Kodi -->
</category>
</settings>