Strings - translation

This commit is contained in:
angelblue05 2016-06-20 20:57:29 -05:00
parent 924c3a4a05
commit 3e1aa94c78
10 changed files with 201 additions and 252 deletions

View file

@ -130,7 +130,7 @@ class Main():
elif mode == "texturecache": elif mode == "texturecache":
import artwork import artwork
artwork.Artwork().FullTextureCacheSync() artwork.Artwork().fullTextureCacheSync()
else: else:
entrypoint.doMainListing() entrypoint.doMainListing()

View file

@ -6,56 +6,23 @@
<string id="30000">Primary Server Address</string><!-- Verified --> <string id="30000">Primary Server Address</string><!-- Verified -->
<string id="30002">Play from HTTP instead of SMB</string><!-- Verified --> <string id="30002">Play from HTTP instead of SMB</string><!-- Verified -->
<string id="30004">Log level</string><!-- Verified --> <string id="30004">Log level</string><!-- Verified -->
<string id="30016">Device Name</string><!-- Verified -->
<string id="30022">Advanced</string>
<string id="30024">Username</string><!-- Verified --> <string id="30024">Username</string><!-- Verified -->
<string id="30030">Port Number</string><!-- Verified --> <string id="30030">Port Number</string><!-- Verified -->
<string id="30035">Number of recent Music Albums to show:</string>
<!-- Add-on settings -->
<string id="30007">Network Username: </string>
<string id="30008">Network Password: </string>
<string id="30009">Transcode: </string>
<string id="30014">Emby</string>
<string id="30015">Network</string>
<string id="30016">Device Name</string>
<string id="30022">Advanced</string>
<string id="30036">Number of recent Movies to show:</string> <string id="30036">Number of recent Movies to show:</string>
<string id="30037">Number of recent TV episodes to show:</string> <string id="30037">Number of recent TV episodes to show:</string>
<string id="30035">Number of recent Music Albums to show:</string>
<string id="30038">Mark watched at start of playback:</string>
<string id="30039">Set Season poster for episodes</string>
<string id="30040">Genre Filter ...</string>
<string id="30041">Play All from Here</string>
<string id="30042">Refresh</string> <string id="30042">Refresh</string>
<string id="30043">Delete</string> <string id="30043">Delete</string>
<string id="30046">Add Movie to CouchPotato</string>
<string id="30044">Incorrect Username/Password</string> <string id="30044">Incorrect Username/Password</string>
<string id="30045">Username not found</string> <string id="30045">Username not found</string>
<string id="30052">Deleting</string> <string id="30052">Deleting</string>
<string id="30053">Waiting for server to delete</string> <string id="30053">Waiting for server to delete</string>
<string id="30059">Server Default</string>
<string id="30060">Title</string>
<string id="30061">Year</string>
<string id="30062">Premiere Date</string>
<string id="30063">Date Created</string>
<string id="30064">Critic Rating</string>
<string id="30065">Community Rating</string>
<string id="30066">Play Count</string>
<string id="30067">Budget</string>
<!-- Runtime added as 30226 below -->
<string id="30068">Sort By</string> <string id="30068">Sort By</string>
<string id="30069">None</string> <string id="30069">None</string>
<string id="30070">Action</string> <string id="30070">Action</string>
<string id="30071">Adventure</string> <string id="30071">Adventure</string>
@ -80,69 +47,40 @@
<string id="30090">Genre Filter</string> <string id="30090">Genre Filter</string>
<string id="30091">Confirm file deletion</string><!-- Verified --> <string id="30091">Confirm file deletion</string><!-- Verified -->
<string id="30092">Delete this item? This action will delete media and associated data files.</string>
<string id="30093">Mark Watched</string> <string id="30093">Mark watched</string>
<string id="30094">Mark Unwatched</string> <string id="30094">Mark unwatched</string>
<string id="30095">Add to Favorites</string>
<string id="30096">Remove from Favorites</string> <string id="30097">Sort by</string>
<string id="30097">Sort By ...</string>
<string id="30098">Sort Order Descending</string> <string id="30098">Sort Order Descending</string>
<string id="30099">Sort Order Ascending</string> <string id="30099">Sort Order Ascending</string>
<string id="30100">Show People</string>
<!-- resume dialog --> <!-- resume dialog -->
<string id="30105">Resume</string> <string id="30105">Resume</string>
<string id="30106">Resume from</string> <string id="30106">Resume from</string>
<string id="30107">Start from beginning</string> <string id="30107">Start from beginning</string>
<string id="30110">Interface</string>
<string id="30111">Include Stream Info</string>
<string id="30112">Include People</string>
<string id="30113">Include Overview</string>
<string id="30114">Offer delete after playback</string><!-- Verified --> <string id="30114">Offer delete after playback</string><!-- Verified -->
<string id="30115">For Episodes</string><!-- Verified --> <string id="30115">For Episodes</string><!-- Verified -->
<string id="30116">For Movies</string><!-- Verified --> <string id="30116">For Movies</string><!-- Verified -->
<string id="30117">Background Art Refresh Rate (seconds)</string>
<string id="30118">Add Resume Percent</string> <string id="30118">Add Resume Percent</string>
<string id="30119">Add Episode Number</string> <string id="30119">Add Episode Number</string>
<string id="30120">Show Load Progress</string> <string id="30120">Show Load Progress</string>
<string id="30121">Loading Content</string> <string id="30121">Loading Content</string>
<string id="30122">Retrieving Data</string> <string id="30122">Retrieving Data</string>
<string id="30125">Done</string> <string id="30125">Done</string>
<string id="30126">Processing Item : </string> <string id="30132">Warning</string><!-- Verified -->
<string id="30128">Play Error</string>
<string id="30129">This item is not playable</string>
<string id="30130">Local path detected</string>
<string id="30131">Your MB3 Server contains local paths. Please change server paths to UNC or change XBMB3C setting 'Play from Stream' to true. Path: </string>
<string id="30132">Warning</string>
<string id="30133">Debug logging enabled.</string>
<string id="30134">This will affect performance.</string>
<string id="30135">Error</string> <string id="30135">Error</string>
<string id="30136">Monitoring service is not running</string>
<string id="30137">If you have just installed please restart Kodi</string>
<string id="30138">Search</string> <string id="30138">Search</string>
<string id="30139">Enable Theme Music (Requires Restart)</string>
<string id="30140"> - Loop Theme Music</string>
<string id="30141">Enable Background Image (Requires Restart)</string>
<string id="30142">Services</string>
<string id="30150">Skin does not support setting views</string>
<string id="30151">Select item action (Requires Restart)</string>
<string id="30156">Sort NextUp by Show Title</string>
<string id="30157">Enable Enhanced Images (eg CoverArt)</string><!-- Verified --> <string id="30157">Enable Enhanced Images (eg CoverArt)</string><!-- Verified -->
<string id="30158">Metadata</string> <string id="30158">Metadata</string>
<string id="30159">Artwork</string> <string id="30159">Artwork</string>
<string id="30160">Video Quality</string><!-- Verified --> <string id="30160">Video Quality</string><!-- Verified -->
<string id="30161">Enable Suggested Loader (Requires Restart)</string> <string id="30165">Direct Play</string><!-- Verified -->
<string id="30162">Add Season Number</string>
<string id="30163">Flatten Seasons</string>
<string id="30164">Direct Play - HTTP</string>
<string id="30165">Direct Play</string>
<string id="30166">Transcoding</string> <string id="30166">Transcoding</string>
<string id="30167">Server Detection Succeeded</string> <string id="30167">Server Detection Succeeded</string>
<string id="30168">Found server</string> <string id="30168">Found server</string>
@ -177,18 +115,10 @@
<string id="30195">TV Networks</string> <string id="30195">TV Networks</string>
<string id="30196">TV Actors</string> <string id="30196">TV Actors</string>
<string id="30197">Playlists</string> <string id="30197">Playlists</string>
<string id="30198">Search</string>
<string id="30199">Set Views</string> <string id="30199">Set Views</string>
<string id="30200">Select User</string><!-- Verified --> <string id="30200">Select User</string><!-- Verified -->
<string id="30201">Profiling enabled.</string>
<string id="30202">Please remember to turn off when finished testing.</string>
<string id="30203">Error in ArtworkRotationThread</string>
<string id="30204">Unable to connect to server</string> <string id="30204">Unable to connect to server</string>
<string id="30205">Error in LoadMenuOptionsThread</string>
<string id="30206">Enable Playlists Loader (Requires Restart)</string>
<string id="30207">Songs</string> <string id="30207">Songs</string>
<string id="30208">Albums</string> <string id="30208">Albums</string>
@ -196,18 +126,11 @@
<string id="30210">Artists</string> <string id="30210">Artists</string>
<string id="30211">Music Genres</string> <string id="30211">Music Genres</string>
<string id="30212">Enable Theme Videos (Requires Restart)</string> <string id="30220">Latest</string>
<string id="30213"> - Loop Theme Videos</string> <string id="30221">In Progress</string>
<string id="30222">NextUp</string>
<string id="30216">AutoPlay remaining episodes in a season</string>
<string id="30218">Compress Artwork</string>
<string id="30220">Latest </string>
<string id="30221">In Progress </string>
<string id="30222">NextUp </string>
<string id="30223">User Views</string> <string id="30223">User Views</string>
<string id="30224">Report Metrics</string> <string id="30224">Report Metrics</string>
<string id="30225">Use Kodi Sorting</string>
<string id="30226">Runtime</string>
<string id="30227">Random Movies</string> <string id="30227">Random Movies</string>
<string id="30228">Random Episodes</string> <string id="30228">Random Episodes</string>
@ -220,15 +143,9 @@
<string id="30238">Sync Movie BoxSets</string> <string id="30238">Sync Movie BoxSets</string>
<string id="30239">Reset local Kodi database</string><!-- Verified --> <string id="30239">Reset local Kodi database</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>
<string id="30243">Enable HTTPS</string><!-- Verified --> <string id="30243">Enable HTTPS</string><!-- Verified -->
<string id="30245">Force Transcoding Codecs</string> <string id="30245">Force Transcoding Codecs</string>
<string id="30246">Enable Netflix style next up notification</string>
<string id="30247"> - The number of seconds before the end to show the notification</string>
<string id="30248">Show Emby Info dialog on play/select action</string>
<string id="30249">Enable server connection message on startup</string><!-- Verified --> <string id="30249">Enable server connection message on startup</string><!-- Verified -->
<string id="30251">Recently added Home Videos</string><!-- Verified --> <string id="30251">Recently added Home Videos</string><!-- Verified -->
@ -267,12 +184,6 @@
<string id="30411">Set custom song rating (0-5)</string> <string id="30411">Set custom song rating (0-5)</string>
<!-- add-on settings --> <!-- add-on settings -->
<string id="30000">Primary Server Address</string><!-- Verified -->
<string id="30002">Play from HTTP instead of SMB</string><!-- Verified -->
<string id="30004">Log level</string><!-- Verified -->
<string id="30024">Username</string><!-- Verified -->
<string id="30030">Port Number</string><!-- Verified -->
<string id="30500">Verify Host SSL Certificate</string> <string id="30500">Verify Host SSL Certificate</string>
<string id="30501">Client SSL certificate</string> <string id="30501">Client SSL certificate</string>
<string id="30502">Use alternate address</string> <string id="30502">Use alternate address</string>
@ -357,5 +268,52 @@
<string id="33039">Disable Emby music library?</string> <string id="33039">Disable Emby music library?</string>
<string id="33040">Direct stream the music library? Select this option if the music library will be remotely accessed.</string> <string id="33040">Direct stream the music library? Select this option if the music library will be remotely accessed.</string>
<string id="33041">Delete file(s) from Emby Server? This will also delete the file(s) from disk!</string> <string id="33041">Delete file(s) from Emby Server? This will also delete the file(s) from disk!</string>
<string id="33042">Running the caching process may take some time. Continue anyway?</string>
<string id="33043">Artwork cache sync</string>
<string id="33044">Reset existing artwork cache?</string>
<string id="33045">Updating artwork cache:</string>
<string id="33046">Waiting for all threads to exit:</string>
<string id="33047">Kodi can't locate file:</string>
<string id="33048">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?</string>
<string id="33049">Added:</string>
<string id="33050">If you fail to log in too many times, the Emby server might lock your account. Proceed anyway?</string>
<string id="33051">Live TV Channels (experimental)</string>
<string id="33052">Live TV Recordings (experimental)</string>
<string id="33053">Settings</string>
<string id="33054">Add user to session</string>
<string id="33055">Refresh Emby playlists/Video nodes</string>
<string id="33056">Perform manual sync</string>
<string id="33057">Repair local database (force update all content)</string>
<string id="33058">Perform local database reset</string>
<string id="33059">Cache all artwork</string>
<string id="33060">Sync Emby Theme Media to Kodi</string>
<string id="33061">Add/Remove user from the session</string>
<string id="33062">Add user</string>
<string id="33063">Remove user</string>
<string id="33064">Remove user from the session</string>
<string id="33065">Success!</string>
<string id="33066">Removed from viewing session:</string>
<string id="33067">Added to viewing session:</string>
<string id="33068">Unable to add/remove user from the session.</string>
<string id="33069">The task succeeded</string>
<string id="33070">The task failed</string>
<string id="33071">Direct Stream</string>
<string id="33072">Playback method for your themes</string>
<string id="33073">The settings file does not exist in TV Tunes. Change a setting and run the task again.</string>
<string id="33074">Are you sure you want to reset your local Kodi database?</string>
<string id="33075">Modify/Remove network credentials</string>
<string id="33076">Modify</string>
<string id="33077">Remove</string>
<string id="33078">Removed:</string>
<string id="33079">Enter the network username</string>
<string id="33080">Enter the network password</string>
<string id="33081">Added network credentials for:</string>
<string id="33082">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"</string>
<string id="33083">Modify the server name or IP address</string>
<string id="33084">Enter the server name or IP address</string>
<string id="33085">Could not reset the database. Try again.</string>
<string id="33086">Remove all cached artwork?</string>
<string id="33087">Reset all Emby add-on settings?</string>
<string id="33088">Database reset has completed, Kodi will now restart to apply the changes.</string>
</strings> </strings>

View file

@ -30,21 +30,19 @@ log = Logging('Entrypoint').log
################################################################################################# #################################################################################################
def doPlayback(itemid, dbid): def doPlayback(itemId, dbId):
emby = embyserver.Read_EmbyServer() emby = embyserver.Read_EmbyServer()
item = emby.getItem(itemid) item = emby.getItem(itemId)
pbutils.PlaybackUtils(item).play(itemid, dbid) pbutils.PlaybackUtils(item).play(itemId, dbId)
##### DO RESET AUTH ##### ##### DO RESET AUTH #####
def resetAuth(): def resetAuth():
# User tried login and failed too many times # User tried login and failed too many times
resp = xbmcgui.Dialog().yesno( resp = xbmcgui.Dialog().yesno(
heading="Warning", heading=lang(30132),
line1=( line1=lang(33050))
"Emby might lock your account if you fail to log in too many times. " if resp:
"Proceed anyway?"))
if resp == 1:
log("Reset login attempts.", 1) log("Reset login attempts.", 1)
window('emby_serverStatus', value="Auth") window('emby_serverStatus', value="Auth")
else: else:
@ -58,6 +56,7 @@ def addDirectoryItem(label, path, folder=True):
xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]), url=path, listitem=li, isFolder=folder) xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]), url=path, listitem=li, isFolder=folder)
def doMainListing(): def doMainListing():
xbmcplugin.setContent(int(sys.argv[1]), 'files') xbmcplugin.setContent(int(sys.argv[1]), 'files')
# Get emby nodes from the window props # Get emby nodes from the window props
embyprops = window('Emby.nodes.total') embyprops = window('Emby.nodes.total')
@ -68,39 +67,54 @@ def doMainListing():
if not path: if not path:
path = window('Emby.nodes.%s.content' % i) path = window('Emby.nodes.%s.content' % i)
label = window('Emby.nodes.%s.title' % i) label = window('Emby.nodes.%s.title' % i)
node_type = window('Emby.nodes.%s.type' % i) 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
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)
#experimental live tv nodes ''' because we do not use seperate entrypoints for each content type,
addDirectoryItem("Live Tv Channels (experimental)", "plugin://plugin.video.emby/?mode=browsecontent&type=tvchannels&folderid=root") we need to figure out which items to show in each listing.
addDirectoryItem("Live Tv Recordings (experimental)", "plugin://plugin.video.emby/?mode=browsecontent&type=recordings&folderid=root") 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 == "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 # some extra entries for settings and stuff. TODO --> localize the labels
addDirectoryItem("Network credentials", "plugin://plugin.video.emby/?mode=passwords") addDirectoryItem(lang(30517), "plugin://plugin.video.emby/?mode=passwords")
addDirectoryItem("Settings", "plugin://plugin.video.emby/?mode=settings") addDirectoryItem(lang(33053), "plugin://plugin.video.emby/?mode=settings")
addDirectoryItem("Add user to session", "plugin://plugin.video.emby/?mode=adduser") addDirectoryItem(lang(33054), "plugin://plugin.video.emby/?mode=adduser")
addDirectoryItem("Refresh Emby playlists/nodes", "plugin://plugin.video.emby/?mode=refreshplaylist") addDirectoryItem(lang(33055), "plugin://plugin.video.emby/?mode=refreshplaylist")
addDirectoryItem("Perform manual sync", "plugin://plugin.video.emby/?mode=manualsync") addDirectoryItem(lang(33056), "plugin://plugin.video.emby/?mode=manualsync")
addDirectoryItem("Repair local database (force update all content)", "plugin://plugin.video.emby/?mode=repair") addDirectoryItem(lang(33057), "plugin://plugin.video.emby/?mode=repair")
addDirectoryItem("Perform local database reset (full resync)", "plugin://plugin.video.emby/?mode=reset") addDirectoryItem(lang(33058), "plugin://plugin.video.emby/?mode=reset")
addDirectoryItem("Cache all images to Kodi texture cache", "plugin://plugin.video.emby/?mode=texturecache") addDirectoryItem(lang(33059), "plugin://plugin.video.emby/?mode=texturecache")
addDirectoryItem("Sync Emby Theme Media to Kodi", "plugin://plugin.video.emby/?mode=thememedia") addDirectoryItem(lang(33060), "plugin://plugin.video.emby/?mode=thememedia")
xbmcplugin.endOfDirectory(int(sys.argv[1])) xbmcplugin.endOfDirectory(int(sys.argv[1]))
##### Generate a new deviceId ##### Generate a new deviceId
def resetDeviceId(): def resetDeviceId():
dialog = xbmcgui.Dialog() dialog = xbmcgui.Dialog()
language = utils.language
deviceId_old = window('emby_deviceId') deviceId_old = window('emby_deviceId')
try: try:
@ -109,8 +123,8 @@ def resetDeviceId():
except Exception as e: except Exception as e:
log("Failed to generate a new device Id: %s" % e, 1) log("Failed to generate a new device Id: %s" % e, 1)
dialog.ok( dialog.ok(
heading="Emby for Kodi", heading=lang(29999),
line1=language(33032)) line1=lang(33032))
else: else:
log("Successfully removed old deviceId: %s New deviceId: %s" % (deviceId_old, deviceId), 1) log("Successfully removed old deviceId: %s New deviceId: %s" % (deviceId_old, deviceId), 1)
dialog.ok( dialog.ok(
@ -123,21 +137,21 @@ def deleteItem():
# Serves as a keymap action # Serves as a keymap action
if xbmc.getInfoLabel('ListItem.Property(embyid)'): # If we already have the embyid 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: else:
dbid = xbmc.getInfoLabel('ListItem.DBID') dbId = xbmc.getInfoLabel('ListItem.DBID')
itemtype = xbmc.getInfoLabel('ListItem.DBTYPE') itemType = xbmc.getInfoLabel('ListItem.DBTYPE')
if not itemtype: if not itemType:
if xbmc.getCondVisibility('Container.Content(albums)'): if xbmc.getCondVisibility('Container.Content(albums)'):
itemtype = "album" itemType = "album"
elif xbmc.getCondVisibility('Container.Content(artists)'): elif xbmc.getCondVisibility('Container.Content(artists)'):
itemtype = "artist" itemType = "artist"
elif xbmc.getCondVisibility('Container.Content(songs)'): elif xbmc.getCondVisibility('Container.Content(songs)'):
itemtype = "song" itemType = "song"
elif xbmc.getCondVisibility('Container.Content(pictures)'): elif xbmc.getCondVisibility('Container.Content(pictures)'):
itemtype = "picture" itemType = "picture"
else: else:
log("Unknown type, unable to proceed.", 1) log("Unknown type, unable to proceed.", 1)
return return
@ -145,7 +159,7 @@ def deleteItem():
embyconn = utils.kodiSQL('emby') embyconn = utils.kodiSQL('emby')
embycursor = embyconn.cursor() embycursor = embyconn.cursor()
emby_db = embydb.Embydb_Functions(embycursor) emby_db = embydb.Embydb_Functions(embycursor)
item = emby_db.getItem_byKodiId(dbid, itemtype) item = emby_db.getItem_byKodiId(dbId, itemType)
embycursor.close() embycursor.close()
try: try:
@ -156,17 +170,13 @@ def deleteItem():
if settings('skipContextMenu') != "true": if settings('skipContextMenu') != "true":
resp = xbmcgui.Dialog().yesno( resp = xbmcgui.Dialog().yesno(
heading="Confirm delete", heading=lang(29999),
line1=("Delete file from Emby Server? This will " line1=lang(33041))
"also delete the file(s) from disk!"))
if not resp: if not resp:
log("User skipped deletion for: %s." % embyid, 1) log("User skipped deletion for: %s." % itemId, 1)
return return
doUtils = downloadutils.DownloadUtils() embyserver.Read_EmbyServer().deleteItem(itemId)
url = "{server}/emby/Items/%s?format=json" % embyid
log("Deleting request: %s" % embyid, 0)
doUtils.downloadUrl(url, action_type="DELETE")
##### ADD ADDITIONAL USERS ##### ##### ADD ADDITIONAL USERS #####
def addUser(): def addUser():
@ -203,7 +213,7 @@ def addUser():
# Display dialog if there's additional users # Display dialog if there's additional users
if additionalUsers: 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 # Users currently in the session
additionalUserlist = {} additionalUserlist = {}
additionalUsername = [] additionalUsername = []
@ -216,15 +226,15 @@ def addUser():
if option == 1: if option == 1:
# User selected Remove user # User selected Remove user
resp = dialog.select("Remove user from the session", additionalUsername) resp = dialog.select(lang(33064), additionalUsername)
if resp > -1: if resp > -1:
selected = additionalUsername[resp] selected = additionalUsername[resp]
selected_userId = additionalUserlist[selected] selected_userId = additionalUserlist[selected]
url = "{server}/emby/Sessions/%s/Users/%s" % (sessionId, selected_userId) url = "{server}/emby/Sessions/%s/Users/%s" % (sessionId, selected_userId)
doUtils.downloadUrl(url, postBody={}, action_type="DELETE") doUtils.downloadUrl(url, postBody={}, action_type="DELETE")
dialog.notification( dialog.notification(
heading="Success!", heading=lang(29999),
message="%s removed from viewing session" % selected, message="%s %s" % (lang(33066), selected),
icon="special://home/addons/plugin.video.emby/icon.png", icon="special://home/addons/plugin.video.emby/icon.png",
time=1000) time=1000)
@ -256,16 +266,16 @@ def addUser():
url = "{server}/emby/Sessions/%s/Users/%s" % (sessionId, selected_userId) url = "{server}/emby/Sessions/%s/Users/%s" % (sessionId, selected_userId)
doUtils.downloadUrl(url, postBody={}, action_type="POST") doUtils.downloadUrl(url, postBody={}, action_type="POST")
dialog.notification( dialog.notification(
heading="Success!", heading=lang(29999),
message="%s added to viewing session" % selected, message="%s %s" % (lang(33067), selected),
icon="special://home/addons/plugin.video.emby/icon.png", icon="special://home/addons/plugin.video.emby/icon.png",
time=1000) time=1000)
except: except:
log("Failed to add user to session.") log("Failed to add user to session.")
dialog.notification( dialog.notification(
heading="Error", heading=lang(29999),
message="Unable to add/remove user from the session.", message=lang(33068),
icon=xbmcgui.NOTIFICATION_ERROR) icon=xbmcgui.NOTIFICATION_ERROR)
# Add additional user images # Add additional user images
@ -297,7 +307,7 @@ def getThemeMedia():
playback = None playback = None
# Choose playback method # 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: if resp == 0:
playback = "DirectPlay" playback = "DirectPlay"
elif resp == 1: elif resp == 1:
@ -322,11 +332,7 @@ def getThemeMedia():
else: else:
# if it does not exist this will not work so warn user # 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. # often they need to edit the settings first for it to be created.
dialog.ok( dialog.ok(heading=lang(29999), line1=lang(33073))0
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."))
xbmc.executebuiltin('Addon.OpenSettings(script.tvtunes)') xbmc.executebuiltin('Addon.OpenSettings(script.tvtunes)')
return return
@ -442,8 +448,8 @@ def getThemeMedia():
nfo_file.close() nfo_file.close()
dialog.notification( dialog.notification(
heading="Emby for Kodi", heading=lang(29999),
message="Themes added!", message=lang(33069),
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)
@ -461,8 +467,8 @@ def refreshPlaylist():
# Refresh views # Refresh views
lib.refreshViews() lib.refreshViews()
dialog.notification( dialog.notification(
heading="Emby for Kodi", heading=lang(29999),
message="Emby playlists/nodes refreshed", message=lang(33069),
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)
@ -470,8 +476,8 @@ def refreshPlaylist():
except Exception as e: except Exception as e:
log("Refresh playlists/nodes failed: %s" % e, 1) log("Refresh playlists/nodes failed: %s" % e, 1)
dialog.notification( dialog.notification(
heading="Emby for Kodi", heading=lang(29999),
message="Emby playlists/nodes refresh failed", message=lang(33070),
icon=xbmcgui.NOTIFICATION_ERROR, icon=xbmcgui.NOTIFICATION_ERROR,
time=1000, time=1000,
sound=False) sound=False)

View file

@ -212,13 +212,8 @@ class Items(object):
# Verify if direct path is accessible or not # Verify if direct path is accessible or not
if window('emby_pathverified') != "true" and not xbmcvfs.exists(path): if window('emby_pathverified') != "true" and not xbmcvfs.exists(path):
resp = xbmcgui.Dialog().yesno( resp = xbmcgui.Dialog().yesno(
heading="Can't validate path", heading=lang(29999),
line1=( line1="%s %s. %s" % (lang(33047), path, lang(33048)))
"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))
if resp: if resp:
window('emby_shouldStop', value="true") window('emby_shouldStop', value="true")
return False return False
@ -230,8 +225,8 @@ class Items(object):
if time: if time:
# It's possible for the time to be 0. It should be considered disabled in this case. # It's possible for the time to be 0. It should be considered disabled in this case.
xbmcgui.Dialog().notification( xbmcgui.Dialog().notification(
heading="Emby for Kodi", heading=lang(29999),
message="Added: %s" % name, message="%s %s" % (lang(33049), name),
icon="special://home/addons/plugin.video.emby/icon.png", icon="special://home/addons/plugin.video.emby/icon.png",
time=time, time=time,
sound=False) sound=False)
@ -571,9 +566,7 @@ class Movies(Items):
try: try:
movieid = emby_dbitem[0] movieid = emby_dbitem[0]
fileid = emby_dbitem[1] fileid = emby_dbitem[1]
log( log("Update playstate for movie: %s fileid: %s" % (item['Name'], fileid), 1)
"Update playstate for movie: %s fileid: %s"
% (item['Name'], fileid), 1)
except TypeError: except TypeError:
return return
@ -2373,19 +2366,19 @@ class Music(Items):
log("Deleted %s: %s from kodi database" % (mediatype, itemid), 1) log("Deleted %s: %s from kodi database" % (mediatype, itemid), 1)
def removeSong(self, kodiid): def removeSong(self, kodiId):
kodicursor = self.kodicursor kodicursor = self.kodicursor
self.artwork.deleteArtwork(kodiid, "song", self.kodicursor) self.artwork.deleteArtwork(kodiId, "song", self.kodicursor)
self.kodicursor.execute("DELETE FROM song WHERE idSong = ?", (kodiid,)) 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.artwork.deleteArtwork(kodiId, "album", self.kodicursor)
self.kodicursor.execute("DELETE FROM album WHERE idAlbum = ?", (kodiid,)) 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.artwork.deleteArtwork(kodiId, "artist", self.kodicursor)
self.kodicursor.execute("DELETE FROM artist WHERE idArtist = ?", (kodiid,)) self.kodicursor.execute("DELETE FROM artist WHERE idArtist = ?", (kodiId,))

View file

@ -94,7 +94,7 @@ class KodiMonitor(xbmc.Monitor):
try: try:
itemid = emby_dbitem[0] itemid = emby_dbitem[0]
except TypeError: except TypeError:
log("No kodiid returned.", 1) log("No kodiId returned.", 1)
else: else:
url = "{server}/emby/Users/{UserId}/Items/%s?format=json" % itemid url = "{server}/emby/Users/{UserId}/Items/%s?format=json" % itemid
result = doUtils.downloadUrl(url) result = doUtils.downloadUrl(url)

View file

@ -320,7 +320,7 @@ class LibrarySync(threading.Thread):
window('emby_initialScan', clear=True) window('emby_initialScan', clear=True)
if forceddialog: if forceddialog:
xbmcgui.Dialog().notification( xbmcgui.Dialog().notification(
heading="Emby for Kodi", heading=lang(29999),
message="%s %s %s" % message="%s %s %s" %
(message, lang(33025), str(elapsedtotal).split('.')[0]), (message, lang(33025), str(elapsedtotal).split('.')[0]),
icon="special://home/addons/plugin.video.emby/icon.png", icon="special://home/addons/plugin.video.emby/icon.png",
@ -541,7 +541,7 @@ class LibrarySync(threading.Thread):
self.vnodes.singleNode(totalnodes, "channels", "movies", "channels") self.vnodes.singleNode(totalnodes, "channels", "movies", "channels")
totalnodes += 1 totalnodes += 1
# Save total # Save total
utils.window('Emby.nodes.total', str(totalnodes)) window('Emby.nodes.total', str(totalnodes))
# Remove any old referenced views # Remove any old referenced views
log("Removing views: %s" % current_views, 1) log("Removing views: %s" % current_views, 1)
@ -567,7 +567,7 @@ class LibrarySync(threading.Thread):
# Get items per view # Get items per view
if pdialog: if pdialog:
pdialog.update( pdialog.update(
heading="Emby for Kodi", heading=lang(29999),
message="%s %s..." % (lang(33017), view['name'])) message="%s %s..." % (lang(33017), view['name']))
# Initial or repair sync # Initial or repair sync
@ -596,7 +596,7 @@ class LibrarySync(threading.Thread):
##### PROCESS BOXSETS ##### ##### PROCESS BOXSETS #####
if pdialog: 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) boxsets = self.emby.getBoxset(dialog=pdialog)
total = boxsets['TotalRecordCount'] total = boxsets['TotalRecordCount']
@ -642,7 +642,7 @@ class LibrarySync(threading.Thread):
if pdialog: if pdialog:
pdialog.update( pdialog.update(
heading="Emby for Kodi", heading=lang(29999),
message="%s %s..." % (lang(33019), viewName)) message="%s %s..." % (lang(33019), viewName))
# Initial or repair sync # Initial or repair sync
@ -688,7 +688,7 @@ class LibrarySync(threading.Thread):
# Get items per view # Get items per view
if pdialog: if pdialog:
pdialog.update( pdialog.update(
heading="Emby for Kodi", heading=lang(29999),
message="%s %s..." % (lang(33020), view['name'])) message="%s %s..." % (lang(33020), view['name']))
all_embytvshows = self.emby.getShows(view['id'], dialog=pdialog) all_embytvshows = self.emby.getShows(view['id'], dialog=pdialog)
@ -743,7 +743,7 @@ class LibrarySync(threading.Thread):
if pdialog: if pdialog:
pdialog.update( pdialog.update(
heading="Emby for Kodi", heading=lang(29999),
message="%s %s..." % (lang(33021), itemtype)) message="%s %s..." % (lang(33021), itemtype))
all_embyitems = process[itemtype][0](dialog=pdialog) all_embyitems = process[itemtype][0](dialog=pdialog)
@ -900,13 +900,13 @@ class LibrarySync(threading.Thread):
except Exception as e: except Exception as e:
window('emby_dbScan', clear=True) window('emby_dbScan', clear=True)
xbmcgui.Dialog().ok( xbmcgui.Dialog().ok(
heading="Emby for Kodi", heading=lang(29999),
line1=( line1=(
"Library sync thread has exited! " "Library sync thread has exited! "
"You should restart Kodi now. " "You should restart Kodi now. "
"Please report this on the forum.")) "Please report this on the forum."))
raise raise
@utils.profiling()
def run_internal(self): def run_internal(self):
dialog = xbmcgui.Dialog() dialog = xbmcgui.Dialog()
@ -934,10 +934,10 @@ class LibrarySync(threading.Thread):
log("Database version out of date: %s minimum version required: %s" log("Database version out of date: %s minimum version required: %s"
% (currentVersion, minVersion), 0) % (currentVersion, minVersion), 0)
resp = dialog.yesno("Emby for Kodi", lang(33022)) resp = dialog.yesno(lang(29999), lang(33022))
if not resp: if not resp:
log("Database version is out of date! USER IGNORED!", 0) log("Database version is out of date! USER IGNORED!", 0)
dialog.ok("Emby for Kodi", lang(33023)) dialog.ok(lang(29999), lang(33023))
else: else:
utils.reset() utils.reset()
@ -958,7 +958,7 @@ class LibrarySync(threading.Thread):
"to know which Kodi versions are supported.", 0) "to know which Kodi versions are supported.", 0)
dialog.ok( dialog.ok(
heading="Emby for Kodi", heading=lang(29999),
line1=lang(33024)) line1=lang(33024))
break break
@ -1060,7 +1060,7 @@ class ManualSync(LibrarySync):
if pdialog: if pdialog:
pdialog.update( pdialog.update(
heading="Emby for Kodi", heading=lang(29999),
message="%s %s..." % (lang(33026), viewName)) message="%s %s..." % (lang(33026), viewName))
all_embymovies = self.emby.getMovies(viewId, basic=True, dialog=pdialog) all_embymovies = self.emby.getMovies(viewId, basic=True, dialog=pdialog)
@ -1104,7 +1104,7 @@ class ManualSync(LibrarySync):
embyboxsets = [] embyboxsets = []
if pdialog: if pdialog:
pdialog.update(heading="Emby for Kodi", message=lang(33027)) pdialog.update(heading=lang(29999), message=lang(33027))
for boxset in boxsets['Items']: for boxset in boxsets['Items']:
@ -1183,7 +1183,7 @@ class ManualSync(LibrarySync):
if pdialog: if pdialog:
pdialog.update( pdialog.update(
heading="Emby for Kodi", heading=lang(29999),
message="%s %s..." % (lang(33028), viewName)) message="%s %s..." % (lang(33028), viewName))
all_embymvideos = self.emby.getMusicVideos(viewId, basic=True, dialog=pdialog) all_embymvideos = self.emby.getMusicVideos(viewId, basic=True, dialog=pdialog)
@ -1269,7 +1269,7 @@ class ManualSync(LibrarySync):
if pdialog: if pdialog:
pdialog.update( pdialog.update(
heading="Emby for Kodi", heading=lang(29999),
message="%s %s..." % (lang(33029), viewName)) message="%s %s..." % (lang(33029), viewName))
all_embytvshows = self.emby.getShows(viewId, basic=True, dialog=pdialog) all_embytvshows = self.emby.getShows(viewId, basic=True, dialog=pdialog)
@ -1314,7 +1314,7 @@ class ManualSync(LibrarySync):
# Get all episodes in view # Get all episodes in view
if pdialog: if pdialog:
pdialog.update( pdialog.update(
heading="Emby for Kodi", heading=lang(29999),
message="%s %s..." % (lang(33030), viewName)) message="%s %s..." % (lang(33030), viewName))
all_embyepisodes = self.emby.getEpisodes(viewId, basic=True, dialog=pdialog) all_embyepisodes = self.emby.getEpisodes(viewId, basic=True, dialog=pdialog)
@ -1402,7 +1402,7 @@ class ManualSync(LibrarySync):
for data_type in ['artists', 'albums', 'songs']: for data_type in ['artists', 'albums', 'songs']:
if pdialog: if pdialog:
pdialog.update( pdialog.update(
heading="Emby for Kodi", heading=lang(29999),
message="%s %s..." % (lang(33031), data_type)) message="%s %s..." % (lang(33031), data_type))
if data_type != "artists": if data_type != "artists":
all_embyitems = process[data_type][0](basic=True, dialog=pdialog) all_embyitems = process[data_type][0](basic=True, dialog=pdialog)

View file

@ -135,7 +135,7 @@ class PlayUtils():
# Let the user know that direct play failed # Let the user know that direct play failed
settings('failCount', value=str(count+1)) settings('failCount', value=str(count+1))
dialog.notification( dialog.notification(
heading="Emby for Kodi", heading=lang(29999),
message=lang(33011), message=lang(33011),
icon="special://home/addons/plugin.video.emby/icon.png", icon="special://home/addons/plugin.video.emby/icon.png",
sound=False) sound=False)
@ -144,7 +144,7 @@ class PlayUtils():
settings('playFromStream', value="true") settings('playFromStream', value="true")
settings('failCount', value="0") settings('failCount', value="0")
dialog.notification( dialog.notification(
heading="Emby for Kodi", heading=lang(29999),
message=lang(33012), message=lang(33012),
icon="special://home/addons/plugin.video.emby/icon.png", icon="special://home/addons/plugin.video.emby/icon.png",
sound=False) sound=False)

View file

@ -221,7 +221,7 @@ class UserClient(threading.Thread):
log("Access is granted.", 1) log("Access is granted.", 1)
self.HasAccess = True self.HasAccess = True
window('emby_serverStatus', clear=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): def loadCurrUser(self, authenticated=False):
@ -350,7 +350,7 @@ class UserClient(threading.Thread):
if accessToken is not None: if accessToken is not None:
self.currUser = username self.currUser = username
dialog.notification("Emby for Kodi", dialog.notification(lang(29999),
"%s %s!" % (lang(33000), self.currUser.decode('utf-8'))) "%s %s!" % (lang(33000), self.currUser.decode('utf-8')))
settings('accessToken', value=accessToken) settings('accessToken', value=accessToken)
settings('userId%s' % username, value=result['User']['Id']) settings('userId%s' % username, value=result['User']['Id'])

View file

@ -260,7 +260,7 @@ def reset():
dialog = xbmcgui.Dialog() 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 return
# first stop any db sync # first stop any db sync
@ -270,7 +270,7 @@ def reset():
log("Sync is running, will retry: %s..." % count) log("Sync is running, will retry: %s..." % count)
count -= 1 count -= 1
if count == 0: if count == 0:
dialog.ok("Warning", "Could not stop the database from running. Try again.") dialog.ok(language(29999), language(33085))
return return
xbmc.sleep(1000) xbmc.sleep(1000)
@ -322,7 +322,7 @@ def reset():
cursor.close() cursor.close()
# Offer to wipe cached thumbnails # Offer to wipe cached thumbnails
resp = dialog.yesno("Warning", "Remove all cached artwork?") resp = dialog.yesno(language(29999), language(33086))
if resp: if resp:
log("Resetting all cached artwork.", 0) log("Resetting all cached artwork.", 0)
# Remove all existing textures first # Remove all existing textures first
@ -353,7 +353,7 @@ def reset():
settings('SyncInstallRunDone', value="false") settings('SyncInstallRunDone', value="false")
# Remove emby info # Remove emby info
resp = dialog.yesno("Warning", "Reset all Emby Addon settings?") resp = dialog.yesno(language(29999), language(33087))
if resp: if resp:
# Delete the settings # Delete the settings
addon = xbmcaddon.Addon() addon = xbmcaddon.Addon()
@ -362,9 +362,7 @@ def reset():
xbmcvfs.delete(dataPath) xbmcvfs.delete(dataPath)
log("Deleting: settings.xml", 1) log("Deleting: settings.xml", 1)
dialog.ok( dialog.ok(heading=language(29999), line1=language(33088))
heading="Emby for Kodi",
line1="Database reset has completed, Kodi will now restart to apply the changes.")
xbmc.executebuiltin('RestartApp') xbmc.executebuiltin('RestartApp')
def sourcesXML(): def sourcesXML():
@ -424,7 +422,7 @@ def passwordsXML():
credentials = settings('networkCreds') credentials = settings('networkCreds')
if credentials: if credentials:
# Present user with options # 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: if option < 0:
# User cancelled dialog # User cancelled dialog
@ -444,8 +442,8 @@ def passwordsXML():
settings('networkCreds', value="") settings('networkCreds', value="")
xbmcgui.Dialog().notification( xbmcgui.Dialog().notification(
heading="Emby for Kodi", heading=language(29999),
message="%s removed from passwords.xml" % credentials, message="%s %s" % (language(33078), credentials),
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)
@ -453,28 +451,22 @@ def passwordsXML():
elif option == 0: elif option == 0:
# User selected to modify # User selected to modify
server = dialog.input("Modify the computer name or ip address", credentials) server = dialog.input(language(33083), credentials)
if not server: if not server:
return return
else: else:
# No credentials added # No credentials added
dialog.ok( dialog.ok(heading=language(29999), line1=language(33082))
heading="Network credentials", server = dialog.input(language(33084))
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")
if not server: if not server:
return return
# Network username # Network username
user = dialog.input("Enter the network username") user = dialog.input(language(33079))
if not user: if not user:
return return
# Network password # Network password
password = dialog.input( password = dialog.input(heading=language(33080), option=xbmcgui.ALPHANUM_HIDE_INPUT)
heading="Enter the network password",
option=xbmcgui.ALPHANUM_HIDE_INPUT)
if not password: if not password:
return return
@ -503,8 +495,8 @@ def passwordsXML():
etree.ElementTree(root).write(xmlpath) etree.ElementTree(root).write(xmlpath)
dialog.notification( dialog.notification(
heading="Emby for Kodi", heading=language(29999),
message="%s added to passwords.xml" % server, message="%s %s" % (language(33081), server),
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)

View file

@ -80,7 +80,7 @@ class WebSocket_Client(threading.Thread):
if command == "PlayNow": if command == "PlayNow":
dialog.notification( dialog.notification(
heading="Emby for Kodi", heading=lang(29999),
message="%s %s" % (len(itemIds), lang(33004)), message="%s %s" % (len(itemIds), lang(33004)),
icon="special://home/addons/plugin.video.emby/icon.png", icon="special://home/addons/plugin.video.emby/icon.png",
sound=False) sound=False)
@ -89,7 +89,7 @@ class WebSocket_Client(threading.Thread):
elif command == "PlayNext": elif command == "PlayNext":
dialog.notification( dialog.notification(
heading="Emby for Kodi", heading=lang(29999),
message="%s %s" % (len(itemIds), lang(33005)), message="%s %s" % (len(itemIds), lang(33005)),
icon="special://home/addons/plugin.video.emby/icon.png", icon="special://home/addons/plugin.video.emby/icon.png",
sound=False) sound=False)
@ -244,7 +244,7 @@ class WebSocket_Client(threading.Thread):
elif messageType == "ServerRestarting": elif messageType == "ServerRestarting":
if settings('supressRestartMsg') == "true": if settings('supressRestartMsg') == "true":
dialog.notification( dialog.notification(
heading="Emby for Kodi", heading=lang(29999),
message=lang(33006), message=lang(33006),
icon="special://home/addons/plugin.video.emby/icon.png") icon="special://home/addons/plugin.video.emby/icon.png")