commit
d8dc959879
41 changed files with 453 additions and 511 deletions
|
@ -1,5 +1,5 @@
|
|||
[![stable version](https://img.shields.io/badge/stable_version-2.10.12-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.10.12-red.svg?maxAge=60&style=flat) ](https://github.com/croneter/binary_repo/raw/master/beta/repository.plexkodiconnectbeta/repository.plexkodiconnectbeta-1.0.2.zip)
|
||||
[![stable version](https://img.shields.io/badge/stable_version-2.11.5-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.11.5-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)
|
||||
|
|
27
addon.xml
27
addon.xml
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<addon id="plugin.video.plexkodiconnect" name="PlexKodiConnect" version="2.10.12" provider-name="croneter">
|
||||
<addon id="plugin.video.plexkodiconnect" name="PlexKodiConnect" version="2.11.5" provider-name="croneter">
|
||||
<requires>
|
||||
<import addon="xbmc.python" version="2.1.0"/>
|
||||
<import addon="script.module.requests" version="2.9.1" />
|
||||
|
@ -83,7 +83,30 @@
|
|||
<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>
|
||||
<news>version 2.10.12:
|
||||
<news>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
|
||||
|
||||
version 2.10.12:
|
||||
- versions 2.10.5-11 for everyone
|
||||
|
||||
version 2.10.11 (beta only):
|
||||
|
|
|
@ -1,3 +1,26 @@
|
|||
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
|
||||
|
||||
version 2.10.12:
|
||||
- versions 2.10.5-11 for everyone
|
||||
|
||||
|
|
|
@ -1141,11 +1141,6 @@ msgctxt "#39074"
|
|||
msgid "TV Shows"
|
||||
msgstr "Seriály"
|
||||
|
||||
# PKC Settings - Playback
|
||||
msgctxt "#39075"
|
||||
msgid "Always use default Plex subtitle if possible"
|
||||
msgstr "Vždy použít výchozí titulky Plexu, pokud je to možné"
|
||||
|
||||
# Pop-up during initial sync
|
||||
msgctxt "#39076"
|
||||
msgid ""
|
||||
|
@ -1514,11 +1509,10 @@ msgctxt "#39705"
|
|||
msgid "Use at your own risk"
|
||||
msgstr "Používejte na vlastní nebezpečí"
|
||||
|
||||
# If user gets prompted to choose between several subtitles. Leave the number
|
||||
# one at the beginning of the string!
|
||||
# If user gets prompted to choose between several subtitles to burn in
|
||||
msgctxt "#39706"
|
||||
msgid "1 No subtitles"
|
||||
msgstr "1 Žádné titulky"
|
||||
msgid "Don't burn-in any subtitle"
|
||||
msgstr ""
|
||||
|
||||
# If user gets prompted to choose between several audio/subtitle tracks and
|
||||
# language is unknown
|
||||
|
|
|
@ -1146,11 +1146,6 @@ msgctxt "#39074"
|
|||
msgid "TV Shows"
|
||||
msgstr "TV-udsendelser"
|
||||
|
||||
# PKC Settings - Playback
|
||||
msgctxt "#39075"
|
||||
msgid "Always use default Plex subtitle if possible"
|
||||
msgstr "Brug altid standard Plex undertekst hvis muligt"
|
||||
|
||||
# Pop-up during initial sync
|
||||
msgctxt "#39076"
|
||||
msgid ""
|
||||
|
@ -1524,11 +1519,10 @@ msgctxt "#39705"
|
|||
msgid "Use at your own risk"
|
||||
msgstr "Brug på eget ansvar"
|
||||
|
||||
# If user gets prompted to choose between several subtitles. Leave the number
|
||||
# one at the beginning of the string!
|
||||
# If user gets prompted to choose between several subtitles to burn in
|
||||
msgctxt "#39706"
|
||||
msgid "1 No subtitles"
|
||||
msgstr "1No undertekster"
|
||||
msgid "Don't burn-in any subtitle"
|
||||
msgstr ""
|
||||
|
||||
# If user gets prompted to choose between several audio/subtitle tracks and
|
||||
# language is unknown
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# XBMC Media Center language file
|
||||
# Translators:
|
||||
# Croneter None <croneter@gmail.com>, 2019
|
||||
# Croneter None <croneter@gmail.com>, 2020
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
|
@ -8,7 +8,7 @@ msgstr ""
|
|||
"Report-Msgid-Bugs-To: croneter@gmail.com\n"
|
||||
"POT-Creation-Date: 2017-04-15 13:13+0000\n"
|
||||
"PO-Revision-Date: 2017-04-30 08:30+0000\n"
|
||||
"Last-Translator: Croneter None <croneter@gmail.com>, 2019\n"
|
||||
"Last-Translator: Croneter None <croneter@gmail.com>, 2020\n"
|
||||
"Language-Team: German (Germany) (https://www.transifex.com/croneter/teams/73837/de_DE/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
@ -1159,11 +1159,6 @@ msgctxt "#39074"
|
|||
msgid "TV Shows"
|
||||
msgstr "Serien"
|
||||
|
||||
# PKC Settings - Playback
|
||||
msgctxt "#39075"
|
||||
msgid "Always use default Plex subtitle if possible"
|
||||
msgstr "Falls möglich, Plex Standard-Untertitel anzeigen"
|
||||
|
||||
# Pop-up during initial sync
|
||||
msgctxt "#39076"
|
||||
msgid ""
|
||||
|
@ -1544,11 +1539,10 @@ msgctxt "#39705"
|
|||
msgid "Use at your own risk"
|
||||
msgstr "Benutzung auf eigene Gefahr"
|
||||
|
||||
# If user gets prompted to choose between several subtitles. Leave the number
|
||||
# one at the beginning of the string!
|
||||
# If user gets prompted to choose between several subtitles to burn in
|
||||
msgctxt "#39706"
|
||||
msgid "1 No subtitles"
|
||||
msgstr "1 Untertitel deaktivieren"
|
||||
msgid "Don't burn-in any subtitle"
|
||||
msgstr "Keinen Untertitel einbrennen"
|
||||
|
||||
# If user gets prompted to choose between several audio/subtitle tracks and
|
||||
# language is unknown
|
||||
|
|
|
@ -1060,11 +1060,6 @@ msgctxt "#39074"
|
|||
msgid "TV Shows"
|
||||
msgstr ""
|
||||
|
||||
# PKC Settings - Playback
|
||||
msgctxt "#39075"
|
||||
msgid "Always use default Plex subtitle if possible"
|
||||
msgstr ""
|
||||
|
||||
# Pop-up during initial sync
|
||||
msgctxt "#39076"
|
||||
msgid "If you use several Plex libraries of one kind, e.g. \"Kids Movies\" and \"Parents Movies\", be sure to check the Wiki: https://goo.gl/JFtQV9"
|
||||
|
@ -1369,9 +1364,9 @@ msgid "Use at your own risk"
|
|||
msgstr ""
|
||||
|
||||
|
||||
# If user gets prompted to choose between several subtitles. Leave the number one at the beginning of the string!
|
||||
# If user gets prompted to choose between several subtitles to burn in
|
||||
msgctxt "#39706"
|
||||
msgid "1 No subtitles"
|
||||
msgid "Don't burn-in any subtitle"
|
||||
msgstr ""
|
||||
|
||||
# If user gets prompted to choose between several audio/subtitle tracks and language is unknown
|
||||
|
|
|
@ -1159,11 +1159,6 @@ msgctxt "#39074"
|
|||
msgid "TV Shows"
|
||||
msgstr "Series"
|
||||
|
||||
# PKC Settings - Playback
|
||||
msgctxt "#39075"
|
||||
msgid "Always use default Plex subtitle if possible"
|
||||
msgstr "Siempre use subtítulos de Plex por defecto si es posible"
|
||||
|
||||
# Pop-up during initial sync
|
||||
msgctxt "#39076"
|
||||
msgid ""
|
||||
|
@ -1539,11 +1534,10 @@ msgctxt "#39705"
|
|||
msgid "Use at your own risk"
|
||||
msgstr "Usar a su propio riesgo"
|
||||
|
||||
# If user gets prompted to choose between several subtitles. Leave the number
|
||||
# one at the beginning of the string!
|
||||
# If user gets prompted to choose between several subtitles to burn in
|
||||
msgctxt "#39706"
|
||||
msgid "1 No subtitles"
|
||||
msgstr "1 Sin subtitulos"
|
||||
msgid "Don't burn-in any subtitle"
|
||||
msgstr ""
|
||||
|
||||
# If user gets prompted to choose between several audio/subtitle tracks and
|
||||
# language is unknown
|
||||
|
|
|
@ -1160,11 +1160,6 @@ msgctxt "#39074"
|
|||
msgid "TV Shows"
|
||||
msgstr "Series"
|
||||
|
||||
# PKC Settings - Playback
|
||||
msgctxt "#39075"
|
||||
msgid "Always use default Plex subtitle if possible"
|
||||
msgstr "Siempre use subtítulos de Plex por defecto si es posible"
|
||||
|
||||
# Pop-up during initial sync
|
||||
msgctxt "#39076"
|
||||
msgid ""
|
||||
|
@ -1540,11 +1535,10 @@ msgctxt "#39705"
|
|||
msgid "Use at your own risk"
|
||||
msgstr "Usar a su propio riesgo"
|
||||
|
||||
# If user gets prompted to choose between several subtitles. Leave the number
|
||||
# one at the beginning of the string!
|
||||
# If user gets prompted to choose between several subtitles to burn in
|
||||
msgctxt "#39706"
|
||||
msgid "1 No subtitles"
|
||||
msgstr "1 Sin subtitulos"
|
||||
msgid "Don't burn-in any subtitle"
|
||||
msgstr ""
|
||||
|
||||
# If user gets prompted to choose between several audio/subtitle tracks and
|
||||
# language is unknown
|
||||
|
|
|
@ -1159,11 +1159,6 @@ msgctxt "#39074"
|
|||
msgid "TV Shows"
|
||||
msgstr "Series"
|
||||
|
||||
# PKC Settings - Playback
|
||||
msgctxt "#39075"
|
||||
msgid "Always use default Plex subtitle if possible"
|
||||
msgstr "Siempre use subtítulos de Plex por defecto si es posible"
|
||||
|
||||
# Pop-up during initial sync
|
||||
msgctxt "#39076"
|
||||
msgid ""
|
||||
|
@ -1539,11 +1534,10 @@ msgctxt "#39705"
|
|||
msgid "Use at your own risk"
|
||||
msgstr "Usar a su propio riesgo"
|
||||
|
||||
# If user gets prompted to choose between several subtitles. Leave the number
|
||||
# one at the beginning of the string!
|
||||
# If user gets prompted to choose between several subtitles to burn in
|
||||
msgctxt "#39706"
|
||||
msgid "1 No subtitles"
|
||||
msgstr "1 Sin subtitulos"
|
||||
msgid "Don't burn-in any subtitle"
|
||||
msgstr ""
|
||||
|
||||
# If user gets prompted to choose between several audio/subtitle tracks and
|
||||
# language is unknown
|
||||
|
|
|
@ -1168,11 +1168,6 @@ msgctxt "#39074"
|
|||
msgid "TV Shows"
|
||||
msgstr "Séries TV"
|
||||
|
||||
# PKC Settings - Playback
|
||||
msgctxt "#39075"
|
||||
msgid "Always use default Plex subtitle if possible"
|
||||
msgstr "Utilisez toujours le sous-titre Plex par défaut si possible"
|
||||
|
||||
# Pop-up during initial sync
|
||||
msgctxt "#39076"
|
||||
msgid ""
|
||||
|
@ -1550,11 +1545,10 @@ msgctxt "#39705"
|
|||
msgid "Use at your own risk"
|
||||
msgstr "A utiliser à vos propres risques"
|
||||
|
||||
# If user gets prompted to choose between several subtitles. Leave the number
|
||||
# one at the beginning of the string!
|
||||
# If user gets prompted to choose between several subtitles to burn in
|
||||
msgctxt "#39706"
|
||||
msgid "1 No subtitles"
|
||||
msgstr "1 pas de sous titre"
|
||||
msgid "Don't burn-in any subtitle"
|
||||
msgstr ""
|
||||
|
||||
# If user gets prompted to choose between several audio/subtitle tracks and
|
||||
# language is unknown
|
||||
|
|
|
@ -1172,11 +1172,6 @@ msgctxt "#39074"
|
|||
msgid "TV Shows"
|
||||
msgstr "Séries TV"
|
||||
|
||||
# PKC Settings - Playback
|
||||
msgctxt "#39075"
|
||||
msgid "Always use default Plex subtitle if possible"
|
||||
msgstr "Utilisez toujours le sous-titre Plex par défaut si possible"
|
||||
|
||||
# Pop-up during initial sync
|
||||
msgctxt "#39076"
|
||||
msgid ""
|
||||
|
@ -1554,11 +1549,10 @@ msgctxt "#39705"
|
|||
msgid "Use at your own risk"
|
||||
msgstr "A utiliser à vos propres risques"
|
||||
|
||||
# If user gets prompted to choose between several subtitles. Leave the number
|
||||
# one at the beginning of the string!
|
||||
# If user gets prompted to choose between several subtitles to burn in
|
||||
msgctxt "#39706"
|
||||
msgid "1 No subtitles"
|
||||
msgstr "1 pas de sous titre"
|
||||
msgid "Don't burn-in any subtitle"
|
||||
msgstr ""
|
||||
|
||||
# If user gets prompted to choose between several audio/subtitle tracks and
|
||||
# language is unknown
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# XBMC Media Center language file
|
||||
# Translators:
|
||||
# Croneter None <croneter@gmail.com>, 2019
|
||||
# Savage93 <savageistheking@gmail.com>, 2019
|
||||
# Savage93 <savageistheking@gmail.com>, 2020
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
|
@ -9,7 +9,7 @@ msgstr ""
|
|||
"Report-Msgid-Bugs-To: croneter@gmail.com\n"
|
||||
"POT-Creation-Date: 2017-04-15 13:13+0000\n"
|
||||
"PO-Revision-Date: 2017-04-30 08:30+0000\n"
|
||||
"Last-Translator: Savage93 <savageistheking@gmail.com>, 2019\n"
|
||||
"Last-Translator: Savage93 <savageistheking@gmail.com>, 2020\n"
|
||||
"Language-Team: Hungarian (Hungary) (https://www.transifex.com/croneter/teams/73837/hu_HU/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
@ -264,6 +264,8 @@ msgstr "Videóminőség, ha transzkódolás szükséges"
|
|||
msgctxt "#30161"
|
||||
msgid "Auto-adjust transcoding quality (deactivate for Chromecast)"
|
||||
msgstr ""
|
||||
"Transzkódolás minőségének automatikus beállítása (kapcsolja ki Chromecasttal"
|
||||
" való használatkor)"
|
||||
|
||||
msgctxt "#30165"
|
||||
msgid "Direct Play"
|
||||
|
@ -713,13 +715,13 @@ msgstr "A szerver elérhető"
|
|||
# Plex notification when we need to transcode
|
||||
msgctxt "#33004"
|
||||
msgid "PMS enforced transcoding"
|
||||
msgstr ""
|
||||
msgstr "PMS kényszerített transzkódolás"
|
||||
|
||||
# Plex notification when we need to use direct streaming (instead of
|
||||
# transcoding)
|
||||
msgctxt "#33005"
|
||||
msgid "PMS enforced direct streaming"
|
||||
msgstr ""
|
||||
msgstr "PMS kényszerített közvetlen streamelés"
|
||||
|
||||
# Error notification
|
||||
msgctxt "#33009"
|
||||
|
@ -1074,6 +1076,8 @@ msgctxt "#39056"
|
|||
msgid ""
|
||||
"Used by sync and when attempting Direct Paths. Restart Kodi on changes!"
|
||||
msgstr ""
|
||||
"Szinkronizáció és közvetlen elérési utak használata esetén szükséges. "
|
||||
"Módosítás esetén indítsa újra a Kodi-t!"
|
||||
|
||||
# PKC Settings, category name
|
||||
msgctxt "#39057"
|
||||
|
@ -1157,12 +1161,6 @@ msgctxt "#39074"
|
|||
msgid "TV Shows"
|
||||
msgstr "TV sorozatok"
|
||||
|
||||
# PKC Settings - Playback
|
||||
msgctxt "#39075"
|
||||
msgid "Always use default Plex subtitle if possible"
|
||||
msgstr ""
|
||||
"Mindig használja az alapértelmezett Plex feliratot amennyiben lehetséges"
|
||||
|
||||
# Pop-up during initial sync
|
||||
msgctxt "#39076"
|
||||
msgid ""
|
||||
|
@ -1292,6 +1290,8 @@ msgstr "Adja meg a Plex médiaszerver IP-címét vagy URL-jét, például:"
|
|||
msgctxt "#39217"
|
||||
msgid "Use HTTPS (SSL) connections? Answer should probably be yes."
|
||||
msgstr ""
|
||||
"Kíván HTTPS (SSL) kapcsolatokat használni? Ha nem biztos benne válassza az "
|
||||
"igent."
|
||||
|
||||
msgctxt "#39218"
|
||||
msgid "Error contacting PMS"
|
||||
|
@ -1540,11 +1540,10 @@ msgctxt "#39705"
|
|||
msgid "Use at your own risk"
|
||||
msgstr "Csak saját felelősségre használja"
|
||||
|
||||
# If user gets prompted to choose between several subtitles. Leave the number
|
||||
# one at the beginning of the string!
|
||||
# If user gets prompted to choose between several subtitles to burn in
|
||||
msgctxt "#39706"
|
||||
msgid "1 No subtitles"
|
||||
msgstr "1 Feliratok kikapcsolása"
|
||||
msgid "Don't burn-in any subtitle"
|
||||
msgstr ""
|
||||
|
||||
# If user gets prompted to choose between several audio/subtitle tracks and
|
||||
# language is unknown
|
||||
|
|
|
@ -1162,11 +1162,6 @@ msgctxt "#39074"
|
|||
msgid "TV Shows"
|
||||
msgstr "Serie TV"
|
||||
|
||||
# PKC Settings - Playback
|
||||
msgctxt "#39075"
|
||||
msgid "Always use default Plex subtitle if possible"
|
||||
msgstr "Usa sempre i sottotitoli predefiniti di Plex se possibile"
|
||||
|
||||
# Pop-up during initial sync
|
||||
msgctxt "#39076"
|
||||
msgid ""
|
||||
|
@ -1548,11 +1543,10 @@ msgctxt "#39705"
|
|||
msgid "Use at your own risk"
|
||||
msgstr "Usa a tuo rischio e pericolo"
|
||||
|
||||
# If user gets prompted to choose between several subtitles. Leave the number
|
||||
# one at the beginning of the string!
|
||||
# If user gets prompted to choose between several subtitles to burn in
|
||||
msgctxt "#39706"
|
||||
msgid "1 No subtitles"
|
||||
msgstr "1 No sottotitoli"
|
||||
msgid "Don't burn-in any subtitle"
|
||||
msgstr ""
|
||||
|
||||
# If user gets prompted to choose between several audio/subtitle tracks and
|
||||
# language is unknown
|
||||
|
|
|
@ -1155,11 +1155,6 @@ msgctxt "#39074"
|
|||
msgid "TV Shows"
|
||||
msgstr "TV Laidos"
|
||||
|
||||
# PKC Settings - Playback
|
||||
msgctxt "#39075"
|
||||
msgid "Always use default Plex subtitle if possible"
|
||||
msgstr "Jei įmanoma, visada naudokite numatytuosius „Plex“ subtitrus"
|
||||
|
||||
# Pop-up during initial sync
|
||||
msgctxt "#39076"
|
||||
msgid ""
|
||||
|
@ -1536,11 +1531,10 @@ msgctxt "#39705"
|
|||
msgid "Use at your own risk"
|
||||
msgstr "Naudokite savo pačių rizika"
|
||||
|
||||
# If user gets prompted to choose between several subtitles. Leave the number
|
||||
# one at the beginning of the string!
|
||||
# If user gets prompted to choose between several subtitles to burn in
|
||||
msgctxt "#39706"
|
||||
msgid "1 No subtitles"
|
||||
msgstr "1 Nėra subtitrų"
|
||||
msgid "Don't burn-in any subtitle"
|
||||
msgstr ""
|
||||
|
||||
# If user gets prompted to choose between several audio/subtitle tracks and
|
||||
# language is unknown
|
||||
|
|
|
@ -591,7 +591,7 @@ msgstr ""
|
|||
# PKC Settings - Sync Options
|
||||
msgctxt "#30524"
|
||||
msgid "Select Plex libraries to sync"
|
||||
msgstr ""
|
||||
msgstr "Izvēlies kuras Plex bibliotēkas sinhronizēt"
|
||||
|
||||
# PKC Settings - Playback
|
||||
msgctxt "#30527"
|
||||
|
@ -702,13 +702,13 @@ msgstr "Serveris ir tiešsaistē"
|
|||
# Plex notification when we need to transcode
|
||||
msgctxt "#33004"
|
||||
msgid "PMS enforced transcoding"
|
||||
msgstr ""
|
||||
msgstr "PMS uzspiestā transkodēšana"
|
||||
|
||||
# Plex notification when we need to use direct streaming (instead of
|
||||
# transcoding)
|
||||
msgctxt "#33005"
|
||||
msgid "PMS enforced direct streaming"
|
||||
msgstr ""
|
||||
msgstr "PMS uzspiestā tiešā straumēšana"
|
||||
|
||||
# Error notification
|
||||
msgctxt "#33009"
|
||||
|
@ -717,11 +717,11 @@ msgstr "Nederīgs lietotājvārds vai parole"
|
|||
|
||||
msgctxt "#33010"
|
||||
msgid "User is unauthorized for server {0}"
|
||||
msgstr ""
|
||||
msgstr "Lietotājs ir neautorizēts serverī {0}"
|
||||
|
||||
msgctxt "#33011"
|
||||
msgid "Plex.tv did not provide us a valid list of Plex users, sorry."
|
||||
msgstr ""
|
||||
msgstr "Plex.tv mums nedeva derīgu Plex lietotāju sarakstu, piedod."
|
||||
|
||||
# Dialog before playback
|
||||
msgctxt "#33013"
|
||||
|
@ -858,7 +858,7 @@ msgstr "Atiestatīt Kodi datubāzi un iespējams atiestatīt PlexKodiConnect"
|
|||
# PKC Settings - Artwork
|
||||
msgctxt "#39020"
|
||||
msgid "Cache all images to Kodi texture cache now"
|
||||
msgstr ""
|
||||
msgstr "Iekešot visus attēlus Kodi tekstūru kešatmiņā tagad"
|
||||
|
||||
# Appended to a listed PMS if it is in the same LAN network as PKC
|
||||
msgctxt "#39022"
|
||||
|
@ -1022,7 +1022,7 @@ msgstr "Nekas nestrādā? Pamēģini pilnu atiestatīšanu!"
|
|||
# PKC Settings - Connection
|
||||
msgctxt "#39050"
|
||||
msgid "Choose Plex Server from a list"
|
||||
msgstr ""
|
||||
msgstr "Izvēlies Plex serveri no saraksta"
|
||||
|
||||
# PKC Settings - Sync
|
||||
msgctxt "#39051"
|
||||
|
@ -1137,11 +1137,6 @@ msgctxt "#39074"
|
|||
msgid "TV Shows"
|
||||
msgstr "Seriāli"
|
||||
|
||||
# PKC Settings - Playback
|
||||
msgctxt "#39075"
|
||||
msgid "Always use default Plex subtitle if possible"
|
||||
msgstr "Vienmēr lietot noklusētos Plex titrus, ja iespējams"
|
||||
|
||||
# Pop-up during initial sync
|
||||
msgctxt "#39076"
|
||||
msgid ""
|
||||
|
@ -1210,7 +1205,7 @@ msgstr "Iestatījumi"
|
|||
|
||||
msgctxt "#39204"
|
||||
msgid "Perform manual library sync"
|
||||
msgstr ""
|
||||
msgstr "Veikt manuālu bibliotēkas sinhronizēšanu"
|
||||
|
||||
# Error message
|
||||
msgctxt "#39205"
|
||||
|
@ -1415,7 +1410,7 @@ msgstr ""
|
|||
|
||||
msgctxt "#39410"
|
||||
msgid "ERROR in library sync"
|
||||
msgstr ""
|
||||
msgstr "KĻŪDA sinhronizējot bibliotēku"
|
||||
|
||||
msgctxt "#39500"
|
||||
msgid "On Deck"
|
||||
|
@ -1423,11 +1418,11 @@ msgstr "Izcelts"
|
|||
|
||||
msgctxt "#39501"
|
||||
msgid "Collections"
|
||||
msgstr ""
|
||||
msgstr "Kolekcijas"
|
||||
|
||||
msgctxt "#39502"
|
||||
msgid "PKC On Deck (faster)"
|
||||
msgstr ""
|
||||
msgstr "PKC On Deck (ātrāk)"
|
||||
|
||||
msgctxt "#39600"
|
||||
msgid ""
|
||||
|
@ -1479,29 +1474,28 @@ msgctxt "#39705"
|
|||
msgid "Use at your own risk"
|
||||
msgstr ""
|
||||
|
||||
# If user gets prompted to choose between several subtitles. Leave the number
|
||||
# one at the beginning of the string!
|
||||
# If user gets prompted to choose between several subtitles to burn in
|
||||
msgctxt "#39706"
|
||||
msgid "1 No subtitles"
|
||||
msgid "Don't burn-in any subtitle"
|
||||
msgstr ""
|
||||
|
||||
# If user gets prompted to choose between several audio/subtitle tracks and
|
||||
# language is unknown
|
||||
msgctxt "#39707"
|
||||
msgid "unknown"
|
||||
msgstr ""
|
||||
msgstr "nezināms"
|
||||
|
||||
# If user gets prompted to choose between several subtitles and Plex adds the
|
||||
# "default" flag
|
||||
msgctxt "#39708"
|
||||
msgid "Default"
|
||||
msgstr ""
|
||||
msgstr "Noklusējums"
|
||||
|
||||
# If user gets prompted to choose between several subtitles and Plex adds the
|
||||
# "forced" flag
|
||||
msgctxt "#39709"
|
||||
msgid "Forced"
|
||||
msgstr ""
|
||||
msgstr "Uzspiests"
|
||||
|
||||
# If user gets prompted to choose between several subtitles the subtitle
|
||||
# cannot be downloaded (has no 'key' attribute from the PMS), the subtitle
|
||||
|
@ -1521,17 +1515,17 @@ msgstr ""
|
|||
# Shown during sync process
|
||||
msgctxt "#39712"
|
||||
msgid "downloaded"
|
||||
msgstr ""
|
||||
msgstr "lejupielādēts"
|
||||
|
||||
# Shown during sync process
|
||||
msgctxt "#39713"
|
||||
msgid "processed"
|
||||
msgstr ""
|
||||
msgstr "apstrādāts"
|
||||
|
||||
# Shown during sync process
|
||||
msgctxt "#39714"
|
||||
msgid "Sync"
|
||||
msgstr ""
|
||||
msgstr "Sinhronizēt"
|
||||
|
||||
# Shown during sync process
|
||||
msgctxt "#39715"
|
||||
|
|
|
@ -1149,11 +1149,6 @@ msgctxt "#39074"
|
|||
msgid "TV Shows"
|
||||
msgstr "TV series"
|
||||
|
||||
# PKC Settings - Playback
|
||||
msgctxt "#39075"
|
||||
msgid "Always use default Plex subtitle if possible"
|
||||
msgstr "Gebruik indien mogelijk altijd standaard Plex ondertitels"
|
||||
|
||||
# Pop-up during initial sync
|
||||
msgctxt "#39076"
|
||||
msgid ""
|
||||
|
@ -1524,11 +1519,10 @@ msgctxt "#39705"
|
|||
msgid "Use at your own risk"
|
||||
msgstr "Gebruik op eigen risico"
|
||||
|
||||
# If user gets prompted to choose between several subtitles. Leave the number
|
||||
# one at the beginning of the string!
|
||||
# If user gets prompted to choose between several subtitles to burn in
|
||||
msgctxt "#39706"
|
||||
msgid "1 No subtitles"
|
||||
msgstr "1 Geen ondertiteling"
|
||||
msgid "Don't burn-in any subtitle"
|
||||
msgstr ""
|
||||
|
||||
# If user gets prompted to choose between several audio/subtitle tracks and
|
||||
# language is unknown
|
||||
|
|
|
@ -1142,11 +1142,6 @@ msgctxt "#39074"
|
|||
msgid "TV Shows"
|
||||
msgstr "TV-show"
|
||||
|
||||
# PKC Settings - Playback
|
||||
msgctxt "#39075"
|
||||
msgid "Always use default Plex subtitle if possible"
|
||||
msgstr "Bruk alltid standard Plex undertekst når mulig"
|
||||
|
||||
# Pop-up during initial sync
|
||||
msgctxt "#39076"
|
||||
msgid ""
|
||||
|
@ -1517,11 +1512,10 @@ msgctxt "#39705"
|
|||
msgid "Use at your own risk"
|
||||
msgstr "Bruk på eget ansvar"
|
||||
|
||||
# If user gets prompted to choose between several subtitles. Leave the number
|
||||
# one at the beginning of the string!
|
||||
# If user gets prompted to choose between several subtitles to burn in
|
||||
msgctxt "#39706"
|
||||
msgid "1 No subtitles"
|
||||
msgstr "1 Ingen undertekst"
|
||||
msgid "Don't burn-in any subtitle"
|
||||
msgstr ""
|
||||
|
||||
# If user gets prompted to choose between several audio/subtitle tracks and
|
||||
# language is unknown
|
||||
|
|
|
@ -1138,11 +1138,6 @@ msgctxt "#39074"
|
|||
msgid "TV Shows"
|
||||
msgstr "Programas de TV"
|
||||
|
||||
# PKC Settings - Playback
|
||||
msgctxt "#39075"
|
||||
msgid "Always use default Plex subtitle if possible"
|
||||
msgstr "Utilize sempre as legendas Plex se possível"
|
||||
|
||||
# Pop-up during initial sync
|
||||
msgctxt "#39076"
|
||||
msgid ""
|
||||
|
@ -1512,11 +1507,10 @@ msgctxt "#39705"
|
|||
msgid "Use at your own risk"
|
||||
msgstr "Use por risco de conta própria"
|
||||
|
||||
# If user gets prompted to choose between several subtitles. Leave the number
|
||||
# one at the beginning of the string!
|
||||
# If user gets prompted to choose between several subtitles to burn in
|
||||
msgctxt "#39706"
|
||||
msgid "1 No subtitles"
|
||||
msgstr "1 Sem legendas"
|
||||
msgid "Don't burn-in any subtitle"
|
||||
msgstr ""
|
||||
|
||||
# If user gets prompted to choose between several audio/subtitle tracks and
|
||||
# language is unknown
|
||||
|
|
|
@ -1141,11 +1141,6 @@ msgctxt "#39074"
|
|||
msgid "TV Shows"
|
||||
msgstr "Programas de TV"
|
||||
|
||||
# PKC Settings - Playback
|
||||
msgctxt "#39075"
|
||||
msgid "Always use default Plex subtitle if possible"
|
||||
msgstr "Utilize sempre as legendas Plex se possível"
|
||||
|
||||
# Pop-up during initial sync
|
||||
msgctxt "#39076"
|
||||
msgid ""
|
||||
|
@ -1515,11 +1510,10 @@ msgctxt "#39705"
|
|||
msgid "Use at your own risk"
|
||||
msgstr "Use por risco de conta própria"
|
||||
|
||||
# If user gets prompted to choose between several subtitles. Leave the number
|
||||
# one at the beginning of the string!
|
||||
# If user gets prompted to choose between several subtitles to burn in
|
||||
msgctxt "#39706"
|
||||
msgid "1 No subtitles"
|
||||
msgstr "1 Sem legendas"
|
||||
msgid "Don't burn-in any subtitle"
|
||||
msgstr ""
|
||||
|
||||
# If user gets prompted to choose between several audio/subtitle tracks and
|
||||
# language is unknown
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# XBMC Media Center language file
|
||||
# Translators:
|
||||
# Croneter None <croneter@gmail.com>, 2017
|
||||
# Алексей Коробцов <korobcoff@gmail.com>, 2017
|
||||
# Alexey Korobcov <korobcoff@gmail.com>, 2017
|
||||
# Павел Хоменко, 2017
|
||||
# Alex Freit <alex.nx@mail.ru>, 2019
|
||||
# Vladimir Supranenok <stark_v@mail.ru>, 2019
|
||||
|
@ -1154,11 +1154,6 @@ msgctxt "#39074"
|
|||
msgid "TV Shows"
|
||||
msgstr "Сериалы"
|
||||
|
||||
# PKC Settings - Playback
|
||||
msgctxt "#39075"
|
||||
msgid "Always use default Plex subtitle if possible"
|
||||
msgstr "Использовать субтитры по умолчанию из Plex, если доступны"
|
||||
|
||||
# Pop-up during initial sync
|
||||
msgctxt "#39076"
|
||||
msgid ""
|
||||
|
@ -1530,11 +1525,10 @@ msgctxt "#39705"
|
|||
msgid "Use at your own risk"
|
||||
msgstr "Используйте на свой страх и риск"
|
||||
|
||||
# If user gets prompted to choose between several subtitles. Leave the number
|
||||
# one at the beginning of the string!
|
||||
# If user gets prompted to choose between several subtitles to burn in
|
||||
msgctxt "#39706"
|
||||
msgid "1 No subtitles"
|
||||
msgstr "1 Без субтитров"
|
||||
msgid "Don't burn-in any subtitle"
|
||||
msgstr ""
|
||||
|
||||
# If user gets prompted to choose between several audio/subtitle tracks and
|
||||
# language is unknown
|
||||
|
|
|
@ -1143,11 +1143,6 @@ msgctxt "#39074"
|
|||
msgid "TV Shows"
|
||||
msgstr "TV-Serier"
|
||||
|
||||
# PKC Settings - Playback
|
||||
msgctxt "#39075"
|
||||
msgid "Always use default Plex subtitle if possible"
|
||||
msgstr "Använd alltid standard-undertext från Plex om möjligt"
|
||||
|
||||
# Pop-up during initial sync
|
||||
msgctxt "#39076"
|
||||
msgid ""
|
||||
|
@ -1518,11 +1513,10 @@ msgctxt "#39705"
|
|||
msgid "Use at your own risk"
|
||||
msgstr "Använd på egen risk"
|
||||
|
||||
# If user gets prompted to choose between several subtitles. Leave the number
|
||||
# one at the beginning of the string!
|
||||
# If user gets prompted to choose between several subtitles to burn in
|
||||
msgctxt "#39706"
|
||||
msgid "1 No subtitles"
|
||||
msgstr "1 Inga undertexter"
|
||||
msgid "Don't burn-in any subtitle"
|
||||
msgstr ""
|
||||
|
||||
# If user gets prompted to choose between several audio/subtitle tracks and
|
||||
# language is unknown
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# XBMC Media Center language file
|
||||
# Translators:
|
||||
# Vlad Anisimov <uniss@ua.fm>, 2019
|
||||
# Vlad Anisimov <uniss@ua.fm>, 2020
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
|
@ -8,7 +8,7 @@ msgstr ""
|
|||
"Report-Msgid-Bugs-To: croneter@gmail.com\n"
|
||||
"POT-Creation-Date: 2017-04-15 13:13+0000\n"
|
||||
"PO-Revision-Date: 2017-04-30 08:30+0000\n"
|
||||
"Last-Translator: Vlad Anisimov <uniss@ua.fm>, 2019\n"
|
||||
"Last-Translator: Vlad Anisimov <uniss@ua.fm>, 2020\n"
|
||||
"Language-Team: Ukrainian (Ukraine) (https://www.transifex.com/croneter/teams/73837/uk_UA/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
@ -262,6 +262,7 @@ msgstr "Якість відео якщо перекодування потріб
|
|||
msgctxt "#30161"
|
||||
msgid "Auto-adjust transcoding quality (deactivate for Chromecast)"
|
||||
msgstr ""
|
||||
"Автоматичне налаштування якості перекодування (деактивуйте для Chromecast)"
|
||||
|
||||
msgctxt "#30165"
|
||||
msgid "Direct Play"
|
||||
|
@ -1150,11 +1151,6 @@ msgctxt "#39074"
|
|||
msgid "TV Shows"
|
||||
msgstr "Серіали"
|
||||
|
||||
# PKC Settings - Playback
|
||||
msgctxt "#39075"
|
||||
msgid "Always use default Plex subtitle if possible"
|
||||
msgstr "Завжди використовувати субтитри Plex за замовчуванням якщо можливо"
|
||||
|
||||
# Pop-up during initial sync
|
||||
msgctxt "#39076"
|
||||
msgid ""
|
||||
|
@ -1282,6 +1278,7 @@ msgstr "Введіть IP адресу або URL вашого серверу Pl
|
|||
msgctxt "#39217"
|
||||
msgid "Use HTTPS (SSL) connections? Answer should probably be yes."
|
||||
msgstr ""
|
||||
"Використовувати з'єднання HTTPS (SSL)? Відповідь, мабуть, має бути так."
|
||||
|
||||
msgctxt "#39218"
|
||||
msgid "Error contacting PMS"
|
||||
|
@ -1528,11 +1525,10 @@ msgctxt "#39705"
|
|||
msgid "Use at your own risk"
|
||||
msgstr "Використовуйте на свій ризик"
|
||||
|
||||
# If user gets prompted to choose between several subtitles. Leave the number
|
||||
# one at the beginning of the string!
|
||||
# If user gets prompted to choose between several subtitles to burn in
|
||||
msgctxt "#39706"
|
||||
msgid "1 No subtitles"
|
||||
msgstr "1 Немає субтитрів"
|
||||
msgid "Don't burn-in any subtitle"
|
||||
msgstr ""
|
||||
|
||||
# If user gets prompted to choose between several audio/subtitle tracks and
|
||||
# language is unknown
|
||||
|
|
|
@ -1107,11 +1107,6 @@ msgctxt "#39074"
|
|||
msgid "TV Shows"
|
||||
msgstr "电视节目"
|
||||
|
||||
# PKC Settings - Playback
|
||||
msgctxt "#39075"
|
||||
msgid "Always use default Plex subtitle if possible"
|
||||
msgstr "如可能始终使用默认Plex字幕"
|
||||
|
||||
# Pop-up during initial sync
|
||||
msgctxt "#39076"
|
||||
msgid ""
|
||||
|
@ -1449,10 +1444,9 @@ msgctxt "#39705"
|
|||
msgid "Use at your own risk"
|
||||
msgstr ""
|
||||
|
||||
# If user gets prompted to choose between several subtitles. Leave the number
|
||||
# one at the beginning of the string!
|
||||
# If user gets prompted to choose between several subtitles to burn in
|
||||
msgctxt "#39706"
|
||||
msgid "1 No subtitles"
|
||||
msgid "Don't burn-in any subtitle"
|
||||
msgstr ""
|
||||
|
||||
# If user gets prompted to choose between several audio/subtitle tracks and
|
||||
|
|
|
@ -1103,11 +1103,6 @@ msgctxt "#39074"
|
|||
msgid "TV Shows"
|
||||
msgstr "電視節目"
|
||||
|
||||
# PKC Settings - Playback
|
||||
msgctxt "#39075"
|
||||
msgid "Always use default Plex subtitle if possible"
|
||||
msgstr "如果可能的話,使用預設 Plex 字幕"
|
||||
|
||||
# Pop-up during initial sync
|
||||
msgctxt "#39076"
|
||||
msgid ""
|
||||
|
@ -1445,10 +1440,9 @@ msgctxt "#39705"
|
|||
msgid "Use at your own risk"
|
||||
msgstr ""
|
||||
|
||||
# If user gets prompted to choose between several subtitles. Leave the number
|
||||
# one at the beginning of the string!
|
||||
# If user gets prompted to choose between several subtitles to burn in
|
||||
msgctxt "#39706"
|
||||
msgid "1 No subtitles"
|
||||
msgid "Don't burn-in any subtitle"
|
||||
msgstr ""
|
||||
|
||||
# If user gets prompted to choose between several audio/subtitle tracks and
|
||||
|
|
|
@ -142,7 +142,7 @@ class ContextMenu(object):
|
|||
v.KODI_PLAYLIST_TYPE_FROM_KODI_TYPE[self.kodi_type])
|
||||
playqueue.clear()
|
||||
app.PLAYSTATE.context_menu_play = True
|
||||
handle = self.api.path(force_addon=True)
|
||||
handle = self.api.fullpath(force_addon=True)[0]
|
||||
handle = 'RunPlugin(%s)' % handle
|
||||
xbmc.executebuiltin(handle.encode('utf-8'))
|
||||
|
||||
|
|
|
@ -291,8 +291,8 @@ class DownloadUtils():
|
|||
return
|
||||
else:
|
||||
r.encoding = 'utf-8'
|
||||
LOG.warn('Unknown answer from PMS %s with status code %s. ',
|
||||
url, r.status_code)
|
||||
LOG.warn('Unknown answer from PMS %s with status code %s: %s',
|
||||
url, r.status_code, r.text)
|
||||
return True
|
||||
|
||||
finally:
|
||||
|
|
|
@ -241,20 +241,18 @@ class InitialSetup(object):
|
|||
"""
|
||||
Checks for server's connectivity. Returns check_connection result
|
||||
"""
|
||||
# Re-direct via plex if remote - will lead to the correct SSL
|
||||
# certificate
|
||||
if server['local']:
|
||||
url = ('%s://%s:%s'
|
||||
% (server['scheme'], server['ip'], server['port']))
|
||||
# Deactive SSL verification if the server is local for Kodi 17
|
||||
verifySSL = True if v.KODIVERSION >= 18 else False
|
||||
else:
|
||||
url = server['baseURL']
|
||||
verifySSL = True
|
||||
chk = PF.check_connection(url,
|
||||
token=server['token'],
|
||||
verifySSL=verifySSL)
|
||||
return chk
|
||||
if not server['token']:
|
||||
# Plex GDM: we only get the token from plex.tv after
|
||||
# Sign-in to plex.tv
|
||||
server['token'] = utils.settings('plexToken') or None
|
||||
return PF.check_connection(server['baseURL'],
|
||||
token=server['token'],
|
||||
verifySSL=verifySSL)
|
||||
|
||||
def pick_pms(self, showDialog=False, inform_of_search=False):
|
||||
"""
|
||||
|
|
|
@ -5,7 +5,7 @@ from logging import getLogger
|
|||
|
||||
from .common import ItemBase
|
||||
from ..plex_api import API
|
||||
from .. import app, variables as v, plex_functions as PF, utils
|
||||
from .. import app, variables as v, plex_functions as PF
|
||||
|
||||
LOG = getLogger('PLEX.movies')
|
||||
|
||||
|
@ -36,35 +36,12 @@ class Movie(ItemBase):
|
|||
update_item = False
|
||||
kodi_id = self.kodidb.new_movie_id()
|
||||
|
||||
# GET THE FILE AND PATH #####
|
||||
do_indirect = not app.SYNC.direct_paths
|
||||
if app.SYNC.direct_paths:
|
||||
# Direct paths is set the Kodi way
|
||||
playurl = api.file_path(force_first_media=True)
|
||||
if playurl is None:
|
||||
# Something went wrong, trying to use non-direct paths
|
||||
do_indirect = True
|
||||
else:
|
||||
playurl = api.validate_playurl(playurl, api.plex_type)
|
||||
if playurl is None:
|
||||
return False
|
||||
if '\\' in playurl:
|
||||
# Local path
|
||||
filename = playurl.rsplit("\\", 1)[1]
|
||||
else:
|
||||
# Network share
|
||||
filename = playurl.rsplit("/", 1)[1]
|
||||
path = utils.rreplace(playurl, filename, "", 1)
|
||||
kodi_pathid = self.kodidb.add_path(path,
|
||||
content='movies',
|
||||
scraper='metadata.local')
|
||||
if do_indirect:
|
||||
# Set plugin path and media flags using real filename
|
||||
filename = api.file_name(force_first_media=True)
|
||||
path = 'plugin://%s.movies/' % v.ADDON_ID
|
||||
filename = ('%s?plex_id=%s&plex_type=%s&mode=play&filename=%s'
|
||||
% (path, plex_id, v.PLEX_TYPE_MOVIE, filename))
|
||||
playurl = filename
|
||||
fullpath, path, filename = api.fullpath()
|
||||
if app.SYNC.direct_paths and not fullpath.startswith('http'):
|
||||
kodi_pathid = self.kodidb.add_path(path,
|
||||
content='movies',
|
||||
scraper='metadata.local')
|
||||
else:
|
||||
kodi_pathid = self.kodidb.get_path(path)
|
||||
|
||||
if update_item:
|
||||
|
@ -150,7 +127,7 @@ class Movie(ItemBase):
|
|||
api.list_to_string(api.studios()),
|
||||
api.trailer(),
|
||||
api.list_to_string(api.countries()),
|
||||
playurl,
|
||||
fullpath,
|
||||
kodi_pathid,
|
||||
api.premiere_date(),
|
||||
api.userrating())
|
||||
|
|
|
@ -7,7 +7,7 @@ from .common import ItemBase
|
|||
from ..plex_api import API
|
||||
from ..plex_db import PlexDB, PLEXDB_LOCK
|
||||
from ..kodi_db import KodiMusicDB, KODIDB_LOCK
|
||||
from .. import plex_functions as PF, db, timing, app, variables as v, utils
|
||||
from .. import plex_functions as PF, db, timing, app, variables as v
|
||||
|
||||
LOG = getLogger('PLEX.music')
|
||||
|
||||
|
@ -520,33 +520,7 @@ class Song(MusicMixin, ItemBase):
|
|||
if entry.tag == 'Mood':
|
||||
moods.append(entry.attrib['tag'])
|
||||
mood = api.list_to_string(moods)
|
||||
|
||||
# GET THE FILE AND PATH #####
|
||||
do_indirect = not app.SYNC.direct_paths
|
||||
if app.SYNC.direct_paths:
|
||||
# Direct paths is set the Kodi way
|
||||
playurl = api.file_path(force_first_media=True)
|
||||
if playurl is None:
|
||||
# Something went wrong, trying to use non-direct paths
|
||||
do_indirect = True
|
||||
else:
|
||||
playurl = api.validate_playurl(playurl, api.plex_type)
|
||||
if playurl is None:
|
||||
return False
|
||||
if "\\" in playurl:
|
||||
# Local path
|
||||
filename = playurl.rsplit("\\", 1)[1]
|
||||
else:
|
||||
# Network share
|
||||
filename = playurl.rsplit("/", 1)[1]
|
||||
path = utils.rreplace(playurl, filename, "", 1)
|
||||
if do_indirect:
|
||||
# Plex works a bit differently
|
||||
path = "%s%s" % (app.CONN.server, xml[0][0].get('key'))
|
||||
path = api.attach_plex_token_to_url(path)
|
||||
filename = path.rsplit('/', 1)[1]
|
||||
path = path.replace(filename, '')
|
||||
|
||||
_, path, filename = api.fullpath()
|
||||
# UPDATE THE SONG #####
|
||||
if update_item:
|
||||
LOG.info("UPDATE song plex_id: %s - %s", plex_id, title)
|
||||
|
|
|
@ -5,7 +5,7 @@ from logging import getLogger
|
|||
|
||||
from .common import ItemBase, process_path
|
||||
from ..plex_api import API
|
||||
from .. import plex_functions as PF, app, variables as v, utils
|
||||
from .. import plex_functions as PF, app, variables as v
|
||||
|
||||
LOG = getLogger('PLEX.tvshows')
|
||||
|
||||
|
@ -420,43 +420,22 @@ class Episode(TvShowMixin, ItemBase):
|
|||
return
|
||||
parent_id = season['kodi_id'] if season else None
|
||||
|
||||
# GET THE FILE AND PATH #####
|
||||
do_indirect = not app.SYNC.direct_paths
|
||||
if app.SYNC.direct_paths:
|
||||
playurl = api.file_path(force_first_media=True)
|
||||
if playurl is None:
|
||||
do_indirect = True
|
||||
else:
|
||||
playurl = api.validate_playurl(playurl, v.PLEX_TYPE_EPISODE)
|
||||
if "\\" in playurl:
|
||||
# Local path
|
||||
filename = playurl.rsplit("\\", 1)[1]
|
||||
else:
|
||||
# Network share
|
||||
filename = playurl.rsplit("/", 1)[1]
|
||||
path = utils.rreplace(playurl, filename, "", 1)
|
||||
parent_path_id = self.kodidb.parent_path_id(path)
|
||||
kodi_pathid = self.kodidb.add_path(path,
|
||||
id_parent_path=parent_path_id)
|
||||
if do_indirect:
|
||||
# Set plugin path - do NOT use "intermediate" paths for the show
|
||||
# as with direct paths!
|
||||
filename = api.file_name(force_first_media=True)
|
||||
path = 'plugin://%s.tvshows/%s/' % (v.ADDON_ID, api.show_id())
|
||||
filename = ('%s?plex_id=%s&plex_type=%s&mode=play&filename=%s'
|
||||
% (path, plex_id, v.PLEX_TYPE_EPISODE, filename))
|
||||
playurl = filename
|
||||
fullpath, path, filename = api.fullpath()
|
||||
if app.SYNC.direct_paths and not fullpath.startswith('http'):
|
||||
parent_path_id = self.kodidb.parent_path_id(path)
|
||||
kodi_pathid = self.kodidb.add_path(path,
|
||||
id_parent_path=parent_path_id)
|
||||
else:
|
||||
# Root path tvshows/ already saved in Kodi DB
|
||||
kodi_pathid = self.kodidb.add_path(path)
|
||||
if not app.SYNC.direct_paths:
|
||||
# need to set a 2nd file entry for a path without plex show id
|
||||
# This fixes e.g. context menu and widgets working as they
|
||||
# should
|
||||
# A dirty hack, really
|
||||
path_2 = 'plugin://%s.tvshows/' % v.ADDON_ID
|
||||
# filename_2 is exactly the same as filename
|
||||
# so WITH plex show id!
|
||||
kodi_pathid_2 = self.kodidb.add_path(path_2)
|
||||
# need to set a 2nd file entry for a path without plex show id
|
||||
# This fixes e.g. context menu and widgets working as they
|
||||
# should
|
||||
# A dirty hack, really
|
||||
path_2 = 'plugin://%s.tvshows/' % v.ADDON_ID
|
||||
# filename_2 is exactly the same as filename
|
||||
# so WITH plex show id!
|
||||
kodi_pathid_2 = self.kodidb.add_path(path_2)
|
||||
|
||||
# UPDATE THE EPISODE #####
|
||||
if update_item:
|
||||
|
@ -512,7 +491,7 @@ class Episode(TvShowMixin, ItemBase):
|
|||
api.title(),
|
||||
airs_before_season,
|
||||
airs_before_episode,
|
||||
playurl,
|
||||
fullpath,
|
||||
kodi_pathid,
|
||||
uniqueid,
|
||||
kodi_fileid, # and NOT kodi_fileid_2
|
||||
|
@ -594,7 +573,7 @@ class Episode(TvShowMixin, ItemBase):
|
|||
grandparent_id,
|
||||
airs_before_season,
|
||||
airs_before_episode,
|
||||
playurl,
|
||||
fullpath,
|
||||
kodi_pathid,
|
||||
uniqueid,
|
||||
parent_id,
|
||||
|
|
|
@ -575,7 +575,7 @@ def _notify_upnext(item):
|
|||
full_artwork=True)
|
||||
}
|
||||
_complete_artwork_keys(info[key])
|
||||
info['play_info'] = {'handle': next_api.path(force_addon=True)}
|
||||
info['play_info'] = {'handle': next_api.fullpath(force_addon=True)[0]}
|
||||
sender = v.ADDON_ID.encode('utf-8')
|
||||
method = 'upnext_data'.encode('utf-8')
|
||||
data = binascii.hexlify(json.dumps(info))
|
||||
|
|
|
@ -84,4 +84,10 @@ def check_migration():
|
|||
from . import library_sync
|
||||
library_sync.force_full_sync()
|
||||
|
||||
if not utils.compare_version(last_migration, '2.11.3'):
|
||||
LOG.info('Migrating to version 2.11.2')
|
||||
# Re-sync all playlists to Kodi
|
||||
from .playlists import remove_synced_playlists
|
||||
remove_synced_playlists()
|
||||
|
||||
utils.settings('last_migrated_PKC_version', value=v.ADDON_VERSION)
|
||||
|
|
|
@ -12,16 +12,10 @@ import xbmc
|
|||
|
||||
from .plex_api import API
|
||||
from .plex_db import PlexDB
|
||||
from . import plex_functions as PF
|
||||
from . import utils
|
||||
from .kodi_db import KodiVideoDB
|
||||
from . import playlist_func as PL
|
||||
from . import playqueue as PQ
|
||||
from . import json_rpc as js
|
||||
from . import transfer
|
||||
from .playback_decision import set_playurl, audio_subtitle_prefs
|
||||
from . import variables as v
|
||||
from . import app
|
||||
from . import plex_functions as PF, playlist_func as PL, playqueue as PQ
|
||||
from . import json_rpc as js, variables as v, utils, transfer
|
||||
from . import playback_decision, app
|
||||
|
||||
###############################################################################
|
||||
LOG = getLogger('PLEX.playback')
|
||||
|
@ -356,7 +350,7 @@ def _prep_playlist_stack(xml, resume):
|
|||
api.part = part
|
||||
if kodi_id is None:
|
||||
# Need to redirect again to PKC to conclude playback
|
||||
path = api.path(force_addon=True, force_first_media=True)
|
||||
path = api.fullpath(force_addon=True)[0]
|
||||
# Using different paths than the ones saved in the Kodi DB
|
||||
# fixes Kodi immediately resuming the video if one restarts
|
||||
# the same video again after playback
|
||||
|
@ -451,19 +445,26 @@ def _conclude_playback(playqueue, pos):
|
|||
LOG.debug('Concluding playback for playqueue position %s', pos)
|
||||
item = playqueue.items[pos]
|
||||
api = API(item.xml)
|
||||
api.part = item.part or 0
|
||||
listitem = api.listitem(listitem=transfer.PKCListItem, resume=False)
|
||||
set_playurl(api, item)
|
||||
if not item.file:
|
||||
LOG.debug('Did not get a playurl, aborting playback silently')
|
||||
if api.mediastream_number() is None:
|
||||
# E.g. user could choose between several media streams and cancelled
|
||||
LOG.debug('Did not get a mediastream_number')
|
||||
_ensure_resolve()
|
||||
return
|
||||
api.part = item.part or 0
|
||||
playback_decision.set_pkc_playmethod(api, item)
|
||||
if not playback_decision.audio_subtitle_prefs(api, item):
|
||||
LOG.info('Did not set audio subtitle prefs, aborting silently')
|
||||
_ensure_resolve()
|
||||
return
|
||||
playback_decision.set_playurl(api, item)
|
||||
if not item.file:
|
||||
LOG.info('Did not get a playurl, aborting playback silently')
|
||||
_ensure_resolve()
|
||||
return
|
||||
listitem = api.listitem(listitem=transfer.PKCListItem, resume=False)
|
||||
listitem.setPath(item.file.encode('utf-8'))
|
||||
if item.playmethod == v.PLAYBACK_METHOD_DIRECT_PLAY:
|
||||
if item.playmethod != v.PLAYBACK_METHOD_DIRECT_PATH:
|
||||
listitem.setSubtitles(api.cache_external_subs())
|
||||
elif item.playmethod in (v.PLAYBACK_METHOD_DIRECT_STREAM,
|
||||
v.PLAYBACK_METHOD_TRANSCODE):
|
||||
audio_subtitle_prefs(api, listitem)
|
||||
transfer.send(listitem)
|
||||
LOG.debug('Done concluding playback')
|
||||
|
||||
|
|
|
@ -18,33 +18,36 @@ DIRECT_PLAY_OK = 1000
|
|||
CONVERSION_OK = 1001 # PMS can either direct stream or transcode
|
||||
|
||||
|
||||
def set_playurl(api, item):
|
||||
if api.mediastream_number() is None:
|
||||
# E.g. user could choose between several media streams and cancelled
|
||||
return
|
||||
def set_pkc_playmethod(api, item):
|
||||
item.playmethod = int(utils.settings('playType'))
|
||||
LOG.info('User chose playback method %s in PKC settings',
|
||||
v.EXPLICIT_PLAYBACK_METHOD[item.playmethod])
|
||||
_initial_best_playback_method(api, item)
|
||||
LOG.info('PKC decided on playback method %s',
|
||||
v.EXPLICIT_PLAYBACK_METHOD[item.playmethod])
|
||||
if item.playmethod == v.PLAYBACK_METHOD_DIRECT_PATH:
|
||||
# No need to ask the PMS whether we can play - we circumvent
|
||||
# the PMS entirely
|
||||
LOG.info('The playurl for %s is: %s',
|
||||
v.EXPLICIT_PLAYBACK_METHOD[item.playmethod], item.file)
|
||||
return
|
||||
LOG.info('Lets ask the PMS next')
|
||||
|
||||
|
||||
def set_playurl(api, item):
|
||||
try:
|
||||
_pms_playback_decision(api, item)
|
||||
except (exceptions.RequestException, AttributeError, IndexError, SystemExit) as err:
|
||||
LOG.warn('Could not find suitable settings for playback, aborting')
|
||||
LOG.warn('Error received: %s', err)
|
||||
item.playmethod = None
|
||||
item.file = None
|
||||
else:
|
||||
item.file = api.transcode_video_path(item.playmethod,
|
||||
quality=item.quality)
|
||||
if item.playmethod == v.PLAYBACK_METHOD_DIRECT_PATH:
|
||||
# No need to ask the PMS whether we can play - we circumvent
|
||||
# the PMS entirely
|
||||
return
|
||||
LOG.info('Lets ask the PMS next')
|
||||
try:
|
||||
_pms_playback_decision(api, item)
|
||||
except (exceptions.RequestException,
|
||||
AttributeError,
|
||||
IndexError,
|
||||
SystemExit):
|
||||
LOG.warn('Could not find suitable settings for playback, aborting')
|
||||
utils.ERROR(notify=True)
|
||||
item.playmethod = None
|
||||
item.file = None
|
||||
else:
|
||||
item.file = api.transcode_video_path(item.playmethod,
|
||||
quality=item.quality)
|
||||
finally:
|
||||
LOG.info('The playurl for %s is: %s',
|
||||
v.EXPLICIT_PLAYBACK_METHOD[item.playmethod], item.file)
|
||||
|
||||
|
@ -316,12 +319,16 @@ def _getH265():
|
|||
return H265[utils.settings('transcodeH265')]
|
||||
|
||||
|
||||
def audio_subtitle_prefs(api, listitem):
|
||||
def audio_subtitle_prefs(api, item):
|
||||
"""
|
||||
For transcoding only
|
||||
Sets the stage for transcoding, letting the user potentially choose both
|
||||
audio and subtitle streams; subtitle streams to burn-into the video file.
|
||||
|
||||
Called at the very beginning of play; used to change audio and subtitle
|
||||
stream by a PUT request to the PMS
|
||||
Uses a PUT request to the PMS, simulating e.g. the user using Plex Web,
|
||||
choosing a different stream in the video's metadata and THEN initiating
|
||||
playback.
|
||||
|
||||
Returns None if user cancelled or we need to abort, True otherwise
|
||||
"""
|
||||
# Set media and part where we're at
|
||||
if (api.mediastream is None and
|
||||
|
@ -334,19 +341,26 @@ def audio_subtitle_prefs(api, listitem):
|
|||
api.mediastream, api.part)
|
||||
return
|
||||
part_id = mediastreams.attrib['id']
|
||||
if item.playmethod != v.PLAYBACK_METHOD_TRANSCODE:
|
||||
LOG.debug('Telling PMS we are not burning in any subtitles')
|
||||
args = {
|
||||
'subtitleStreamID': 0,
|
||||
'allParts': 1
|
||||
}
|
||||
DU().downloadUrl('{server}/library/parts/%s' % part_id,
|
||||
action_type='PUT',
|
||||
parameters=args)
|
||||
return True
|
||||
audio_streams_list = []
|
||||
audio_streams = []
|
||||
subtitle_streams_list = []
|
||||
# No subtitles as an option
|
||||
subtitle_streams = [utils.lang(39706)]
|
||||
downloadable_streams = []
|
||||
download_subs = []
|
||||
# "Don't burn-in any subtitle"
|
||||
subtitle_streams = ['1 %s' % utils.lang(39706)]
|
||||
# selectAudioIndex = ""
|
||||
select_subs_index = ""
|
||||
audio_numb = 0
|
||||
# Remember 'no subtitles'
|
||||
sub_num = 1
|
||||
default_sub = None
|
||||
|
||||
for stream in mediastreams:
|
||||
# Since Plex returns all possible tracks together, have to sort
|
||||
|
@ -373,75 +387,61 @@ def audio_subtitle_prefs(api, listitem):
|
|||
|
||||
# Subtitles
|
||||
elif typus == "3":
|
||||
if stream.get('key'):
|
||||
# Subtitle can and will be downloaded - don't let user choose
|
||||
# this subtitle to burn-in
|
||||
continue
|
||||
# Subtitle is available within the video file
|
||||
# Burn in the subtitle, if user chooses to do so
|
||||
default = stream.get('default')
|
||||
forced = stream.get('forced')
|
||||
try:
|
||||
track = '{} {}'.format(sub_num, stream.attrib['displayTitle'])
|
||||
track = '{} {}'.format(sub_num + 1,
|
||||
stream.attrib['displayTitle'])
|
||||
except KeyError:
|
||||
track = '{} {} ({})'.format(sub_num + 1,
|
||||
utils.lang(39707), # unknown
|
||||
stream.get('codec'))
|
||||
default = stream.get('default')
|
||||
forced = stream.get('forced')
|
||||
downloadable = stream.get('key')
|
||||
|
||||
if default:
|
||||
track = "%s - %s" % (track, utils.lang(39708)) # Default
|
||||
if forced:
|
||||
track = "%s - %s" % (track, utils.lang(39709)) # Forced
|
||||
if downloadable:
|
||||
path = api.download_external_subtitles(
|
||||
'{{server}}{}'.format(stream.get('key')),
|
||||
stream.get('displayTitle'),
|
||||
stream.get('codec'))
|
||||
if path:
|
||||
downloadable_streams.append(index)
|
||||
download_subs.append(path.encode('utf-8'))
|
||||
else:
|
||||
track = "%s (%s)" % (track, utils.lang(39710)) # burn-in
|
||||
if stream.get('selected') == '1' and downloadable:
|
||||
# Only show subs without asking user if they can be
|
||||
# turned off
|
||||
default_sub = index
|
||||
|
||||
track = "%s (%s)" % (track, utils.lang(39710)) # burn-in
|
||||
subtitle_streams_list.append(index)
|
||||
subtitle_streams.append(track.encode('utf-8'))
|
||||
sub_num += 1
|
||||
|
||||
if audio_numb > 1:
|
||||
resp = utils.dialog('select', utils.lang(33013), audio_streams)
|
||||
if resp > -1:
|
||||
# User selected some audio track
|
||||
args = {
|
||||
'audioStreamID': audio_streams_list[resp],
|
||||
'allParts': 1
|
||||
}
|
||||
DU().downloadUrl('{server}/library/parts/%s' % part_id,
|
||||
action_type='PUT',
|
||||
parameters=args)
|
||||
if resp == -1:
|
||||
LOG.info('User aborted dialog to select audio stream')
|
||||
return
|
||||
args = {
|
||||
'audioStreamID': audio_streams_list[resp],
|
||||
'allParts': 1
|
||||
}
|
||||
DU().downloadUrl('{server}/library/parts/%s' % part_id,
|
||||
action_type='PUT',
|
||||
parameters=args)
|
||||
|
||||
select_subs_index = ''
|
||||
if sub_num == 1:
|
||||
# No subtitles
|
||||
return
|
||||
|
||||
select_subs_index = None
|
||||
if (utils.settings('pickPlexSubtitles') == 'true' and
|
||||
default_sub is not None):
|
||||
LOG.info('Using default Plex subtitle: %s', default_sub)
|
||||
select_subs_index = default_sub
|
||||
# Note: we DO need to tell the PMS that we DONT want any sub
|
||||
# Otherwise, the PMS might pick-up the last one
|
||||
LOG.info('No subtitles to burn-in')
|
||||
else:
|
||||
resp = utils.dialog('select', utils.lang(33014), subtitle_streams)
|
||||
if resp > 0:
|
||||
select_subs_index = subtitle_streams_list[resp - 1]
|
||||
if resp == -1:
|
||||
LOG.info('User aborted dialog to select subtitle stream')
|
||||
return
|
||||
elif resp == 0:
|
||||
# User did not select a subtitle or backed out of the dialog
|
||||
LOG.info('User chose to not burn-in any subtitles')
|
||||
else:
|
||||
# User selected no subtitles or backed out of dialog
|
||||
select_subs_index = ''
|
||||
|
||||
LOG.debug('Adding external subtitles: %s', download_subs)
|
||||
# Enable Kodi to switch autonomously to downloadable subtitles
|
||||
if download_subs:
|
||||
listitem.setSubtitles(download_subs)
|
||||
# Don't additionally burn in subtitles
|
||||
if select_subs_index in downloadable_streams:
|
||||
select_subs_index = ''
|
||||
LOG.info('User chose to burn-in subtitle %s: %s',
|
||||
select_subs_index,
|
||||
subtitle_streams[resp].decode('utf-8'))
|
||||
select_subs_index = subtitle_streams_list[resp - 1]
|
||||
# Now prep the PMS for our choice
|
||||
args = {
|
||||
'subtitleStreamID': select_subs_index,
|
||||
|
@ -450,3 +450,4 @@ def audio_subtitle_prefs(api, listitem):
|
|||
DU().downloadUrl('{server}/library/parts/%s' % part_id,
|
||||
action_type='PUT',
|
||||
parameters=args)
|
||||
return True
|
||||
|
|
|
@ -117,21 +117,8 @@ def _write_playlist_to_file(playlist, xml):
|
|||
Returns None or raises PlaylistError
|
||||
"""
|
||||
text = '#EXTCPlayListM3U::M3U\n'
|
||||
for element in xml:
|
||||
api = API(element)
|
||||
if api.plex_type == v.PLEX_TYPE_EPISODE:
|
||||
if api.season_number() is not None and api.index() is not None:
|
||||
text += ('#EXTINF:%s,%s S%.2dE%.2d - %s\n%s\n'
|
||||
% (api.runtime(), api.show_title(),
|
||||
api.season_number(), api.index(),
|
||||
api.title(), api.path()))
|
||||
else:
|
||||
# Only append the TV show name
|
||||
text += ('#EXTINF:%s,%s - %s\n%s\n'
|
||||
% (api.runtime(), api.show_title(), api.title(), api.path()))
|
||||
else:
|
||||
text += ('#EXTINF:%s,%s\n%s\n'
|
||||
% (api.runtime(), api.title(), api.path()))
|
||||
for xml_element in xml:
|
||||
text += _m3u_element(xml_element)
|
||||
text += '\n'
|
||||
text = text.encode(v.M3U_ENCODING, 'ignore')
|
||||
try:
|
||||
|
@ -142,3 +129,45 @@ def _write_playlist_to_file(playlist, xml):
|
|||
LOG.error('Error message %s: %s', err.errno, err.strerror)
|
||||
raise PlaylistError('Cannot write Kodi playlist to path for %s'
|
||||
% playlist)
|
||||
|
||||
|
||||
def _m3u_element(xml_element):
|
||||
api = API(xml_element)
|
||||
if api.plex_type == v.PLEX_TYPE_EPISODE:
|
||||
if api.season_number() is not None and api.index() is not None:
|
||||
return '#EXTINF:{},{} S{:2d}E{:2d} - {}\n{}\n'.format(
|
||||
api.runtime(),
|
||||
api.show_title(),
|
||||
api.season_number(),
|
||||
api.index(),
|
||||
api.title(),
|
||||
api.fullpath(force_addon=True)[0])
|
||||
else:
|
||||
# Only append the TV show name
|
||||
return '#EXTINF:{},{} - {}\n{}\n'.format(
|
||||
api.runtime(),
|
||||
api.show_title(),
|
||||
api.title(),
|
||||
api.fullpath(force_addon=True)[0])
|
||||
elif api.plex_type == v.PLEX_TYPE_SONG:
|
||||
if api.index() is not None:
|
||||
return '#EXTINF:{},{:02d}. {} - {}\n{}\n'.format(
|
||||
api.runtime(),
|
||||
api.index(),
|
||||
api.grandparent_title(),
|
||||
api.title(),
|
||||
api.fullpath(force_first_media=True,
|
||||
omit_check=True)[0])
|
||||
else:
|
||||
return '#EXTINF:{},{} - {}\n{}\n'.format(
|
||||
api.runtime(),
|
||||
api.grandparent_title(),
|
||||
api.title(),
|
||||
api.fullpath(force_first_media=True,
|
||||
omit_check=True)[0])
|
||||
else:
|
||||
return '#EXTINF:{},{}\n{}\n'.format(
|
||||
api.runtime(),
|
||||
api.title(),
|
||||
api.fullpath(force_first_media=True,
|
||||
omit_check=True)[0])
|
||||
|
|
|
@ -41,43 +41,82 @@ def _transcode_image_path(key, AuthToken, path, width, height):
|
|||
|
||||
|
||||
class File(object):
|
||||
def path(self, force_first_media=True, force_addon=False,
|
||||
direct_paths=None):
|
||||
def fullpath(self, force_first_media=True, force_addon=False,
|
||||
direct_paths=None, omit_check=False, force_check=False):
|
||||
"""
|
||||
Returns a "fully qualified path": add-on paths or direct paths
|
||||
depending on the current settings. Will NOT valide the playurl
|
||||
Returns unicode or None if something went wrong.
|
||||
Returns a "fully qualified path" add-on paths or direct paths
|
||||
depending on the current settings as the tupple
|
||||
(fullpath, path, filename)
|
||||
as unicode. Add-on paths are returned as a fallback. Returns None
|
||||
if something went wrong.
|
||||
|
||||
Pass direct_path=True if you're calling from another Plex python
|
||||
instance - because otherwise direct paths will evaluate to False!
|
||||
firce_first_media=False prompts the user to choose which version of the
|
||||
media should be returned, if several are present
|
||||
force_addon=True will always return the add-on path
|
||||
direct_path=True if you're calling from another Plex python
|
||||
instance - because otherwise direct paths will
|
||||
evaluate to False!
|
||||
"""
|
||||
direct_paths = direct_paths or app.SYNC.direct_paths
|
||||
filename = self.file_path(force_first_media=force_first_media)
|
||||
direct_paths = app.SYNC.direct_paths if direct_paths is None \
|
||||
else direct_paths
|
||||
if (not direct_paths or force_addon or
|
||||
self.plex_type == v.PLEX_TYPE_CLIP):
|
||||
if filename and '/' in filename:
|
||||
filename = filename.rsplit('/', 1)
|
||||
elif filename:
|
||||
filename = filename.rsplit('\\', 1)
|
||||
try:
|
||||
filename = filename[1]
|
||||
except (TypeError, IndexError):
|
||||
filename = None
|
||||
# Set plugin path and media flags using real filename
|
||||
if self.plex_type == v.PLEX_TYPE_SONG:
|
||||
return self._music_addon_paths(force_first_media)
|
||||
if self.plex_type == v.PLEX_TYPE_EPISODE:
|
||||
# need to include the plex show id in the path
|
||||
path = ('plugin://plugin.video.plexkodiconnect.tvshows/%s/'
|
||||
% self.grandparent_id())
|
||||
else:
|
||||
path = 'plugin://%s/' % v.ADDON_TYPE[self.plex_type]
|
||||
path = ('%s?plex_id=%s&plex_type=%s&mode=play&filename=%s'
|
||||
% (path, self.plex_id, self.plex_type, filename))
|
||||
# Filename in Kodi will end with actual filename - hopefully
|
||||
# this is useful for other add-ons
|
||||
filename = self.file_path(force_first_media=force_first_media)
|
||||
if filename:
|
||||
if '/' in filename:
|
||||
filename = filename.rsplit('/', 1)[1]
|
||||
else:
|
||||
filename = filename.rsplit('\\', 1)[1]
|
||||
entirepath = ('%s?mode=play&plex_id=%s&plex_type=%s&filename=%s'
|
||||
% (path, self.plex_id, self.plex_type, filename))
|
||||
else:
|
||||
# E.g. clips or albums
|
||||
entirepath = ('%s?mode=play&plex_id=%s&plex_type=%s'
|
||||
% (path, self.plex_id, self.plex_type))
|
||||
# For Kodi DB, we need to safe the ENTIRE path for filenames
|
||||
filename = entirepath
|
||||
else:
|
||||
# Direct paths is set the Kodi way
|
||||
path = self.validate_playurl(filename,
|
||||
self.plex_type,
|
||||
omit_check=True)
|
||||
return path
|
||||
entirepath = self.validate_playurl(
|
||||
self.file_path(force_first_media=force_first_media),
|
||||
self.plex_type,
|
||||
force_check=force_check,
|
||||
omit_check=omit_check)
|
||||
try:
|
||||
if '/' in entirepath:
|
||||
filename = entirepath.rsplit('/', 1)[1]
|
||||
else:
|
||||
filename = entirepath.rsplit('\\', 1)[1]
|
||||
except (TypeError, IndexError):
|
||||
# Fallback to add-on paths
|
||||
return self.fullpath(force_first_media=force_first_media,
|
||||
force_addon=True)
|
||||
path = utils.rreplace(entirepath, filename, "", 1)
|
||||
return entirepath, path, filename
|
||||
|
||||
def _music_addon_paths(self, force_first_media):
|
||||
"""
|
||||
For songs only. Normal add-on paths plugin://... don't work with the
|
||||
Kodi music DB, hence use a "direct" url to the music file on the PMS.
|
||||
"""
|
||||
if self.mediastream is None and force_first_media is False:
|
||||
if self.mediastream_number() is None:
|
||||
return
|
||||
streamno = 0 if force_first_media else self.mediastream
|
||||
entirepath = "%s%s" % (app.CONN.server,
|
||||
self.xml[streamno][self.part].get('key'))
|
||||
entirepath = self.attach_plex_token_to_url(entirepath)
|
||||
path, filename = entirepath.rsplit('/', 1)
|
||||
return entirepath, path + '/', filename
|
||||
|
||||
def directory_path(self, section_id=None, plex_type=None, old_key=None,
|
||||
synched=True):
|
||||
|
|
|
@ -210,24 +210,31 @@ def discover_pms(token=None):
|
|||
if pms['machineIdentifier'] == plex_pms['machineIdentifier']:
|
||||
break
|
||||
else:
|
||||
# Only found PMS using GDM - add it to the PMS from plex.tv
|
||||
https = _pms_https_enabled('%s:%s' % (pms['ip'], pms['port']))
|
||||
if https is None:
|
||||
# Error contacting url. Skip and ignore this PMS for now
|
||||
LOG.error('Could not contact PMS %s but we should have', pms)
|
||||
continue
|
||||
elif https is True:
|
||||
pms['scheme'] = 'https'
|
||||
else:
|
||||
pms['scheme'] = 'http'
|
||||
pms['baseURL'] = '%s://%s:%s' % (pms['scheme'],
|
||||
pms['ip'],
|
||||
pms['port'])
|
||||
# Only found PMS using GDM. Check whether we can use baseURL
|
||||
# (which is in a different format) or need to connect directly
|
||||
if not _correct_baseurl(pms,
|
||||
'%s:%s' % (pms['baseURL'], pms['port'])):
|
||||
if not _correct_baseurl(pms,
|
||||
'%s:%s' % (pms['ip'], pms['port'])):
|
||||
continue
|
||||
plex_pms_list.append(pms)
|
||||
_log_pms(plex_pms_list)
|
||||
return plex_pms_list
|
||||
|
||||
|
||||
def _correct_baseurl(pms, url):
|
||||
https = _pms_https_enabled(url)
|
||||
if https is None:
|
||||
# Error contacting url
|
||||
return False
|
||||
elif https is True:
|
||||
pms['scheme'] = 'https'
|
||||
else:
|
||||
pms['scheme'] = 'http'
|
||||
pms['baseURL'] = '%s://%s' % (pms['scheme'], url)
|
||||
return True
|
||||
|
||||
|
||||
def _log_pms(pms_list):
|
||||
log_list = deepcopy(pms_list)
|
||||
for pms in log_list:
|
||||
|
@ -846,28 +853,31 @@ def _pms_https_enabled(url):
|
|||
|
||||
Prefers HTTPS over HTTP
|
||||
"""
|
||||
res = DU().downloadUrl('https://%s/identity' % url,
|
||||
authenticate=False,
|
||||
verifySSL=True if v.KODIVERSION >= 18 else False)
|
||||
# Try HTTPS first
|
||||
try:
|
||||
res.attrib
|
||||
except AttributeError:
|
||||
# Might have SSL deactivated. Try with http
|
||||
res = DU().downloadUrl('http://%s/identity' % url,
|
||||
authenticate=False,
|
||||
verifySSL=True if v.KODIVERSION >= 18 else False)
|
||||
try:
|
||||
res.attrib
|
||||
except AttributeError:
|
||||
LOG.error("Could not contact PMS %s", url)
|
||||
return None
|
||||
else:
|
||||
# Received a valid XML. Server wants to talk HTTP
|
||||
return False
|
||||
DU().downloadUrl('https://%s/identity' % url,
|
||||
authenticate=False,
|
||||
reraise=True)
|
||||
except exceptions.SSLError:
|
||||
LOG.debug('SSLError trying to connect to https://%s/identity', url)
|
||||
except Exception as e:
|
||||
LOG.info('Couldnt check https connection to https://%s/identity: %s',
|
||||
url, e)
|
||||
else:
|
||||
# Received a valid XML. Server wants to talk HTTPS
|
||||
return True
|
||||
|
||||
# Try HTTP next
|
||||
try:
|
||||
DU().downloadUrl('http://%s/identity' % url,
|
||||
authenticate=False,
|
||||
reraise=True)
|
||||
except Exception as e:
|
||||
LOG.info('Couldnt check http connection to http://%s/identity: %s',
|
||||
url, e)
|
||||
return
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
def GetMachineIdentifier(url):
|
||||
"""
|
||||
|
@ -1075,13 +1085,15 @@ def transcoding_arguments(path, media, part, playmethod, args=None):
|
|||
'protocol': 'hls', # seen in the wild: 'http', 'dash', 'http', 'hls'
|
||||
'session': v.PKC_MACHINE_IDENTIFIER, # TODO: create new unique id
|
||||
'fastSeek': 1,
|
||||
# none, embedded, sidecar
|
||||
# Essentially indicating what you want to do with subtitles and state
|
||||
# you aren’t want it to burn them into the video (requires transcoding)
|
||||
'subtitles': 'none',
|
||||
# 'subtitleSize': utils.settings('subtitleSize')
|
||||
'copyts': 1
|
||||
}
|
||||
if playmethod != v.PLAYBACK_METHOD_TRANSCODE:
|
||||
# Essentially indicating what you want to do with subtitles and state
|
||||
# you aren’t want it to burn them into the video (requires transcoding)
|
||||
# none, embedded, sidecar
|
||||
args['subtitles'] = 'none'
|
||||
else:
|
||||
args['subtitleSize'] = utils.settings('subtitleSize')
|
||||
if args:
|
||||
arguments.update(args)
|
||||
return arguments
|
||||
|
|
|
@ -482,10 +482,15 @@ STREAMING_HEADERS = {
|
|||
'context=streaming&'
|
||||
'protocol=hls&'
|
||||
'container=mpegts&'
|
||||
'videoCodec=h264,hevc,mpeg4,mpeg2video&'
|
||||
'videoCodec=h264&'
|
||||
'audioCodec=aac,flac,vorbis,opus,ac3,eac3,mp3,mp2,pcm&'
|
||||
'subtitleCodec=ass,pgs,vobsub&'
|
||||
'replace=true)'
|
||||
# '+add-transcode-target('
|
||||
# 'type=subtitleProfile&'
|
||||
# 'context=all&'
|
||||
# 'container=ass&'
|
||||
# 'codec=ass&'
|
||||
# 'replace=true)'
|
||||
'+add-direct-play-profile('
|
||||
'type=videoProfile&'
|
||||
'container=*&'
|
||||
|
|
|
@ -223,7 +223,7 @@ def _generate_content(api):
|
|||
elif plex_type == v.PLEX_TYPE_PHOTO:
|
||||
url = api.get_picture_path()
|
||||
else:
|
||||
url = api.path()
|
||||
url = api.fullpath(force_first_media=True)[0]
|
||||
if not api.kodi_id and plex_type == v.PLEX_TYPE_EPISODE:
|
||||
# Hack - Item is not synched to the Kodi database
|
||||
# We CANNOT use paths that show up in the Kodi paths table!
|
||||
|
|
|
@ -107,7 +107,6 @@
|
|||
<setting id="enableCinema" type="bool" label="30518" default="false" />
|
||||
<setting id="askCinema" type="bool" label="30519" default="false" visible="eq(-1,true)" subsetting="true" />
|
||||
<setting id="trailerNumber" type="slider" label="39000" default="3" visible="eq(-2,true)" range="1,1,15" option="int" />
|
||||
<setting id="pickPlexSubtitles" type="bool" label="39075" default="true" />
|
||||
<setting id="ignoreSpecialsNextEpisodes" type="bool" label="30527" default="false" />
|
||||
<setting id="resumeJumpBack" type="slider" label="30521" default="10" range="0,1,120" option="int" visible="false"/>
|
||||
<setting type="sep" />
|
||||
|
|
Loading…
Reference in a new issue