<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon  id="plugin.video.plexkodiconnect" name="PlexKodiConnect" version="2.14.1" provider-name="croneter">
  <requires>
    <import addon="xbmc.python" version="2.1.0"/>
    <import addon="script.module.requests" version="2.9.1" />
    <import addon="script.module.defusedxml" version="0.5.0"/>
    <import addon="script.module.six" />
    <import addon="plugin.video.plexkodiconnect.movies" version="2.1.3" />
    <import addon="plugin.video.plexkodiconnect.tvshows" version="2.1.3" />
  </requires>
  <extension point="xbmc.python.pluginsource" library="default.py">
        <provides>video audio image</provides>
  </extension>
  <extension point="xbmc.service" library="service.py" start="login">
  </extension>
  <extension point="kodi.context.item" library="contextmenu.py">
      <item>
        <label>30401</label>
              <description>30416</description>
              <visible>[!IsEmpty(ListItem.DBID) + !StringCompare(ListItem.DBID,-1) | !IsEmpty(ListItem.Property(plexid))]</visible>
      </item>
  </extension>
  <extension point="xbmc.addon.metadata">
    <summary lang="en">Native Integration of Plex into Kodi</summary>
    <description lang="en">Connect Kodi to your Plex Media Server. This plugin assumes that you manage all your videos with Plex (and none with Kodi). You might lose data already stored in the Kodi video and music databases (as this plugin directly changes them). Use at your own risk!</description>
    <disclaimer lang="en">Use at your own risk</disclaimer>
    <platform>all</platform>
    <license>GNU GENERAL PUBLIC LICENSE. Version 2, June 1991</license>
    <forum>https://forums.plex.tv</forum>
    <website>https://github.com/croneter/PlexKodiConnect</website>
    <email></email>
    <source>https://github.com/croneter/PlexKodiConnect</source>
    <summary lang="nl_NL">Directe integratie van Plex in Kodi</summary>
    <description lang="nl_NL">Verbind Kodi met je Plex Media Server. Deze plugin gaat ervan uit dat je al je video's met Plex (en niet met Kodi) beheerd. Je kunt gegevens reeds opgeslagen in de databases voor video en muziek van Kodi (deze plugin wijzigt deze gegevens direct) verliezen. Gebruik op eigen risico!</description>
    <disclaimer lang="nl_NL">Gebruik op eigen risico</disclaimer>
    <summary lang="fr_CA">Intégration native de Plex dans Kodi</summary>
    <description lang="fr_CA">Connecter Kodi à votre Plex Media Server. Ce plugin assume que vous souhaitez gérer toutes vos vidéos avec Plex (et aucune avec Kodi). Vous pourriez perdre les données déjà stockées dans les bases de données vidéo et musique de Kodi (ce plugin les modifie directement). Utilisez à vos propres risques !</description>
    <disclaimer lang="fr_CA">A utiliser à vos propres risques</disclaimer>
    <summary lang="fr_FR">Intégration native de Plex dans Kodi</summary>
    <description lang="fr_FR">Connecter Kodi à votre Plex Media Server. Ce plugin assume que vous souhaitez gérer toutes vos vidéos avec Plex (et aucune avec Kodi). Vous pourriez perdre les données déjà stockées dans les bases de données vidéo et musique de Kodi (ce plugin les modifie directement). Utilisez à vos propres risques !</description>
    <disclaimer lang="fr_FR">A utiliser à vos propres risques</disclaimer>
    <summary lang="de_DE">Komplette Integration von Plex in Kodi</summary>
    <description lang="de_DE">Verbindet Kodi mit deinem Plex Media Server. Dieses Addon geht davon aus, dass du all deine Videos mit Plex verwaltest (und keine direkt mit Kodi). Du wirst möglicherweise Daten verlieren, die bereits in der Kodi Video- und/oder Musik-Datenbank gespeichert sind (da dieses Addon beide Datenbanken direkt verändert). Benutzung auf eigene Gefahr!</description>
    <disclaimer lang="de_DE">Benutzung auf eigene Gefahr</disclaimer>
    <summary lang="pt_PT">Integração nativa do Plex no Kodi</summary>
    <description lang="pt_PT">Conectar o Kodi ao Servidor Plex Media. Este plugin assume que gerirá todos os vídeos com o Plex (e nenhum com Kodi). Poderá perder dados guardados nas bases de dados de vídeo e musica do Kodi (pois este plugin interfere diretamente com as mesmas). Use por risco de conta própria</description>
    <disclaimer lang="pt_PT">Use por risco de conta própria</disclaimer>
    <summary lang="pt_BR">Integração nativa do Plex no Kodi</summary>
    <description lang="pt_BR">Conectar o Kodi ao Servidor Plex Media. Este plugin assume que gerirá todos os vídeos com o Plex (e nenhum com Kodi). Poderá perder dados guardados nas bases de dados de vídeo e musica do Kodi (pois este plugin interfere diretamente com as mesmas). Use por risco de conta própria</description>
    <disclaimer lang="pt_BR">Use por risco de conta própria</disclaimer>
    <summary lang="es_ES">Integración Nativa de Plex en Kodi</summary>
    <description lang="es_ES">Conecte Kodi a su Plex Media Server.  Este plugin asume que usted gestiona todos sus vídeos con Plex (y ninguno con Kodi). Puede perder datos ya guardados en las bases de datos de vídeo y música de Kodi (ya que este plugin las actualiza directamente). ¡Úselo a su propio riesgo!</description>
    <disclaimer lang="es_ES">Usar a su propio riesgo</disclaimer>
    <summary lang="es_AR">Integración Nativa de Plex en Kodi</summary>
    <description lang="es_AR">Conecte Kodi a su Plex Media Server.  Este plugin asume que usted gestiona todos sus vídeos con Plex (y ninguno con Kodi). Puede perder datos ya guardados en las bases de datos de vídeo y música de Kodi (ya que este plugin las actualiza directamente). ¡Úselo a su propio riesgo!</description>
    <disclaimer lang="es_AR">Usar a su propio riesgo</disclaimer>
    <summary lang="es_MX">Integración Nativa de Plex en Kodi</summary>
    <description lang="es_MX">Conecte Kodi a su Plex Media Server.  Este plugin asume que usted gestiona todos sus vídeos con Plex (y ninguno con Kodi). Puede perder datos ya guardados en las bases de datos de vídeo y música de Kodi (ya que este plugin las actualiza directamente). ¡Úselo a su propio riesgo!</description>
    <disclaimer lang="es_MX">Usar a su propio riesgo</disclaimer>
    <summary lang="cs_CZ">Úplná integrace Plexu do Kodi</summary>
    <description lang="cs_CZ">Připojte Kodi ke svému Plex Media Serveru. Tento doplněk předpokládá, že spravujete veškerá svá videa pomocí Plexu (nikoliv pomocí Kodi). Můžete přijít o data uložená ve video a hudební databázi Kodi (tento doplněk je přímo mění). Používejte na vlastní nebezpečí!</description>
    <disclaimer lang="cs_CZ">Používejte na vlastní nebezpečí</disclaimer>
    <summary lang="da_DK">Indbygget Integration af Plex i Kodi</summary>
    <description lang="da_DK">Tilslut Kodi til din Plex Media Server. Dette plugin forudsætter, at du administrere alle dine videoer med Plex (og ikke med Kodi). Du kan miste data som allerede er gemt i Kodi video og musik-databaser (dette plugin ændrer direkte i dem). Brug på eget ansvar!</description>
    <disclaimer lang="da_DK">Brug på eget ansvar</disclaimer>
    <summary lang="it_IT">Integrazione nativa di Plex su Kodi</summary>
    <description lang="it_IT">Connetti Kodi al tuo Plex Media Server. Questo plugin assume che tu gestisca tutti i video con Plex (e non con Kodi). Potresti perdere i dati dei film e della musica già memorizzati nel database di Kodi (questo plugin modifica direttamente il database stesso). Usa a tuo rischio e pericolo!</description>
    <disclaimer lang="it_IT">Usa a tuo rischio e pericolo</disclaimer>
    <summary lang="no_NO">Naturlig integrasjon av Plex til Kodi</summary>
    <description lang="no_NO">Koble Kodi til din Plex Media Server. Denne plugin forventer at du organiserer alle dine videor med Plex (og ingen med Kodi). Du kan miste all data allerede lagret i Kodi video- og musikkdatabasene (da denne plugin umiddelbart forandrer dem). Bruk på egen risiko!</description>
    <disclaimer lang="no_NO">Bruk på eget ansvar</disclaimer>
    <summary lang="hu_HU">a Plex natív integrációja a Kodi-ba</summary>
    <description lang="hu_HU">Csatlakoztassa a Kodi-t a Plex médiaszerveréhez. Ez a kiegészítő feltételezi, hogy az összes videóját a Plex-szel kezeli (és egyiket sem a Kodi-val). Elveszítheti a már a Kodi videó- és zene-adatbázisában tárolt adatokat (mivel ez a kiegészítő közvetlenül módosítja az adatbázisokat). Csak saját felelősségére használja!</description>
    <disclaimer lang="hu_HU">Csak saját felelősségre használja</disclaimer>
    <summary lang="ru_RU">Нативная интеграция сервера Plex в Kodi</summary>
    <description lang="ru_RU">Подключите Kodi к своему серверу Plex. Плагин предполагает что вы управляете своими видео с помощью Plex (а не в Kodi). Вы можете потерять текущие базы данных музыки и видео в Kodi (так как плагин напрямую их изменяет). Используйте на свой страх и риск</description>
    <disclaimer lang="ru_RU">Используйте на свой страх и риск</disclaimer>
    <summary lang="uk_UA">Нативна інтеграція Plex в Kodi</summary>
    <description lang="uk_UA">Підключає Kodi до серверу Plex. Цей плагін передбачає, що ви керуєте всіма своїми відео за допомогою Plex (і ніяк не Kodi). Ви можете втратити дані, які вже зберігаються у відео та музичних БД Kodi (оскільки цей плагін безпосередньо їх змінює). Використовуйте на свій страх і ризик!</description>
    <disclaimer lang="uk_UA">Використовуйте на свій ризик</disclaimer>
    <disclaimer lang="lv_LV">Lieto uz savu atbildību</disclaimer>
    <summary lang="sv_SE">Inbyggd integrering av Plex i Kodi</summary>
    <description lang="sv_SE">Anslut Kodi till din Plex Media Server. Detta tillägg antar att du hanterar alla dina filmer med Plex (och ingen med Kodi). Du kan förlora data redan sparad i Kodis video och musik databaser (eftersom detta tillägg direkt ändrar dem). Använd på egen risk!</description>
    <disclaimer lang="sv_SE">Använd på egen risk</disclaimer>
    <summary lang="lt_LT">Natūralioji „Plex“ integracija į „Kodi“</summary>
    <description lang="lt_LT">Prijunkite „Kodi“ prie „Plex Medija Serverio“. Šiame papildinyje daroma prielaida, kad valdote visus savo vaizdo įrašus naudodami „Plex“ (ir nė vieno su „Kodi“). Galite prarasti jau saugomus „Kodi“ vaizdo įrašų ir muzikos duomenų bazių duomenis (kadangi šis papildinys juos tiesiogiai pakeičia). Naudokite savo pačių rizika!</description>
    <disclaimer lang="lt_LT">Naudokite savo pačių rizika</disclaimer>
    <summary lang="ko_KR">Plex를 Kodi에 기본 통합</summary>
    <description lang="ko_KR">Kodi를 Plex Media Server에 연결합니다. 이 플러그인은 Plex로 모든 비디오를 관리하고 Kodi로는 관리하지 않는다고 가정합니다. Kodi 비디오 및 음악 데이터베이스에 이미 저장된 데이터가 손실 될 수 있습니다 (이 플러그인이 직접 변경하므로). 자신의 책임하에 사용하십시오!</description>
    <disclaimer lang="ko_KR">자신의 책임하에 사용</disclaimer>
    <news>version 2.14.1 (beta only):
- Use Plex settings for audio and subtitle stream selection. This is a best guess regarding subtitles as Plex and Kodi are not sharing much info
- Fix PlexKodiConnect setting the Plex subtitle to None
- Download landscape artwork from fanart.tv, thanks @geropan
- Revert "Fix PlexKodiConnect changing subtitles for all videos on the PMS"

version 2.14.0:
- Fix PlexKodiConnect changing or removing subtitles for every video on the PMS
- version 2.13.1-2.13.2 for everyone

version 2.13.2 (beta only):
- Fix a racing condition that could lead to the sync getting stuck
- Fix RecursionError: maximum recursion depth exceeded
- Websocket Fix AttributeError: 'NoneType' object has no attribute 'is_ssl'

version 2.13.1 (beta only):
- Fix a racing condition that could lead to the sync process getting stuck
- Fix likelyhood of `database is locked` error occuring

version 2.13.0:
- Support for the Plex HAMA agent to let Kodi identify animes (using Kodi's uniqueID 'anidb')
- Support forced HAMA IDs when using tvdb uniqueID
- version 2.12.26 for everyone

version 2.12.26 (beta only):
- Add an additional Plex Hub "PKC Continue Watching" that merges the Plex Continue Watching with On Deck
- Fix auto-picking of video stream if several video versions are available
- Update translations

version 2.12.25:
- Update websocket client to 0.59.0. Fix threading issues and AttributeErrors

version 2.12.24:
- version 2.12.23 for everyone

version 2.12.23 (beta only):
- Fix Alexa and RuntimeError: dictionary keys changed during iteration
- Fix a rare AttributeError when using playlists

version 2.12.22:
- version 2.12.20 and 2.12.21 for everyone

version 2.12.21 (beta only):
- Switch to new websocket implementation
- Hopefully fix RuntimeError: no add-on id "plugin.video.plexkodiconnect"
- Update translations

version 2.12.20 (beta only):
- Add information to PKC settings for background sync and Alexa whether a connection has been successfully made

version 2.12.19:
- 2.12.17 and 2.12.18 for everyone
- Rename skip intro skin file

version 2.12.18 (beta only):
- Quickly sync recently watched items before synching the playstates of the entire Plex library
- Improve logging for websocket JSON loads

version 2.12.17 (beta only):
- Sync name and user rating of a TV show season to Kodi
- Fix rare TypeError: expected string or buffer on playback start

version 2.12.16:
- versions 2.12.14 and 2.12.15 for everyone

version 2.12.15 (beta only):
- Fix skip intros sometimes not working due to a RuntimeError
- Update translations

version 2.12.14:
- Add skip intro functionality

version 2.12.13:
- Fix KeyError: u'game' if Plex Arcade has been activated
- Fix AttributeError: 'App' object has no attribute 'threads' when sync is cancelled

version 2.12.12:
- Hopefully fix rare case when sync would get stuck indefinitely
- Fix ValueError: invalid literal for int() for invalid dates sent by Plex
- version 2.12.11 for everyone

version 2.12.11 (beta only):
- Fix PKC not auto-picking audio/subtitle stream when transcoding
- Fix ValueError when deleting a music album
- Fix OSError: Invalid argument when Plex returns an invalid timestamp

version 2.12.10:
- Fix pictures from Plex picture libraries not working/displaying

version 2.12.9:
- Fix Local variable 'user' referenced before assignement

version 2.12.8:
- version 2.12.7 for everyone

version 2.12.7 (beta only):
- Fix PKC suddenly using main Plex user's credentials, e.g. when the PMS address changed
- Fix missing Kodi tags for movie collections/sets

version 2.12.6:
- Fix rare KeyError when using PKC widgets
- Fix suspension of artwork caching and PKC becoming unresponsive
- Update translations
- Versions 2.12.4 and 2.12.5 for everyone

version 2.12.5 (beta only):
- Greatly improve matching logic for The Movie Database if Plex does not provide an appropriate id
- Fix high transcoding resolutions not being available for Win10
- Fix rare playback progress report failing and KeyError: u'containerKey'
- Fix rare KeyError: None when trying to sync playlists
- Fix TypeError when canceling Plex sync section dialog

version 2.12.4 (beta only):
- Hopefully fix freeze during sync: Don't assign multiple sets/collections for a specific movie
- Support metadata provider ids (e.g. for IMDB) for the new Plex Movie Agent

version 2.12.3:
- Fix playback failing due to caching of subtitles with non-ascii chars
- Fix ValueError: invalid literal for int() with base 10 during show sync
- Fix UnboundLocalError when certain Plex sections are deleted or being un-synched
- New method to install PlexKodiConnect directly via an URL. You thus do not need to upload a ZIP file to Kodi anymore.

version 2.12.2:
- version 2.12.0 and 2.12.1 for everyone 
- Fix regression: sync dialog not showing up when it should 

version 2.12.1 (beta only):
- Fix PKC shutdown on Kodi profile switch
- Fix Kodi content type for images/photos
- Added support for custom set of safe characters when escaping paths (thanks @geropan)
- Revert "Don't allow spaces in devicename"
- Fix sync dialog showing in certain cases even though user opted out

version 2.12.0 (beta only):
- Fix websocket threads; enable PKC background sync for all Plex Home users!
- Fix PKC incorrectly marking a video as unwatched if an external player has been used
- Update translations

version 2.11.7:
- Fix PKC crashing on devices running Microsoft UWP, e.g. XBox

version 2.11.6:
- Fix rare sync crash when queue was full
- Set "Auto-adjust transcoding quality" to false by default

version 2.11.5:
- Versions 2.11.0-2.11.4 for everyone

version 2.11.4 (beta only):
- Fix another TypeError: 'NoneType' object has no attribute '__getitem__', e.g. when trying to play trailers

version 2.11.3 (beta only):
- Fix TypeError: 'NoneType' object has no attribute '__getitem__', e.g. when displaying albums

version 2.11.2 (beta only):
- Refactor direct and add-on paths. Enables use of Plex music playlists synched to Kodi

version 2.11.1 (beta only):
- Rewire the set-up of audio and subtitle streams, esp. before starting a transcoding session. Fixes playback not starting at all

version 2.11.0 (beta only):
- Fix PKC not burning in (and thus not showing) subtitles when transcoding
- When transcoding, only let user choose to burn-in subtitles that can't be displayed otherwise by Kodi
- Improve PKC automatically connecting to local PMS
- Ensure that our only video transcoding target is h264 
- Fix adjusted subtitle size not working when burning in subtitles
- Fix regression: burn-in subtitles picking up the last user setting instead of the current one
</news>
  </extension>
</addon>
