diff --git a/addon.xml b/addon.xml index 71fcf025..a34f4975 100644 --- a/addon.xml +++ b/addon.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <addon id="plugin.video.emby" name="Emby" - version="2.3.4" + version="2.3.6" provider-name="Emby.media"> <requires> <import addon="xbmc.python" version="2.19.0"/> diff --git a/changelog.txt b/changelog.txt index c6b947e5..28e0ef72 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,7 @@ +version 2.3.6 +- Update French translation +- Fix screensaver bug + version 2.3.4 - add throttling for error event logging diff --git a/resources/language/French/strings.xml b/resources/language/French/strings.xml index 9481c755..cd314aaa 100644 --- a/resources/language/French/strings.xml +++ b/resources/language/French/strings.xml @@ -3,18 +3,12 @@ <!-- Add-on settings --> <string id="29999">Emby pour Kodi</string> <string id="30000">Adresse principale du serveur</string> - <!-- Verified --> <string id="30002">Lire avec HTTP à la place de SMB</string> - <!-- Verified --> <string id="30004">Niveau de journalisation</string> - <!-- Verified --> <string id="30016">Nom de l'appareil</string> - <!-- Verified --> <string id="30022">Avancé</string> <string id="30024">Nom d'utilisateur</string> - <!-- Verified --> <string id="30030">Numéro de port</string> - <!-- Verified --> <string id="30035">Nombre d'album de musique récents à afficher:</string> <string id="30036">Nombre de films récents à afficher:</string> <string id="30037">Nombre d'épisodes télévisés récents à afficher:</string> @@ -204,7 +198,7 @@ <string id="30504">Utiliser un nom alternatif de périphérique</string> <string id="30505">[COLOR yellow]Relancez la connexion[/COLOR]</string> <string id="30506">Options de synchronisation</string> - <string id="30507">Afficher l'avancement de la synchro</string> + <string id="30507">Afficher l'avancement si le total d'objets est supérieur à</string> <string id="30508">Sync Séries TV vides</string> <string id="30509">Activer la bibliothèque musicale</string> <string id="30510">Direct stream bibliothèque musicale</string> @@ -236,6 +230,33 @@ <string id="30536">Sync si l'écran est désactivé</string> <string id="30537">Force Transcode Hi10P</string> <string id="30538">Désactivé</string> + <string id="30539">Connexion</string> + <string id="30540">Connexion manuelle</string> + <string id="30541">Emby Connect</string> + <string id="30542">Serveur</string> + <string id="30543">Nom d'utilisateur ou adresse mail</string> + <string id="30544">Activer la protection anti-verrouillage de la base de données (cela ralentira la synchronisation)</string> + <string id="30545">Activer le message serveur hors-ligne</string> + <!-- dialogs --> + <string id="30600">Se connecter avec Emby Connect</string> + <string id="30602">Mot de passe</string> + <string id="30603">Merci de vous référer à nos conditions d'utilisations. L'utilisation de tout logiciel Emby nécessite l'adhésion à ces conditions.</string> + <string id="30604">Scannez-moi</string> + <string id="30605">Se connecter</string> + <string id="30606">Annuler</string> + <string id="30607">Sélectionner le serveur principal</string> + <string id="30608">Les champs Nom d'utilisateur ou Mot de passe ne peuvent pas être vide</string> + <string id="30609">Impossible de se connecter au serveur sélectionné</string> + <string id="30610">Se connecter à</string> + <!-- Connect to {server} --> + <string id="30611">Ajouter un serveur manuellement</string> + <string id="30612">Merci de vous identifier</string> + <string id="30613">Le nom d'utilisateur ne peut pas être vide</string> + <string id="30614">Se connecter au serveur</string> + <string id="30615">Hôte</string> + <string id="30616">Connexion</string> + <string id="30617">Le serveur ou le port ne peuvent pas être vide</string> + <string id="30618">Changer d'utilisateur Emby Connect</string> <!-- service add-on --> <string id="33000">Bienvenue</string> <string id="33001">Erreur de connexion</string> @@ -248,7 +269,7 @@ <string id="33008">Entrer le mot de passe pour l'utilisateur:</string> <string id="33009">Utilisateur ou mot de passe invalide</string> <string id="33010">Échec de l'authentification de trop nombreuses fois</string> - <string id="33011">Lecture directe impossible</string> + <string id="33011">Lecture directe du fichier impossible</string> <string id="33012">Lecture directe a échoué 3 fois. Activer la lecture a partir de HTTP.</string> <string id="33013">Choisissez le flux audio</string> <string id="33014">Choisissez le flux de sous-titres</string> diff --git a/resources/lib/ga_client.py b/resources/lib/ga_client.py index 8a886fc9..19d85283 100644 --- a/resources/lib/ga_client.py +++ b/resources/lib/ga_client.py @@ -18,6 +18,24 @@ log = logging.getLogger("EMBY."+__name__) logEventHistory = {} +# wrap a function to catch, log and then re throw an exception +def log_error(errors=(Exception, )): + def decorator(func): + def wrapper(*args, **kwargs): + try: + return func(*args, **kwargs) + except errors as error: + ga = GoogleAnalytics() + errStrings = ga.formatException() + ga.sendEventData("Exception", errStrings[0], errStrings[1], True) + log.exception(error) + log.error("log_error: %s \n args: %s \n kwargs: %s", + func.__name__, args, kwargs) + raise + return wrapper + return decorator + +# main GA class class GoogleAnalytics(): testing = False diff --git a/resources/lib/kodimonitor.py b/resources/lib/kodimonitor.py index 6247a82e..a66e790b 100644 --- a/resources/lib/kodimonitor.py +++ b/resources/lib/kodimonitor.py @@ -12,6 +12,7 @@ import downloadutils import embydb_functions as embydb import playbackutils as pbutils from utils import window, settings, kodiSQL +from ga_client import log_error ################################################################################################# @@ -56,6 +57,7 @@ class KodiMonitor(xbmc.Monitor): log.info("New context setting: %s", current_context) window('emby_context', value=current_context) + @log_error() def onNotification(self, sender, method, data): if method not in ('Playlist.OnAdd', 'Player.OnStop', 'Player.OnClear'): diff --git a/resources/lib/player.py b/resources/lib/player.py index 3f19979a..9505238d 100644 --- a/resources/lib/player.py +++ b/resources/lib/player.py @@ -14,7 +14,7 @@ import downloadutils import kodidb_functions as kodidb import websocket_client as wsc from utils import window, settings, language as lang -from ga_client import GoogleAnalytics +from ga_client import GoogleAnalytics, log_error ################################################################################################# @@ -44,6 +44,7 @@ class Player(xbmc.Player): log.debug("Starting playback monitor.") xbmc.Player.__init__(self) + @log_error() def onPlayBackStarted(self): # Will be called when xbmc starts playing a file self.stopAll() @@ -356,6 +357,7 @@ class Player(xbmc.Player): log.debug("Report: %s" % postdata) self.ws.send_progress_update(postdata) + @log_error() def onPlayBackPaused(self): currentFile = self.currentFile @@ -366,6 +368,7 @@ class Player(xbmc.Player): self.reportPlayback() + @log_error() def onPlayBackResumed(self): currentFile = self.currentFile @@ -376,6 +379,7 @@ class Player(xbmc.Player): self.reportPlayback() + @log_error() def onPlayBackSeek(self, time, seekOffset): # Make position when seeking a bit more accurate currentFile = self.currentFile @@ -387,6 +391,7 @@ class Player(xbmc.Player): self.reportPlayback() + @log_error() def onPlayBackStopped(self): # Will be called when user stops xbmc playing a file log.debug("ONPLAYBACK_STOPPED") @@ -396,6 +401,7 @@ class Player(xbmc.Player): log.info("Clear playlist properties.") self.stopAll() + @log_error() def onPlayBackEnded(self): # Will be called when xbmc stops playing a file log.debug("ONPLAYBACK_ENDED") diff --git a/resources/lib/utils.py b/resources/lib/utils.py index 420c4a7f..e2495ef7 100644 --- a/resources/lib/utils.py +++ b/resources/lib/utils.py @@ -227,7 +227,7 @@ def querySQL(query, args=None, cursor=None, conntype=None): def getScreensaver(): # Get the current screensaver value - result = JSONRPC('Settings.getSettingValues').execute({'setting': "screensaver.mode"}) + result = JSONRPC('Settings.getSettingValue').execute({'setting': "screensaver.mode"}) try: return result['result']['value'] except KeyError: diff --git a/resources/lib/websocket_client.py b/resources/lib/websocket_client.py index fb86f82a..52d8ace2 100644 --- a/resources/lib/websocket_client.py +++ b/resources/lib/websocket_client.py @@ -15,6 +15,7 @@ import librarysync import playlist import userclient from utils import window, settings, dialog, language as lang, JSONRPC +from ga_client import log_error ################################################################################################## @@ -60,6 +61,7 @@ class WebSocketClient(threading.Thread): except Exception as error: log.exception(error) + @log_error() def on_message(self, ws, message): result = json.loads(message)