Merge branch 'beta-version'

This commit is contained in:
Croneter 2018-07-05 13:26:03 +02:00
commit 2bed767a76
29 changed files with 2042 additions and 42 deletions

View file

@ -1,5 +1,5 @@
[![stable version](https://img.shields.io/badge/stable_version-2.1.3-blue.svg?maxAge=60&style=flat) ](https://github.com/croneter/binary_repo/raw/master/stable/repository.plexkodiconnect/repository.plexkodiconnect-1.0.2.zip)
[![beta version](https://img.shields.io/badge/beta_version-2.2.7-red.svg?maxAge=60&style=flat) ](https://github.com/croneter/binary_repo/raw/master/beta/repository.plexkodiconnectbeta/repository.plexkodiconnectbeta-1.0.2.zip)
[![beta version](https://img.shields.io/badge/beta_version-2.2.8-red.svg?maxAge=60&style=flat) ](https://github.com/croneter/binary_repo/raw/master/beta/repository.plexkodiconnectbeta/repository.plexkodiconnectbeta-1.0.2.zip)
[![Installation](https://img.shields.io/badge/wiki-installation-brightgreen.svg?maxAge=60&style=flat)](https://github.com/croneter/PlexKodiConnect/wiki/Installation)
[![FAQ](https://img.shields.io/badge/wiki-FAQ-brightgreen.svg?maxAge=60&style=flat)](https://github.com/croneter/PlexKodiConnect/wiki/faq)
@ -79,7 +79,8 @@ Some people argue that PKC is 'hacky' because of the way it directly accesses th
+ Portuguese, thanks @goncalo532
+ Russian, thanks @UncleStark
+ Hungarian, thanks @savage93
+ [You can easily help to translate PKC!](https://www.transifex.com/croneter/pkc)
+ Ukrainian, thanks @uniss
+ [Please help and easily translate PKC!](https://www.transifex.com/croneter/pkc)
### Additional Artwork
PKC uses additional artwork for free from [TheMovieDB](https://www.themoviedb.org). Many thanks for lettings us use the API, guys!

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.plexkodiconnect" name="PlexKodiConnect" version="2.2.7" provider-name="croneter">
<addon id="plugin.video.plexkodiconnect" name="PlexKodiConnect" version="2.2.8" provider-name="croneter">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
<import addon="script.module.requests" version="2.9.1" />
@ -19,6 +19,9 @@
</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>
@ -67,7 +70,19 @@
<summary lang="ru_RU">Нативная интеграция сервера Plex в Kodi</summary>
<description lang="ru_RU">Подключите Kodi к своему серверу Plex. Плагин предполагает что вы управляете своими видео с помощью Plex (а не в Kodi). Вы можете потерять текущие базы данных музыки и видео в Kodi (так как плагин напрямую их изменяет). Используйте на свой страх и риск</description>
<disclaimer lang="ru_RU">Используйте на свой страх и риск</disclaimer>
<news>version 2.2.7 (beta only):
<summary lang="uk_UA">Нативна інтеграція Plex в Kodi</summary>
<description lang="uk_UA">Підключає Kodi до серверу Plex. Цей плагін передбачає, що ви керуєте всіма своїми відео за допомогою Plex (і ніяк не Kodi). Ви можете втратити дані, які вже зберігаються у відео та музичних БД Kodi (оскільки цей плагін безпосередньо їх змінює). Використовуйте на свій страх і ризик!</description>
<disclaimer lang="uk_UA">Використовуйте на свій ризик</disclaimer>
<news>version 2.2.8 (beta only):
- Support for Plex collection artwork (PKC settings toggle under Artwork)
- Fix hard PKC reset not working (OSError: no such file)
- Deduplication
- Catch exception
- Update translations
- Extend Kodi metadata
- Update readme
version 2.2.7 (beta only):
- Allow to only sync specific Plex or Kodi playlists
- Don't show artwork sync progress, reduce setting-writes
- Fix playback sometimes not starting up

View file

@ -1,3 +1,12 @@
version 2.2.8 (beta only):
- Support for Plex collection artwork (PKC settings toggle under Artwork)
- Fix hard PKC reset not working (OSError: no such file)
- Deduplication
- Catch exception
- Update translations
- Extend Kodi metadata
- Update readme
version 2.2.7 (beta only):
- Allow to only sync specific Plex or Kodi playlists
- Don't show artwork sync progress, reduce setting-writes

View file

@ -117,11 +117,26 @@ msgctxt "#30019"
msgid "FanartTV lookup completed"
msgstr "Vyhledávání na FanartTV dokončeno"
# PKC settings sync options
msgctxt "#30020"
msgid "Sync Plex playlists"
msgstr ""
# PKC settings sync options
msgctxt "#30021"
msgid "Only sync specific Plex playlists to Kodi"
msgstr ""
# PKC settings category
msgctxt "#30022"
msgid "Advanced"
msgstr "Rozšířené"
# PKC settings sync options
msgctxt "#30023"
msgid "Only sync specific Kodi playlists to Plex"
msgstr ""
msgctxt "#30024"
msgid "Username"
msgstr "Uživ. jméno"
@ -130,6 +145,16 @@ msgctxt "#30025"
msgid "Display message if PMS goes offline"
msgstr "Zobrazit zprávu při odpojení PMS"
# PKC settings sync options
msgctxt "#30026"
msgid "Prefix in Plex playlist name to trigger sync"
msgstr ""
# PKC settings sync options
msgctxt "#30027"
msgid "Prefix in Kodi playlist name to trigger sync"
msgstr ""
msgctxt "#30030"
msgid "Port Number"
msgstr "Číslo portu"

View file

@ -113,11 +113,26 @@ msgctxt "#30019"
msgid "FanartTV lookup completed"
msgstr ""
# PKC settings sync options
msgctxt "#30020"
msgid "Sync Plex playlists"
msgstr ""
# PKC settings sync options
msgctxt "#30021"
msgid "Only sync specific Plex playlists to Kodi"
msgstr ""
# PKC settings category
msgctxt "#30022"
msgid "Advanced"
msgstr "Avanceret"
# PKC settings sync options
msgctxt "#30023"
msgid "Only sync specific Kodi playlists to Plex"
msgstr ""
msgctxt "#30024"
msgid "Username"
msgstr "Brugernavn"
@ -126,6 +141,16 @@ msgctxt "#30025"
msgid "Display message if PMS goes offline"
msgstr "Vise besked hvis PMS går offline"
# PKC settings sync options
msgctxt "#30026"
msgid "Prefix in Plex playlist name to trigger sync"
msgstr ""
# PKC settings sync options
msgctxt "#30027"
msgid "Prefix in Kodi playlist name to trigger sync"
msgstr ""
msgctxt "#30030"
msgid "Port Number"
msgstr "Portnummer"

View file

@ -115,11 +115,26 @@ msgctxt "#30019"
msgid "FanartTV lookup completed"
msgstr "FanartTV Nachforschungen beendet"
# PKC settings sync options
msgctxt "#30020"
msgid "Sync Plex playlists"
msgstr "Plex Wiedergabelisten synchronisieren"
# PKC settings sync options
msgctxt "#30021"
msgid "Only sync specific Plex playlists to Kodi"
msgstr "Nur spezifische Plex Wiedergabelisten synchronisieren"
# PKC settings category
msgctxt "#30022"
msgid "Advanced"
msgstr "Fortgeschritten"
# PKC settings sync options
msgctxt "#30023"
msgid "Only sync specific Kodi playlists to Plex"
msgstr "Nur spezifische Kodi Wiedergabelisten synchronisieren"
msgctxt "#30024"
msgid "Username"
msgstr "Benutzername"
@ -128,6 +143,16 @@ msgctxt "#30025"
msgid "Display message if PMS goes offline"
msgstr "Benachrichtigen, wenn PMS offline ist"
# PKC settings sync options
msgctxt "#30026"
msgid "Prefix in Plex playlist name to trigger sync"
msgstr "Präfix der Plex Wiedergabelisten, welche synchronisiert werden"
# PKC settings sync options
msgctxt "#30027"
msgid "Prefix in Kodi playlist name to trigger sync"
msgstr "Präfix der Kodi Wiedergabelisten, welche synchronisiert werden"
msgctxt "#30030"
msgid "Port Number"
msgstr "Portnummer"

View file

@ -574,6 +574,11 @@ msgctxt "#30542"
msgid "Always pick best quality for trailers"
msgstr ""
# PKC Settings - Artwork
msgctxt "#30543"
msgid "Prefer Kodi artwork for collections/sets"
msgstr ""
msgctxt "#30544"
msgid "Artwork"
msgstr ""

View file

@ -113,11 +113,26 @@ msgctxt "#30019"
msgid "FanartTV lookup completed"
msgstr ""
# PKC settings sync options
msgctxt "#30020"
msgid "Sync Plex playlists"
msgstr ""
# PKC settings sync options
msgctxt "#30021"
msgid "Only sync specific Plex playlists to Kodi"
msgstr ""
# PKC settings category
msgctxt "#30022"
msgid "Advanced"
msgstr "Avanzado"
# PKC settings sync options
msgctxt "#30023"
msgid "Only sync specific Kodi playlists to Plex"
msgstr ""
msgctxt "#30024"
msgid "Username"
msgstr "Usuario"
@ -126,6 +141,16 @@ msgctxt "#30025"
msgid "Display message if PMS goes offline"
msgstr "Mostrar mensaje si el PMS está desconectado"
# PKC settings sync options
msgctxt "#30026"
msgid "Prefix in Plex playlist name to trigger sync"
msgstr ""
# PKC settings sync options
msgctxt "#30027"
msgid "Prefix in Kodi playlist name to trigger sync"
msgstr ""
msgctxt "#30030"
msgid "Port Number"
msgstr "Número de puerto"

View file

@ -113,11 +113,26 @@ msgctxt "#30019"
msgid "FanartTV lookup completed"
msgstr ""
# PKC settings sync options
msgctxt "#30020"
msgid "Sync Plex playlists"
msgstr ""
# PKC settings sync options
msgctxt "#30021"
msgid "Only sync specific Plex playlists to Kodi"
msgstr ""
# PKC settings category
msgctxt "#30022"
msgid "Advanced"
msgstr "Avanzado"
# PKC settings sync options
msgctxt "#30023"
msgid "Only sync specific Kodi playlists to Plex"
msgstr ""
msgctxt "#30024"
msgid "Username"
msgstr "Usuario"
@ -126,6 +141,16 @@ msgctxt "#30025"
msgid "Display message if PMS goes offline"
msgstr "Mostrar mensaje si el PMS está desconectado"
# PKC settings sync options
msgctxt "#30026"
msgid "Prefix in Plex playlist name to trigger sync"
msgstr ""
# PKC settings sync options
msgctxt "#30027"
msgid "Prefix in Kodi playlist name to trigger sync"
msgstr ""
msgctxt "#30030"
msgid "Port Number"
msgstr "Número de puerto"

View file

@ -113,11 +113,26 @@ msgctxt "#30019"
msgid "FanartTV lookup completed"
msgstr ""
# PKC settings sync options
msgctxt "#30020"
msgid "Sync Plex playlists"
msgstr ""
# PKC settings sync options
msgctxt "#30021"
msgid "Only sync specific Plex playlists to Kodi"
msgstr ""
# PKC settings category
msgctxt "#30022"
msgid "Advanced"
msgstr "Avanzado"
# PKC settings sync options
msgctxt "#30023"
msgid "Only sync specific Kodi playlists to Plex"
msgstr ""
msgctxt "#30024"
msgid "Username"
msgstr "Usuario"
@ -126,6 +141,16 @@ msgctxt "#30025"
msgid "Display message if PMS goes offline"
msgstr "Mostrar mensaje si el PMS está desconectado"
# PKC settings sync options
msgctxt "#30026"
msgid "Prefix in Plex playlist name to trigger sync"
msgstr ""
# PKC settings sync options
msgctxt "#30027"
msgid "Prefix in Kodi playlist name to trigger sync"
msgstr ""
msgctxt "#30030"
msgid "Port Number"
msgstr "Número de puerto"

View file

@ -116,11 +116,26 @@ msgctxt "#30019"
msgid "FanartTV lookup completed"
msgstr ""
# PKC settings sync options
msgctxt "#30020"
msgid "Sync Plex playlists"
msgstr ""
# PKC settings sync options
msgctxt "#30021"
msgid "Only sync specific Plex playlists to Kodi"
msgstr ""
# PKC settings category
msgctxt "#30022"
msgid "Advanced"
msgstr "Avancé"
# PKC settings sync options
msgctxt "#30023"
msgid "Only sync specific Kodi playlists to Plex"
msgstr ""
msgctxt "#30024"
msgid "Username"
msgstr "Identifiant"
@ -129,6 +144,16 @@ msgctxt "#30025"
msgid "Display message if PMS goes offline"
msgstr "Afficher un message si PMS se deconnecte"
# PKC settings sync options
msgctxt "#30026"
msgid "Prefix in Plex playlist name to trigger sync"
msgstr ""
# PKC settings sync options
msgctxt "#30027"
msgid "Prefix in Kodi playlist name to trigger sync"
msgstr ""
msgctxt "#30030"
msgid "Port Number"
msgstr "Numéro de port"

View file

@ -118,11 +118,26 @@ msgctxt "#30019"
msgid "FanartTV lookup completed"
msgstr ""
# PKC settings sync options
msgctxt "#30020"
msgid "Sync Plex playlists"
msgstr ""
# PKC settings sync options
msgctxt "#30021"
msgid "Only sync specific Plex playlists to Kodi"
msgstr ""
# PKC settings category
msgctxt "#30022"
msgid "Advanced"
msgstr "Avancé"
# PKC settings sync options
msgctxt "#30023"
msgid "Only sync specific Kodi playlists to Plex"
msgstr ""
msgctxt "#30024"
msgid "Username"
msgstr "Identifiant"
@ -131,6 +146,16 @@ msgctxt "#30025"
msgid "Display message if PMS goes offline"
msgstr "Afficher un message si PMS se deconnecte"
# PKC settings sync options
msgctxt "#30026"
msgid "Prefix in Plex playlist name to trigger sync"
msgstr ""
# PKC settings sync options
msgctxt "#30027"
msgid "Prefix in Kodi playlist name to trigger sync"
msgstr ""
msgctxt "#30030"
msgid "Port Number"
msgstr "Numéro de port"

View file

@ -115,11 +115,26 @@ msgctxt "#30019"
msgid "FanartTV lookup completed"
msgstr ""
# PKC settings sync options
msgctxt "#30020"
msgid "Sync Plex playlists"
msgstr ""
# PKC settings sync options
msgctxt "#30021"
msgid "Only sync specific Plex playlists to Kodi"
msgstr ""
# PKC settings category
msgctxt "#30022"
msgid "Advanced"
msgstr "Haladó"
# PKC settings sync options
msgctxt "#30023"
msgid "Only sync specific Kodi playlists to Plex"
msgstr ""
msgctxt "#30024"
msgid "Username"
msgstr "Felhasználónév"
@ -128,6 +143,16 @@ msgctxt "#30025"
msgid "Display message if PMS goes offline"
msgstr "Üzenet megjelenítése ha a PMS elérhetetlenné válik"
# PKC settings sync options
msgctxt "#30026"
msgid "Prefix in Plex playlist name to trigger sync"
msgstr ""
# PKC settings sync options
msgctxt "#30027"
msgid "Prefix in Kodi playlist name to trigger sync"
msgstr ""
msgctxt "#30030"
msgid "Port Number"
msgstr "Portszám"

View file

@ -118,11 +118,26 @@ msgctxt "#30019"
msgid "FanartTV lookup completed"
msgstr ""
# PKC settings sync options
msgctxt "#30020"
msgid "Sync Plex playlists"
msgstr ""
# PKC settings sync options
msgctxt "#30021"
msgid "Only sync specific Plex playlists to Kodi"
msgstr ""
# PKC settings category
msgctxt "#30022"
msgid "Advanced"
msgstr "Avanzate"
# PKC settings sync options
msgctxt "#30023"
msgid "Only sync specific Kodi playlists to Plex"
msgstr ""
msgctxt "#30024"
msgid "Username"
msgstr "Nome Utente"
@ -131,6 +146,16 @@ msgctxt "#30025"
msgid "Display message if PMS goes offline"
msgstr "Mostra un messaggio se PMS va offline"
# PKC settings sync options
msgctxt "#30026"
msgid "Prefix in Plex playlist name to trigger sync"
msgstr ""
# PKC settings sync options
msgctxt "#30027"
msgid "Prefix in Kodi playlist name to trigger sync"
msgstr ""
msgctxt "#30030"
msgid "Port Number"
msgstr "Porta"

View file

@ -116,11 +116,26 @@ msgctxt "#30019"
msgid "FanartTV lookup completed"
msgstr ""
# PKC settings sync options
msgctxt "#30020"
msgid "Sync Plex playlists"
msgstr ""
# PKC settings sync options
msgctxt "#30021"
msgid "Only sync specific Plex playlists to Kodi"
msgstr ""
# PKC settings category
msgctxt "#30022"
msgid "Advanced"
msgstr "Geavanceerd"
# PKC settings sync options
msgctxt "#30023"
msgid "Only sync specific Kodi playlists to Plex"
msgstr ""
msgctxt "#30024"
msgid "Username"
msgstr "Gebruikersnaam"
@ -129,6 +144,16 @@ msgctxt "#30025"
msgid "Display message if PMS goes offline"
msgstr "Bericht weergeven als PMS offline gaat"
# PKC settings sync options
msgctxt "#30026"
msgid "Prefix in Plex playlist name to trigger sync"
msgstr ""
# PKC settings sync options
msgctxt "#30027"
msgid "Prefix in Kodi playlist name to trigger sync"
msgstr ""
msgctxt "#30030"
msgid "Port Number"
msgstr "Poortnummer"

View file

@ -114,11 +114,26 @@ msgctxt "#30019"
msgid "FanartTV lookup completed"
msgstr ""
# PKC settings sync options
msgctxt "#30020"
msgid "Sync Plex playlists"
msgstr ""
# PKC settings sync options
msgctxt "#30021"
msgid "Only sync specific Plex playlists to Kodi"
msgstr ""
# PKC settings category
msgctxt "#30022"
msgid "Advanced"
msgstr "Avansert"
# PKC settings sync options
msgctxt "#30023"
msgid "Only sync specific Kodi playlists to Plex"
msgstr ""
msgctxt "#30024"
msgid "Username"
msgstr "Brukernavn"
@ -127,6 +142,16 @@ msgctxt "#30025"
msgid "Display message if PMS goes offline"
msgstr "Gi beskjed hvis PMS går ned"
# PKC settings sync options
msgctxt "#30026"
msgid "Prefix in Plex playlist name to trigger sync"
msgstr ""
# PKC settings sync options
msgctxt "#30027"
msgid "Prefix in Kodi playlist name to trigger sync"
msgstr ""
msgctxt "#30030"
msgid "Port Number"
msgstr "Portnummer"

View file

@ -113,11 +113,26 @@ msgctxt "#30019"
msgid "FanartTV lookup completed"
msgstr ""
# PKC settings sync options
msgctxt "#30020"
msgid "Sync Plex playlists"
msgstr ""
# PKC settings sync options
msgctxt "#30021"
msgid "Only sync specific Plex playlists to Kodi"
msgstr ""
# PKC settings category
msgctxt "#30022"
msgid "Advanced"
msgstr "Avançado"
# PKC settings sync options
msgctxt "#30023"
msgid "Only sync specific Kodi playlists to Plex"
msgstr ""
msgctxt "#30024"
msgid "Username"
msgstr "Nome de Utilizador"
@ -126,6 +141,16 @@ msgctxt "#30025"
msgid "Display message if PMS goes offline"
msgstr "Exibir mensagem se o PMS ficar offline"
# PKC settings sync options
msgctxt "#30026"
msgid "Prefix in Plex playlist name to trigger sync"
msgstr ""
# PKC settings sync options
msgctxt "#30027"
msgid "Prefix in Kodi playlist name to trigger sync"
msgstr ""
msgctxt "#30030"
msgid "Port Number"
msgstr "Número da Porta"

View file

@ -115,11 +115,26 @@ msgctxt "#30019"
msgid "FanartTV lookup completed"
msgstr ""
# PKC settings sync options
msgctxt "#30020"
msgid "Sync Plex playlists"
msgstr ""
# PKC settings sync options
msgctxt "#30021"
msgid "Only sync specific Plex playlists to Kodi"
msgstr ""
# PKC settings category
msgctxt "#30022"
msgid "Advanced"
msgstr "Avançado"
# PKC settings sync options
msgctxt "#30023"
msgid "Only sync specific Kodi playlists to Plex"
msgstr ""
msgctxt "#30024"
msgid "Username"
msgstr "Nome de Utilizador"
@ -128,6 +143,16 @@ msgctxt "#30025"
msgid "Display message if PMS goes offline"
msgstr "Exibir mensagem se o PMS ficar offline"
# PKC settings sync options
msgctxt "#30026"
msgid "Prefix in Plex playlist name to trigger sync"
msgstr ""
# PKC settings sync options
msgctxt "#30027"
msgid "Prefix in Kodi playlist name to trigger sync"
msgstr ""
msgctxt "#30030"
msgid "Port Number"
msgstr "Número da Porta"

View file

@ -122,11 +122,26 @@ msgctxt "#30019"
msgid "FanartTV lookup completed"
msgstr "Поиск FanartTV завершен"
# PKC settings sync options
msgctxt "#30020"
msgid "Sync Plex playlists"
msgstr ""
# PKC settings sync options
msgctxt "#30021"
msgid "Only sync specific Plex playlists to Kodi"
msgstr ""
# PKC settings category
msgctxt "#30022"
msgid "Advanced"
msgstr "Расширенные"
# PKC settings sync options
msgctxt "#30023"
msgid "Only sync specific Kodi playlists to Plex"
msgstr ""
msgctxt "#30024"
msgid "Username"
msgstr "Имя пользователя"
@ -135,6 +150,16 @@ msgctxt "#30025"
msgid "Display message if PMS goes offline"
msgstr "Сообщать об отключении от сервера Plex "
# PKC settings sync options
msgctxt "#30026"
msgid "Prefix in Plex playlist name to trigger sync"
msgstr ""
# PKC settings sync options
msgctxt "#30027"
msgid "Prefix in Kodi playlist name to trigger sync"
msgstr ""
msgctxt "#30030"
msgid "Port Number"
msgstr "Порт"

File diff suppressed because it is too large Load diff

View file

@ -114,11 +114,26 @@ msgctxt "#30019"
msgid "FanartTV lookup completed"
msgstr ""
# PKC settings sync options
msgctxt "#30020"
msgid "Sync Plex playlists"
msgstr ""
# PKC settings sync options
msgctxt "#30021"
msgid "Only sync specific Plex playlists to Kodi"
msgstr ""
# PKC settings category
msgctxt "#30022"
msgid "Advanced"
msgstr "高级"
# PKC settings sync options
msgctxt "#30023"
msgid "Only sync specific Kodi playlists to Plex"
msgstr ""
msgctxt "#30024"
msgid "Username"
msgstr "用户名"
@ -127,6 +142,16 @@ msgctxt "#30025"
msgid "Display message if PMS goes offline"
msgstr "如Plex媒体服务器离线则显示消息"
# PKC settings sync options
msgctxt "#30026"
msgid "Prefix in Plex playlist name to trigger sync"
msgstr ""
# PKC settings sync options
msgctxt "#30027"
msgid "Prefix in Kodi playlist name to trigger sync"
msgstr ""
msgctxt "#30030"
msgid "Port Number"
msgstr "端口号"

View file

@ -113,11 +113,26 @@ msgctxt "#30019"
msgid "FanartTV lookup completed"
msgstr ""
# PKC settings sync options
msgctxt "#30020"
msgid "Sync Plex playlists"
msgstr ""
# PKC settings sync options
msgctxt "#30021"
msgid "Only sync specific Plex playlists to Kodi"
msgstr ""
# PKC settings category
msgctxt "#30022"
msgid "Advanced"
msgstr "進階"
# PKC settings sync options
msgctxt "#30023"
msgid "Only sync specific Kodi playlists to Plex"
msgstr ""
msgctxt "#30024"
msgid "Username"
msgstr "使用者"
@ -126,6 +141,16 @@ msgctxt "#30025"
msgid "Display message if PMS goes offline"
msgstr "顯示\"伺服器未連線\""
# PKC settings sync options
msgctxt "#30026"
msgid "Prefix in Plex playlist name to trigger sync"
msgstr ""
# PKC settings sync options
msgctxt "#30027"
msgid "Prefix in Kodi playlist name to trigger sync"
msgstr ""
msgctxt "#30030"
msgid "Port Number"
msgstr "埠號"

View file

@ -114,14 +114,23 @@ class Items(object):
self.kodicursor)
# Also get artwork for collections/movie sets
if kodi_type == v.KODI_TYPE_MOVIE:
for setname in api.collection_list():
for _, setname in api.collection_list():
LOG.debug('Getting artwork for movie set %s', setname)
setid = self.kodi_db.create_collection(setname)
self.artwork.modify_artwork(api.set_artwork(),
external_set_artwork = api.set_artwork()
if (external_set_artwork and
utils.settings('PreferKodiCollectionArt') == 'false'):
# Need to make sure we are not overwriting existing Plex
# collection artwork
plex_artwork = api.artwork(kodi_id=setid,
kodi_type=v.KODI_TYPE_SET)
for art in plex_artwork:
if art in external_set_artwork:
del external_set_artwork[art]
self.artwork.modify_artwork(external_set_artwork,
setid,
v.KODI_TYPE_SET,
self.kodicursor)
self.kodi_db.assign_collection(setid, kodi_id)
return True
def updateUserdata(self, xml):
@ -440,14 +449,32 @@ class Movies(Items):
self.kodi_db.modify_streams(fileid, api.mediastreams(), runtime)
# Process studios
self.kodi_db.modify_studios(movieid, v.KODI_TYPE_MOVIE, studios)
# Process tags: view, Plex collection tags
tags = [viewtag]
tags.extend(collections)
if userdata['Favorite']:
tags.append("Favorite movies")
if collections:
collections_match = api.collections_match()
for plex_set_id, set_name in collections:
tags.append(set_name)
# Add any sets from Plex collection tags
kodi_set_id = self.kodi_db.create_collection(set_name)
self.kodi_db.assign_collection(kodi_set_id, movieid)
for index, plex_id in collections_match:
# Get Plex artwork for collections - a pain
if index == plex_set_id:
set_xml = PF.GetPlexMetadata(plex_id)
try:
set_xml.attrib
except AttributeError:
LOG.error('Could not get set metadata %s', plex_id)
continue
set_api = API(set_xml[0])
artwork.modify_artwork(set_api.artwork(),
kodi_set_id,
v.KODI_TYPE_SET,
kodicursor)
break
self.kodi_db.modify_tags(movieid, v.KODI_TYPE_MOVIE, tags)
# Add any sets from Plex collection tags
self.kodi_db.add_sets(movieid, collections)
# Process playstates
self.kodi_db.set_resume(fileid,
resume,
@ -718,7 +745,7 @@ class TVShows(Items):
self.kodi_db.modify_studios(showid, v.KODI_TYPE_SHOW, studios)
# Process tags: view, PMS collection tags
tags = [viewtag]
tags.extend(collections)
tags.extend([i for _, i in collections])
self.kodi_db.modify_tags(showid, v.KODI_TYPE_SHOW, tags)
@utils.catch_exceptions(warnuser=True)

View file

@ -813,14 +813,6 @@ class KodiDBMethods(object):
'''
self.cursor.execute(query, (kodiid, mediatype, oldtag,))
def add_sets(self, movieid, collections):
"""
Will add the movie to all collections (a list of unicodes)
"""
for setname in collections:
setid = self.create_collection(setname)
self.assign_collection(setid, movieid)
def create_collection(self, set_name):
"""
Returns the collection/set id for set_name [unicode]

View file

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from logging import getLogger
from .watchdog.events import FileSystemEventHandler
from .watchdog import events
from .watchdog.observers import Observer
from . import playlist_func as PL
from .plex_api import API
@ -24,12 +24,6 @@ SUPPORTED_FILETYPES = (
# 'cue',
)
# Watchdog copy-paste
EVENT_TYPE_MOVED = 'moved'
EVENT_TYPE_DELETED = 'deleted'
EVENT_TYPE_CREATED = 'created'
EVENT_TYPE_MODIFIED = 'modified'
def create_plex_playlist(playlist):
"""
@ -174,6 +168,9 @@ def _playlist_file_to_plex_ids(playlist):
"""
if playlist.kodi_extension == 'm3u':
plex_ids = m3u_to_plex_ids(playlist)
else:
LOG.error('Unknown playlist extension: %s', playlist.kodi_extension)
raise PL.PlaylistError
return plex_ids
@ -457,7 +454,7 @@ def sync_kodi_playlist(path):
return False
class PlaylistEventhandler(FileSystemEventHandler):
class PlaylistEventhandler(events.FileSystemEventHandler):
"""
PKC eventhandler to monitor Kodi playlists safed to disk
"""
@ -484,15 +481,15 @@ class PlaylistEventhandler(FileSystemEventHandler):
if (not state.ENABLE_MUSIC and
event.src_path.startswith(v.PLAYLIST_PATH_MUSIC)):
return
path = event.dest_path if event.event_type == EVENT_TYPE_MOVED \
path = event.dest_path if event.event_type == events.EVENT_TYPE_MOVED \
else event.src_path
if not sync_kodi_playlist(path):
return
_method_map = {
EVENT_TYPE_MODIFIED: self.on_modified,
EVENT_TYPE_MOVED: self.on_moved,
EVENT_TYPE_CREATED: self.on_created,
EVENT_TYPE_DELETED: self.on_deleted,
events.EVENT_TYPE_MODIFIED: self.on_modified,
events.EVENT_TYPE_MOVED: self.on_moved,
events.EVENT_TYPE_CREATED: self.on_created,
events.EVENT_TYPE_DELETED: self.on_deleted,
}
event_type = event.event_type
with state.LOCK_PLAYLISTS:

View file

@ -31,7 +31,8 @@ http://stackoverflow.com/questions/111945/is-there-any-way-to-do-http-put-in-pyt
"""
from logging import getLogger
from re import sub
from urllib import urlencode, unquote
from urllib import urlencode, unquote, quote
from urlparse import parse_qsl
from xbmcgui import ListItem
from .downloadutils import DownloadUtils as DU
@ -326,13 +327,13 @@ class API(object):
def collection_list(self):
"""
Returns a list of PMS collection tags or an empty list
Returns a list of tuples of the collection id and tags or an empty list
[(<collection id 1>, <collection name 1>), ...]
"""
collections = []
for child in self.item:
if child.tag == 'Collection':
if child.attrib['tag']:
collections.append(child.attrib['tag'])
collections.append((child.get('id'), child.get('tag')))
return collections
def people(self):
@ -816,9 +817,22 @@ class API(object):
def _one_artwork(self, art_kind):
artwork = self.item.get(art_kind)
if artwork and not artwork.startswith('http'):
artwork = self.attach_plex_token_to_url(
'%s/photo/:/transcode?width=4000&height=4000&'
'minSize=1&upscale=0&url=%s' % (self.server, artwork))
if '/composite/' in artwork:
# e.g. Plex collections where artwork already contains width
# and height. Need to upscale for better resolution
artwork, args = artwork.split('?')
args = dict(parse_qsl(args))
width = int(args.get('width', 400))
height = int(args.get('height', 400))
# Adjust to 4k resolution 3,840x2,160
scaling = 3840.0 / float(max(width, height))
width = int(scaling * width)
height = int(scaling * height)
artwork = '%s?width=%s&height=%s' % (artwork, width, height)
artwork = ('%s/photo/:/transcode?width=3840&height=3840&'
'minSize=1&upscale=0&url=%s'
% (self.server, quote(artwork)))
artwork = self.attach_plex_token_to_url(artwork)
return artwork
def artwork(self, kodi_id=None, kodi_type=None, full_artwork=False):
@ -1189,6 +1203,25 @@ class API(object):
break
return artworks
def library_section_id(self):
"""
Returns the id of the Plex library section (for e.g. a movies section)
or None
"""
return self.item.get('librarySectionID')
def collections_match(self):
"""
Downloads one additional xml from the PMS in order to return a list of
tuples [(collection_id, plex_id), ...] for all collections of the
current item's Plex library sectin
Pass in the collection id of e.g. the movie's metadata
"""
xml = PF.collections(self.library_section_id())
if not xml:
return []
return [(i.get('index'), i.get('ratingKey')) for i in xml]
def set_artwork(self):
"""
Gets the URLs to the Plex artwork, or empty string if not found.

View file

@ -735,6 +735,24 @@ def GetPMSStatus(token):
return answer
def collections(section_id):
"""
Returns an etree with list of collections or None.
"""
url = '{server}/library/sections/%s/all' % section_id
params = {
'type': 18, # Collections
'includeCollections': 1,
}
xml = DU().downloadUrl(url, parameters=params)
try:
xml.attrib
except AttributeError:
LOG.error("Error retrieving collections for %s", url)
xml = None
return xml
def scrobble(ratingKey, state):
"""
Tells the PMS to set an item's watched state to state="watched" or

View file

@ -37,7 +37,7 @@ ADDON_ID = 'plugin.video.plexkodiconnect'
ADDON_VERSION = _ADDON.getAddonInfo('version')
ADDON_PATH = try_decode(_ADDON.getAddonInfo('path'))
ADDON_FOLDER = try_decode(xbmc.translatePath('special://home'))
ADDON_PROFILE = try_decode(_ADDON.getAddonInfo('profile'))
ADDON_PROFILE = try_decode(xbmc.translatePath(_ADDON.getAddonInfo('profile')))
KODILANGUAGE = xbmc.getLanguage(xbmc.ISO_639_1)
KODIVERSION = int(xbmc.getInfoLabel("System.BuildVersion")[:2])
@ -143,6 +143,7 @@ PLEX_PLAYLIST_TYPE_FROM_KODI = {
PLEX_TYPE_VIDEO = 'video'
PLEX_TYPE_MOVIE = 'movie'
PLEX_TYPE_CLIP = 'clip' # e.g. trailers
PLEX_TYPE_SET = 'collection' # sets/collections
PLEX_TYPE_EPISODE = 'episode'
PLEX_TYPE_SEASON = 'season'
@ -257,6 +258,7 @@ KODITYPE_FROM_PLEXTYPE = {
PLEX_TYPE_FROM_KODI_TYPE = {
KODI_TYPE_VIDEO: PLEX_TYPE_VIDEO,
KODI_TYPE_MOVIE: PLEX_TYPE_MOVIE,
KODI_TYPE_SET: PLEX_TYPE_SET,
KODI_TYPE_EPISODE: PLEX_TYPE_EPISODE,
KODI_TYPE_SEASON: PLEX_TYPE_SEASON,
KODI_TYPE_SHOW: PLEX_TYPE_SHOW,

View file

@ -132,7 +132,8 @@
<category label="30544"><!-- artwork -->
<setting id="enableTextureCache" label="30512" type="bool" default="true" /> <!-- Cache all artwork for a smooth Kodi experience -->
<setting id="FanartTV" label="30539" type="bool" default="false" /><!-- Download additional art from FanArtTV -->
<setting label="39222" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect/?mode=fanart)" option="close" visible="eq(-1,true)" subsetting="true" /> <!-- Look for missing fanart on FanartTV now -->
<setting id="PreferKodiCollectionArt" label="30543" type="bool" default="true" visible="eq(-1,true)" subsetting="true"/><!-- Prefer Kodi artwork for collections -->
<setting label="39222" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect/?mode=fanart)" option="close" visible="eq(-2,true)" subsetting="true" /> <!-- Look for missing fanart on FanartTV now -->
<setting id="imageSyncNotifications" label="30008" type="bool" default="true" /><!-- Enable notifications for image caching -->
<setting id="imageSyncDuringPlayback" label="30009" type="bool" default="true" /><!-- Enable image caching during Kodi playback (restart Kodi!) -->
<setting label="39020" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect/?mode=texturecache)" option="close" /> <!-- Cache all images to Kodi texture cache now -->