mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-05-09 19:05:09 +00:00
Strings - translation
This commit is contained in:
parent
924c3a4a05
commit
3e1aa94c78
10 changed files with 201 additions and 252 deletions
|
@ -30,21 +30,19 @@ log = Logging('Entrypoint').log
|
|||
#################################################################################################
|
||||
|
||||
|
||||
def doPlayback(itemid, dbid):
|
||||
def doPlayback(itemId, dbId):
|
||||
|
||||
emby = embyserver.Read_EmbyServer()
|
||||
item = emby.getItem(itemid)
|
||||
pbutils.PlaybackUtils(item).play(itemid, dbid)
|
||||
item = emby.getItem(itemId)
|
||||
pbutils.PlaybackUtils(item).play(itemId, dbId)
|
||||
|
||||
##### DO RESET AUTH #####
|
||||
def resetAuth():
|
||||
# User tried login and failed too many times
|
||||
resp = xbmcgui.Dialog().yesno(
|
||||
heading="Warning",
|
||||
line1=(
|
||||
"Emby might lock your account if you fail to log in too many times. "
|
||||
"Proceed anyway?"))
|
||||
if resp == 1:
|
||||
heading=lang(30132),
|
||||
line1=lang(33050))
|
||||
if resp:
|
||||
log("Reset login attempts.", 1)
|
||||
window('emby_serverStatus', value="Auth")
|
||||
else:
|
||||
|
@ -58,6 +56,7 @@ def addDirectoryItem(label, path, folder=True):
|
|||
xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]), url=path, listitem=li, isFolder=folder)
|
||||
|
||||
def doMainListing():
|
||||
|
||||
xbmcplugin.setContent(int(sys.argv[1]), 'files')
|
||||
# Get emby nodes from the window props
|
||||
embyprops = window('Emby.nodes.total')
|
||||
|
@ -68,39 +67,54 @@ def doMainListing():
|
|||
if not path:
|
||||
path = window('Emby.nodes.%s.content' % i)
|
||||
label = window('Emby.nodes.%s.title' % i)
|
||||
node_type = window('Emby.nodes.%s.type' % i)
|
||||
#because we do not use seperate entrypoints for each content type, we need to figure out which items to show in each listing.
|
||||
#for now we just only show picture nodes in the picture library video nodes in the video library and all nodes in any other window
|
||||
if path and xbmc.getCondVisibility("Window.IsActive(Pictures)") and node_type == "photos":
|
||||
addDirectoryItem(label, path)
|
||||
elif path and xbmc.getCondVisibility("Window.IsActive(VideoLibrary)") and node_type != "photos":
|
||||
addDirectoryItem(label, path)
|
||||
elif path and not xbmc.getCondVisibility("Window.IsActive(VideoLibrary) | Window.IsActive(Pictures) | Window.IsActive(MusicLibrary)"):
|
||||
addDirectoryItem(label, path)
|
||||
node = window('Emby.nodes.%s.type' % i)
|
||||
|
||||
''' because we do not use seperate entrypoints for each content type,
|
||||
we need to figure out which items to show in each listing.
|
||||
for now we just only show picture nodes in the picture library
|
||||
video nodes in the video library and all nodes in any other window '''
|
||||
|
||||
#experimental live tv nodes
|
||||
addDirectoryItem("Live Tv Channels (experimental)", "plugin://plugin.video.emby/?mode=browsecontent&type=tvchannels&folderid=root")
|
||||
addDirectoryItem("Live Tv Recordings (experimental)", "plugin://plugin.video.emby/?mode=browsecontent&type=recordings&folderid=root")
|
||||
'''if path and xbmc.getCondVisibility("Window.IsActive(Pictures)") and node == "photos":
|
||||
addDirectoryItem(label, path)
|
||||
elif path and xbmc.getCondVisibility("Window.IsActive(VideoLibrary)")
|
||||
and node != "photos":
|
||||
addDirectoryItem(label, path)
|
||||
elif path and not xbmc.getCondVisibility("Window.IsActive(VideoLibrary) |
|
||||
Window.IsActive(Pictures) | Window.IsActive(MusicLibrary)"):
|
||||
addDirectoryItem(label, path)'''
|
||||
|
||||
if path:
|
||||
if xbmc.getCondVisibility("Window.IsActive(Pictures)") and node == "photos":
|
||||
addDirectoryItem(label, path)
|
||||
elif xbmc.getCondVisibility("Window.IsActive(VideoLibrary)") and node != "photos":
|
||||
addDirectoryItem(label, path)
|
||||
else:
|
||||
addDirectoryItem(label, path)
|
||||
|
||||
# experimental live tv nodes
|
||||
if not xbmc.getCondVisibility("Window.IsActive(Pictures)"):
|
||||
addDirectoryItem(lang(33051),
|
||||
"plugin://plugin.video.emby/?mode=browsecontent&type=tvchannels&folderid=root")
|
||||
addDirectoryItem(lang(33052),
|
||||
"plugin://plugin.video.emby/?mode=browsecontent&type=recordings&folderid=root")
|
||||
|
||||
# some extra entries for settings and stuff. TODO --> localize the labels
|
||||
addDirectoryItem("Network credentials", "plugin://plugin.video.emby/?mode=passwords")
|
||||
addDirectoryItem("Settings", "plugin://plugin.video.emby/?mode=settings")
|
||||
addDirectoryItem("Add user to session", "plugin://plugin.video.emby/?mode=adduser")
|
||||
addDirectoryItem("Refresh Emby playlists/nodes", "plugin://plugin.video.emby/?mode=refreshplaylist")
|
||||
addDirectoryItem("Perform manual sync", "plugin://plugin.video.emby/?mode=manualsync")
|
||||
addDirectoryItem("Repair local database (force update all content)", "plugin://plugin.video.emby/?mode=repair")
|
||||
addDirectoryItem("Perform local database reset (full resync)", "plugin://plugin.video.emby/?mode=reset")
|
||||
addDirectoryItem("Cache all images to Kodi texture cache", "plugin://plugin.video.emby/?mode=texturecache")
|
||||
addDirectoryItem("Sync Emby Theme Media to Kodi", "plugin://plugin.video.emby/?mode=thememedia")
|
||||
addDirectoryItem(lang(30517), "plugin://plugin.video.emby/?mode=passwords")
|
||||
addDirectoryItem(lang(33053), "plugin://plugin.video.emby/?mode=settings")
|
||||
addDirectoryItem(lang(33054), "plugin://plugin.video.emby/?mode=adduser")
|
||||
addDirectoryItem(lang(33055), "plugin://plugin.video.emby/?mode=refreshplaylist")
|
||||
addDirectoryItem(lang(33056), "plugin://plugin.video.emby/?mode=manualsync")
|
||||
addDirectoryItem(lang(33057), "plugin://plugin.video.emby/?mode=repair")
|
||||
addDirectoryItem(lang(33058), "plugin://plugin.video.emby/?mode=reset")
|
||||
addDirectoryItem(lang(33059), "plugin://plugin.video.emby/?mode=texturecache")
|
||||
addDirectoryItem(lang(33060), "plugin://plugin.video.emby/?mode=thememedia")
|
||||
|
||||
xbmcplugin.endOfDirectory(int(sys.argv[1]))
|
||||
|
||||
|
||||
##### Generate a new deviceId
|
||||
def resetDeviceId():
|
||||
|
||||
dialog = xbmcgui.Dialog()
|
||||
language = utils.language
|
||||
|
||||
deviceId_old = window('emby_deviceId')
|
||||
try:
|
||||
|
@ -109,8 +123,8 @@ def resetDeviceId():
|
|||
except Exception as e:
|
||||
log("Failed to generate a new device Id: %s" % e, 1)
|
||||
dialog.ok(
|
||||
heading="Emby for Kodi",
|
||||
line1=language(33032))
|
||||
heading=lang(29999),
|
||||
line1=lang(33032))
|
||||
else:
|
||||
log("Successfully removed old deviceId: %s New deviceId: %s" % (deviceId_old, deviceId), 1)
|
||||
dialog.ok(
|
||||
|
@ -123,21 +137,21 @@ def deleteItem():
|
|||
|
||||
# Serves as a keymap action
|
||||
if xbmc.getInfoLabel('ListItem.Property(embyid)'): # If we already have the embyid
|
||||
embyid = xbmc.getInfoLabel('ListItem.Property(embyid)')
|
||||
itemId = xbmc.getInfoLabel('ListItem.Property(embyid)')
|
||||
else:
|
||||
dbid = xbmc.getInfoLabel('ListItem.DBID')
|
||||
itemtype = xbmc.getInfoLabel('ListItem.DBTYPE')
|
||||
dbId = xbmc.getInfoLabel('ListItem.DBID')
|
||||
itemType = xbmc.getInfoLabel('ListItem.DBTYPE')
|
||||
|
||||
if not itemtype:
|
||||
if not itemType:
|
||||
|
||||
if xbmc.getCondVisibility('Container.Content(albums)'):
|
||||
itemtype = "album"
|
||||
itemType = "album"
|
||||
elif xbmc.getCondVisibility('Container.Content(artists)'):
|
||||
itemtype = "artist"
|
||||
itemType = "artist"
|
||||
elif xbmc.getCondVisibility('Container.Content(songs)'):
|
||||
itemtype = "song"
|
||||
itemType = "song"
|
||||
elif xbmc.getCondVisibility('Container.Content(pictures)'):
|
||||
itemtype = "picture"
|
||||
itemType = "picture"
|
||||
else:
|
||||
log("Unknown type, unable to proceed.", 1)
|
||||
return
|
||||
|
@ -145,7 +159,7 @@ def deleteItem():
|
|||
embyconn = utils.kodiSQL('emby')
|
||||
embycursor = embyconn.cursor()
|
||||
emby_db = embydb.Embydb_Functions(embycursor)
|
||||
item = emby_db.getItem_byKodiId(dbid, itemtype)
|
||||
item = emby_db.getItem_byKodiId(dbId, itemType)
|
||||
embycursor.close()
|
||||
|
||||
try:
|
||||
|
@ -156,17 +170,13 @@ def deleteItem():
|
|||
|
||||
if settings('skipContextMenu') != "true":
|
||||
resp = xbmcgui.Dialog().yesno(
|
||||
heading="Confirm delete",
|
||||
line1=("Delete file from Emby Server? This will "
|
||||
"also delete the file(s) from disk!"))
|
||||
heading=lang(29999),
|
||||
line1=lang(33041))
|
||||
if not resp:
|
||||
log("User skipped deletion for: %s." % embyid, 1)
|
||||
log("User skipped deletion for: %s." % itemId, 1)
|
||||
return
|
||||
|
||||
doUtils = downloadutils.DownloadUtils()
|
||||
url = "{server}/emby/Items/%s?format=json" % embyid
|
||||
log("Deleting request: %s" % embyid, 0)
|
||||
doUtils.downloadUrl(url, action_type="DELETE")
|
||||
embyserver.Read_EmbyServer().deleteItem(itemId)
|
||||
|
||||
##### ADD ADDITIONAL USERS #####
|
||||
def addUser():
|
||||
|
@ -203,7 +213,7 @@ def addUser():
|
|||
# Display dialog if there's additional users
|
||||
if additionalUsers:
|
||||
|
||||
option = dialog.select("Add/Remove user from the session", ["Add user", "Remove user"])
|
||||
option = dialog.select(lang(33061), [lang(33062), lang(33063)])
|
||||
# Users currently in the session
|
||||
additionalUserlist = {}
|
||||
additionalUsername = []
|
||||
|
@ -216,15 +226,15 @@ def addUser():
|
|||
|
||||
if option == 1:
|
||||
# User selected Remove user
|
||||
resp = dialog.select("Remove user from the session", additionalUsername)
|
||||
resp = dialog.select(lang(33064), additionalUsername)
|
||||
if resp > -1:
|
||||
selected = additionalUsername[resp]
|
||||
selected_userId = additionalUserlist[selected]
|
||||
url = "{server}/emby/Sessions/%s/Users/%s" % (sessionId, selected_userId)
|
||||
doUtils.downloadUrl(url, postBody={}, action_type="DELETE")
|
||||
dialog.notification(
|
||||
heading="Success!",
|
||||
message="%s removed from viewing session" % selected,
|
||||
heading=lang(29999),
|
||||
message="%s %s" % (lang(33066), selected),
|
||||
icon="special://home/addons/plugin.video.emby/icon.png",
|
||||
time=1000)
|
||||
|
||||
|
@ -256,16 +266,16 @@ def addUser():
|
|||
url = "{server}/emby/Sessions/%s/Users/%s" % (sessionId, selected_userId)
|
||||
doUtils.downloadUrl(url, postBody={}, action_type="POST")
|
||||
dialog.notification(
|
||||
heading="Success!",
|
||||
message="%s added to viewing session" % selected,
|
||||
heading=lang(29999),
|
||||
message="%s %s" % (lang(33067), selected),
|
||||
icon="special://home/addons/plugin.video.emby/icon.png",
|
||||
time=1000)
|
||||
|
||||
except:
|
||||
log("Failed to add user to session.")
|
||||
dialog.notification(
|
||||
heading="Error",
|
||||
message="Unable to add/remove user from the session.",
|
||||
heading=lang(29999),
|
||||
message=lang(33068),
|
||||
icon=xbmcgui.NOTIFICATION_ERROR)
|
||||
|
||||
# Add additional user images
|
||||
|
@ -297,7 +307,7 @@ def getThemeMedia():
|
|||
playback = None
|
||||
|
||||
# Choose playback method
|
||||
resp = dialog.select("Playback method for your themes", ["Direct Play", "Direct Stream"])
|
||||
resp = dialog.select(lang(33072), [lang(30165), lang(33071)])
|
||||
if resp == 0:
|
||||
playback = "DirectPlay"
|
||||
elif resp == 1:
|
||||
|
@ -322,11 +332,7 @@ def getThemeMedia():
|
|||
else:
|
||||
# if it does not exist this will not work so warn user
|
||||
# often they need to edit the settings first for it to be created.
|
||||
dialog.ok(
|
||||
heading="Warning",
|
||||
line1=(
|
||||
"The settings file does not exist in tvtunes. ",
|
||||
"Go to the tvtunes addon and change a setting, then come back and re-run."))
|
||||
dialog.ok(heading=lang(29999), line1=lang(33073))0
|
||||
xbmc.executebuiltin('Addon.OpenSettings(script.tvtunes)')
|
||||
return
|
||||
|
||||
|
@ -442,8 +448,8 @@ def getThemeMedia():
|
|||
nfo_file.close()
|
||||
|
||||
dialog.notification(
|
||||
heading="Emby for Kodi",
|
||||
message="Themes added!",
|
||||
heading=lang(29999),
|
||||
message=lang(33069),
|
||||
icon="special://home/addons/plugin.video.emby/icon.png",
|
||||
time=1000,
|
||||
sound=False)
|
||||
|
@ -461,8 +467,8 @@ def refreshPlaylist():
|
|||
# Refresh views
|
||||
lib.refreshViews()
|
||||
dialog.notification(
|
||||
heading="Emby for Kodi",
|
||||
message="Emby playlists/nodes refreshed",
|
||||
heading=lang(29999),
|
||||
message=lang(33069),
|
||||
icon="special://home/addons/plugin.video.emby/icon.png",
|
||||
time=1000,
|
||||
sound=False)
|
||||
|
@ -470,8 +476,8 @@ def refreshPlaylist():
|
|||
except Exception as e:
|
||||
log("Refresh playlists/nodes failed: %s" % e, 1)
|
||||
dialog.notification(
|
||||
heading="Emby for Kodi",
|
||||
message="Emby playlists/nodes refresh failed",
|
||||
heading=lang(29999),
|
||||
message=lang(33070),
|
||||
icon=xbmcgui.NOTIFICATION_ERROR,
|
||||
time=1000,
|
||||
sound=False)
|
||||
|
|
|
@ -212,13 +212,8 @@ class Items(object):
|
|||
# Verify if direct path is accessible or not
|
||||
if window('emby_pathverified') != "true" and not xbmcvfs.exists(path):
|
||||
resp = xbmcgui.Dialog().yesno(
|
||||
heading="Can't validate path",
|
||||
line1=(
|
||||
"Kodi can't locate file: %s. "
|
||||
"You may need to verify your network credentials in the "
|
||||
"add-on settings or use the Emby path substitution "
|
||||
"to format your path correctly (Emby dashboard > library). "
|
||||
"Stop syncing?" % path))
|
||||
heading=lang(29999),
|
||||
line1="%s %s. %s" % (lang(33047), path, lang(33048)))
|
||||
if resp:
|
||||
window('emby_shouldStop', value="true")
|
||||
return False
|
||||
|
@ -230,8 +225,8 @@ class Items(object):
|
|||
if time:
|
||||
# It's possible for the time to be 0. It should be considered disabled in this case.
|
||||
xbmcgui.Dialog().notification(
|
||||
heading="Emby for Kodi",
|
||||
message="Added: %s" % name,
|
||||
heading=lang(29999),
|
||||
message="%s %s" % (lang(33049), name),
|
||||
icon="special://home/addons/plugin.video.emby/icon.png",
|
||||
time=time,
|
||||
sound=False)
|
||||
|
@ -571,9 +566,7 @@ class Movies(Items):
|
|||
try:
|
||||
movieid = emby_dbitem[0]
|
||||
fileid = emby_dbitem[1]
|
||||
log(
|
||||
"Update playstate for movie: %s fileid: %s"
|
||||
% (item['Name'], fileid), 1)
|
||||
log("Update playstate for movie: %s fileid: %s" % (item['Name'], fileid), 1)
|
||||
except TypeError:
|
||||
return
|
||||
|
||||
|
@ -2373,19 +2366,19 @@ class Music(Items):
|
|||
|
||||
log("Deleted %s: %s from kodi database" % (mediatype, itemid), 1)
|
||||
|
||||
def removeSong(self, kodiid):
|
||||
def removeSong(self, kodiId):
|
||||
|
||||
kodicursor = self.kodicursor
|
||||
|
||||
self.artwork.deleteArtwork(kodiid, "song", self.kodicursor)
|
||||
self.kodicursor.execute("DELETE FROM song WHERE idSong = ?", (kodiid,))
|
||||
self.artwork.deleteArtwork(kodiId, "song", self.kodicursor)
|
||||
self.kodicursor.execute("DELETE FROM song WHERE idSong = ?", (kodiId,))
|
||||
|
||||
def removeAlbum(self, kodiid):
|
||||
def removeAlbum(self, kodiId):
|
||||
|
||||
self.artwork.deleteArtwork(kodiid, "album", self.kodicursor)
|
||||
self.kodicursor.execute("DELETE FROM album WHERE idAlbum = ?", (kodiid,))
|
||||
self.artwork.deleteArtwork(kodiId, "album", self.kodicursor)
|
||||
self.kodicursor.execute("DELETE FROM album WHERE idAlbum = ?", (kodiId,))
|
||||
|
||||
def removeArtist(self, kodiid):
|
||||
def removeArtist(self, kodiId):
|
||||
|
||||
self.artwork.deleteArtwork(kodiid, "artist", self.kodicursor)
|
||||
self.kodicursor.execute("DELETE FROM artist WHERE idArtist = ?", (kodiid,))
|
||||
self.artwork.deleteArtwork(kodiId, "artist", self.kodicursor)
|
||||
self.kodicursor.execute("DELETE FROM artist WHERE idArtist = ?", (kodiId,))
|
|
@ -94,7 +94,7 @@ class KodiMonitor(xbmc.Monitor):
|
|||
try:
|
||||
itemid = emby_dbitem[0]
|
||||
except TypeError:
|
||||
log("No kodiid returned.", 1)
|
||||
log("No kodiId returned.", 1)
|
||||
else:
|
||||
url = "{server}/emby/Users/{UserId}/Items/%s?format=json" % itemid
|
||||
result = doUtils.downloadUrl(url)
|
||||
|
|
|
@ -320,7 +320,7 @@ class LibrarySync(threading.Thread):
|
|||
window('emby_initialScan', clear=True)
|
||||
if forceddialog:
|
||||
xbmcgui.Dialog().notification(
|
||||
heading="Emby for Kodi",
|
||||
heading=lang(29999),
|
||||
message="%s %s %s" %
|
||||
(message, lang(33025), str(elapsedtotal).split('.')[0]),
|
||||
icon="special://home/addons/plugin.video.emby/icon.png",
|
||||
|
@ -541,7 +541,7 @@ class LibrarySync(threading.Thread):
|
|||
self.vnodes.singleNode(totalnodes, "channels", "movies", "channels")
|
||||
totalnodes += 1
|
||||
# Save total
|
||||
utils.window('Emby.nodes.total', str(totalnodes))
|
||||
window('Emby.nodes.total', str(totalnodes))
|
||||
|
||||
# Remove any old referenced views
|
||||
log("Removing views: %s" % current_views, 1)
|
||||
|
@ -567,7 +567,7 @@ class LibrarySync(threading.Thread):
|
|||
# Get items per view
|
||||
if pdialog:
|
||||
pdialog.update(
|
||||
heading="Emby for Kodi",
|
||||
heading=lang(29999),
|
||||
message="%s %s..." % (lang(33017), view['name']))
|
||||
|
||||
# Initial or repair sync
|
||||
|
@ -596,7 +596,7 @@ class LibrarySync(threading.Thread):
|
|||
|
||||
##### PROCESS BOXSETS #####
|
||||
if pdialog:
|
||||
pdialog.update(heading="Emby for Kodi", message=lang(33018))
|
||||
pdialog.update(heading=lang(29999), message=lang(33018))
|
||||
|
||||
boxsets = self.emby.getBoxset(dialog=pdialog)
|
||||
total = boxsets['TotalRecordCount']
|
||||
|
@ -642,7 +642,7 @@ class LibrarySync(threading.Thread):
|
|||
|
||||
if pdialog:
|
||||
pdialog.update(
|
||||
heading="Emby for Kodi",
|
||||
heading=lang(29999),
|
||||
message="%s %s..." % (lang(33019), viewName))
|
||||
|
||||
# Initial or repair sync
|
||||
|
@ -688,7 +688,7 @@ class LibrarySync(threading.Thread):
|
|||
# Get items per view
|
||||
if pdialog:
|
||||
pdialog.update(
|
||||
heading="Emby for Kodi",
|
||||
heading=lang(29999),
|
||||
message="%s %s..." % (lang(33020), view['name']))
|
||||
|
||||
all_embytvshows = self.emby.getShows(view['id'], dialog=pdialog)
|
||||
|
@ -743,7 +743,7 @@ class LibrarySync(threading.Thread):
|
|||
|
||||
if pdialog:
|
||||
pdialog.update(
|
||||
heading="Emby for Kodi",
|
||||
heading=lang(29999),
|
||||
message="%s %s..." % (lang(33021), itemtype))
|
||||
|
||||
all_embyitems = process[itemtype][0](dialog=pdialog)
|
||||
|
@ -900,13 +900,13 @@ class LibrarySync(threading.Thread):
|
|||
except Exception as e:
|
||||
window('emby_dbScan', clear=True)
|
||||
xbmcgui.Dialog().ok(
|
||||
heading="Emby for Kodi",
|
||||
heading=lang(29999),
|
||||
line1=(
|
||||
"Library sync thread has exited! "
|
||||
"You should restart Kodi now. "
|
||||
"Please report this on the forum."))
|
||||
raise
|
||||
|
||||
@utils.profiling()
|
||||
def run_internal(self):
|
||||
|
||||
dialog = xbmcgui.Dialog()
|
||||
|
@ -934,10 +934,10 @@ class LibrarySync(threading.Thread):
|
|||
log("Database version out of date: %s minimum version required: %s"
|
||||
% (currentVersion, minVersion), 0)
|
||||
|
||||
resp = dialog.yesno("Emby for Kodi", lang(33022))
|
||||
resp = dialog.yesno(lang(29999), lang(33022))
|
||||
if not resp:
|
||||
log("Database version is out of date! USER IGNORED!", 0)
|
||||
dialog.ok("Emby for Kodi", lang(33023))
|
||||
dialog.ok(lang(29999), lang(33023))
|
||||
else:
|
||||
utils.reset()
|
||||
|
||||
|
@ -958,7 +958,7 @@ class LibrarySync(threading.Thread):
|
|||
"to know which Kodi versions are supported.", 0)
|
||||
|
||||
dialog.ok(
|
||||
heading="Emby for Kodi",
|
||||
heading=lang(29999),
|
||||
line1=lang(33024))
|
||||
break
|
||||
|
||||
|
@ -1060,7 +1060,7 @@ class ManualSync(LibrarySync):
|
|||
|
||||
if pdialog:
|
||||
pdialog.update(
|
||||
heading="Emby for Kodi",
|
||||
heading=lang(29999),
|
||||
message="%s %s..." % (lang(33026), viewName))
|
||||
|
||||
all_embymovies = self.emby.getMovies(viewId, basic=True, dialog=pdialog)
|
||||
|
@ -1104,7 +1104,7 @@ class ManualSync(LibrarySync):
|
|||
embyboxsets = []
|
||||
|
||||
if pdialog:
|
||||
pdialog.update(heading="Emby for Kodi", message=lang(33027))
|
||||
pdialog.update(heading=lang(29999), message=lang(33027))
|
||||
|
||||
for boxset in boxsets['Items']:
|
||||
|
||||
|
@ -1183,7 +1183,7 @@ class ManualSync(LibrarySync):
|
|||
|
||||
if pdialog:
|
||||
pdialog.update(
|
||||
heading="Emby for Kodi",
|
||||
heading=lang(29999),
|
||||
message="%s %s..." % (lang(33028), viewName))
|
||||
|
||||
all_embymvideos = self.emby.getMusicVideos(viewId, basic=True, dialog=pdialog)
|
||||
|
@ -1269,7 +1269,7 @@ class ManualSync(LibrarySync):
|
|||
|
||||
if pdialog:
|
||||
pdialog.update(
|
||||
heading="Emby for Kodi",
|
||||
heading=lang(29999),
|
||||
message="%s %s..." % (lang(33029), viewName))
|
||||
|
||||
all_embytvshows = self.emby.getShows(viewId, basic=True, dialog=pdialog)
|
||||
|
@ -1314,7 +1314,7 @@ class ManualSync(LibrarySync):
|
|||
# Get all episodes in view
|
||||
if pdialog:
|
||||
pdialog.update(
|
||||
heading="Emby for Kodi",
|
||||
heading=lang(29999),
|
||||
message="%s %s..." % (lang(33030), viewName))
|
||||
|
||||
all_embyepisodes = self.emby.getEpisodes(viewId, basic=True, dialog=pdialog)
|
||||
|
@ -1402,7 +1402,7 @@ class ManualSync(LibrarySync):
|
|||
for data_type in ['artists', 'albums', 'songs']:
|
||||
if pdialog:
|
||||
pdialog.update(
|
||||
heading="Emby for Kodi",
|
||||
heading=lang(29999),
|
||||
message="%s %s..." % (lang(33031), data_type))
|
||||
if data_type != "artists":
|
||||
all_embyitems = process[data_type][0](basic=True, dialog=pdialog)
|
||||
|
|
|
@ -135,7 +135,7 @@ class PlayUtils():
|
|||
# Let the user know that direct play failed
|
||||
settings('failCount', value=str(count+1))
|
||||
dialog.notification(
|
||||
heading="Emby for Kodi",
|
||||
heading=lang(29999),
|
||||
message=lang(33011),
|
||||
icon="special://home/addons/plugin.video.emby/icon.png",
|
||||
sound=False)
|
||||
|
@ -144,7 +144,7 @@ class PlayUtils():
|
|||
settings('playFromStream', value="true")
|
||||
settings('failCount', value="0")
|
||||
dialog.notification(
|
||||
heading="Emby for Kodi",
|
||||
heading=lang(29999),
|
||||
message=lang(33012),
|
||||
icon="special://home/addons/plugin.video.emby/icon.png",
|
||||
sound=False)
|
||||
|
|
|
@ -221,7 +221,7 @@ class UserClient(threading.Thread):
|
|||
log("Access is granted.", 1)
|
||||
self.HasAccess = True
|
||||
window('emby_serverStatus', clear=True)
|
||||
xbmcgui.Dialog().notification("Emby for Kodi", lang(33007))
|
||||
xbmcgui.Dialog().notification(lang(29999), lang(33007))
|
||||
|
||||
def loadCurrUser(self, authenticated=False):
|
||||
|
||||
|
@ -350,7 +350,7 @@ class UserClient(threading.Thread):
|
|||
|
||||
if accessToken is not None:
|
||||
self.currUser = username
|
||||
dialog.notification("Emby for Kodi",
|
||||
dialog.notification(lang(29999),
|
||||
"%s %s!" % (lang(33000), self.currUser.decode('utf-8')))
|
||||
settings('accessToken', value=accessToken)
|
||||
settings('userId%s' % username, value=result['User']['Id'])
|
||||
|
|
|
@ -260,7 +260,7 @@ def reset():
|
|||
|
||||
dialog = xbmcgui.Dialog()
|
||||
|
||||
if not dialog.yesno("Warning", "Are you sure you want to reset your local Kodi database?"):
|
||||
if not dialog.yesno(language(29999), language(33074)):
|
||||
return
|
||||
|
||||
# first stop any db sync
|
||||
|
@ -270,7 +270,7 @@ def reset():
|
|||
log("Sync is running, will retry: %s..." % count)
|
||||
count -= 1
|
||||
if count == 0:
|
||||
dialog.ok("Warning", "Could not stop the database from running. Try again.")
|
||||
dialog.ok(language(29999), language(33085))
|
||||
return
|
||||
xbmc.sleep(1000)
|
||||
|
||||
|
@ -322,7 +322,7 @@ def reset():
|
|||
cursor.close()
|
||||
|
||||
# Offer to wipe cached thumbnails
|
||||
resp = dialog.yesno("Warning", "Remove all cached artwork?")
|
||||
resp = dialog.yesno(language(29999), language(33086))
|
||||
if resp:
|
||||
log("Resetting all cached artwork.", 0)
|
||||
# Remove all existing textures first
|
||||
|
@ -353,7 +353,7 @@ def reset():
|
|||
settings('SyncInstallRunDone', value="false")
|
||||
|
||||
# Remove emby info
|
||||
resp = dialog.yesno("Warning", "Reset all Emby Addon settings?")
|
||||
resp = dialog.yesno(language(29999), language(33087))
|
||||
if resp:
|
||||
# Delete the settings
|
||||
addon = xbmcaddon.Addon()
|
||||
|
@ -362,9 +362,7 @@ def reset():
|
|||
xbmcvfs.delete(dataPath)
|
||||
log("Deleting: settings.xml", 1)
|
||||
|
||||
dialog.ok(
|
||||
heading="Emby for Kodi",
|
||||
line1="Database reset has completed, Kodi will now restart to apply the changes.")
|
||||
dialog.ok(heading=language(29999), line1=language(33088))
|
||||
xbmc.executebuiltin('RestartApp')
|
||||
|
||||
def sourcesXML():
|
||||
|
@ -424,7 +422,7 @@ def passwordsXML():
|
|||
credentials = settings('networkCreds')
|
||||
if credentials:
|
||||
# Present user with options
|
||||
option = dialog.select("Modify/Remove network credentials", ["Modify", "Remove"])
|
||||
option = dialog.select(language(33075), [language(33076), language(33077)])
|
||||
|
||||
if option < 0:
|
||||
# User cancelled dialog
|
||||
|
@ -444,8 +442,8 @@ def passwordsXML():
|
|||
|
||||
settings('networkCreds', value="")
|
||||
xbmcgui.Dialog().notification(
|
||||
heading="Emby for Kodi",
|
||||
message="%s removed from passwords.xml" % credentials,
|
||||
heading=language(29999),
|
||||
message="%s %s" % (language(33078), credentials),
|
||||
icon="special://home/addons/plugin.video.emby/icon.png",
|
||||
time=1000,
|
||||
sound=False)
|
||||
|
@ -453,28 +451,22 @@ def passwordsXML():
|
|||
|
||||
elif option == 0:
|
||||
# User selected to modify
|
||||
server = dialog.input("Modify the computer name or ip address", credentials)
|
||||
server = dialog.input(language(33083), credentials)
|
||||
if not server:
|
||||
return
|
||||
else:
|
||||
# No credentials added
|
||||
dialog.ok(
|
||||
heading="Network credentials",
|
||||
line1= (
|
||||
"Input the server name or IP address as indicated in your emby library paths. "
|
||||
'For example, the server name: \\\\SERVER-PC\\path\\ is "SERVER-PC".'))
|
||||
server = dialog.input("Enter the server name or IP address")
|
||||
dialog.ok(heading=language(29999), line1=language(33082))
|
||||
server = dialog.input(language(33084))
|
||||
if not server:
|
||||
return
|
||||
|
||||
# Network username
|
||||
user = dialog.input("Enter the network username")
|
||||
user = dialog.input(language(33079))
|
||||
if not user:
|
||||
return
|
||||
# Network password
|
||||
password = dialog.input(
|
||||
heading="Enter the network password",
|
||||
option=xbmcgui.ALPHANUM_HIDE_INPUT)
|
||||
password = dialog.input(heading=language(33080), option=xbmcgui.ALPHANUM_HIDE_INPUT)
|
||||
if not password:
|
||||
return
|
||||
|
||||
|
@ -503,8 +495,8 @@ def passwordsXML():
|
|||
etree.ElementTree(root).write(xmlpath)
|
||||
|
||||
dialog.notification(
|
||||
heading="Emby for Kodi",
|
||||
message="%s added to passwords.xml" % server,
|
||||
heading=language(29999),
|
||||
message="%s %s" % (language(33081), server),
|
||||
icon="special://home/addons/plugin.video.emby/icon.png",
|
||||
time=1000,
|
||||
sound=False)
|
||||
|
|
|
@ -80,7 +80,7 @@ class WebSocket_Client(threading.Thread):
|
|||
|
||||
if command == "PlayNow":
|
||||
dialog.notification(
|
||||
heading="Emby for Kodi",
|
||||
heading=lang(29999),
|
||||
message="%s %s" % (len(itemIds), lang(33004)),
|
||||
icon="special://home/addons/plugin.video.emby/icon.png",
|
||||
sound=False)
|
||||
|
@ -89,7 +89,7 @@ class WebSocket_Client(threading.Thread):
|
|||
|
||||
elif command == "PlayNext":
|
||||
dialog.notification(
|
||||
heading="Emby for Kodi",
|
||||
heading=lang(29999),
|
||||
message="%s %s" % (len(itemIds), lang(33005)),
|
||||
icon="special://home/addons/plugin.video.emby/icon.png",
|
||||
sound=False)
|
||||
|
@ -244,7 +244,7 @@ class WebSocket_Client(threading.Thread):
|
|||
elif messageType == "ServerRestarting":
|
||||
if settings('supressRestartMsg') == "true":
|
||||
dialog.notification(
|
||||
heading="Emby for Kodi",
|
||||
heading=lang(29999),
|
||||
message=lang(33006),
|
||||
icon="special://home/addons/plugin.video.emby/icon.png")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue