Merge pull request #901 from croneter/beta-version

Bump master
This commit is contained in:
croneter 2019-06-16 14:17:41 +02:00 committed by GitHub
commit 8aa511a3d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 36 additions and 18 deletions

View file

@ -1,5 +1,5 @@
[![stable version](https://img.shields.io/badge/stable_version-2.8.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.8.3-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.8.4-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.8.4-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)

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.plexkodiconnect" name="PlexKodiConnect" version="2.8.3" provider-name="croneter">
<addon id="plugin.video.plexkodiconnect" name="PlexKodiConnect" version="2.8.4" provider-name="croneter">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
<import addon="script.module.requests" version="2.9.1" />
@ -77,7 +77,12 @@
<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.8.3:
<news>version 2.8.4:
- Fix for Kodi 17 Krypton TypeError on playback start: 'offscreen' is an invalid keyword argument for this function
- Fix widgets not being populated after very first PlexKodiConnect library sync without a restart of Kodi
- Don't restart Kodi if user chose to enter PKC settings on install
version 2.8.3:
- Versions 2.8.1-2.8.2 for everyone
version 2.8.2 (beta only):

View file

@ -1,3 +1,8 @@
version 2.8.4:
- Fix for Kodi 17 Krypton TypeError on playback start: 'offscreen' is an invalid keyword argument for this function
- Fix widgets not being populated after very first PlexKodiConnect library sync without a restart of Kodi
- Don't restart Kodi if user chose to enter PKC settings on install
version 2.8.3:
- Versions 2.8.1-2.8.2 for everyone

View file

@ -693,14 +693,12 @@ class InitialSetup(object):
# Open Settings page now? You will need to restart!
goto_settings = utils.yesno_dialog(utils.lang(29999),
utils.lang(39017))
# New installation - make sure we start with a clean slate
utils.wipe_database(reboot=False)
if goto_settings:
LOG.info('User chose to go to the PKC settings - suspending PKC')
app.APP.stop_pkc = True
executebuiltin(
'Addon.OpenSettings(plugin.video.plexkodiconnect)')
# New installation - make sure we start with a clean slate
# Will trigger a reboot, usually
utils.wipe_database()
# Reload relevant settings if that is not the case
app.CONN.load()
app.ACCOUNT.load()
app.SYNC.load()
return
utils.reboot_kodi()

View file

@ -184,6 +184,9 @@ class Sync(backgroundthread.KillableThread):
install_sync_done = True
initial_sync_done = True
utils.settings('dbCreatedWithVersion', v.ADDON_VERSION)
# Reload skin in order to ensure items showing up on Kodi
# Homescreen
xbmc.executebuiltin('ReloadSkin()')
if library_sync.PLAYLIST_SYNC_ENABLED:
playlist_monitor = playlists.kodi_playlist_monitor()
self.start_fanart_download(refresh=False)

View file

@ -16,6 +16,7 @@ WINDOW = xbmcgui.Window(10000)
WINDOW_UPSTREAM = 'plexkodiconnect.result.upstream'.encode('utf-8')
WINDOW_DOWNSTREAM = 'plexkodiconnect.result.downstream'.encode('utf-8')
WINDOW_COMMAND = 'plexkodiconnect.command'.encode('utf-8')
KODIVERSION = int(xbmc.getInfoLabel("System.BuildVersion")[:2])
def cast(func, value):
@ -145,10 +146,15 @@ def convert_pkc_to_listitem(pkc_listitem):
Insert a PKCListItem() and you will receive a valid XBMC listitem
"""
data = pkc_listitem.data
if KODIVERSION >= 18:
listitem = xbmcgui.ListItem(label=data.get('label'),
label2=data.get('label2'),
path=data.get('path'),
offscreen=True)
else:
listitem = xbmcgui.ListItem(label=data.get('label'),
label2=data.get('label2'),
path=data.get('path'))
if data['info']:
listitem.setInfo(**data['info'])
for stream in data['stream_info']:

View file

@ -539,7 +539,7 @@ def create_kodi_db_indicees():
conn.close()
def wipe_database():
def wipe_database(reboot=True):
"""
Deletes all Plex playlists as well as video nodes, then clears Kodi as well
as Plex databases completely.
@ -585,10 +585,11 @@ def wipe_database():
settings('sections_asked_for_machine_identifier', value='')
init_dbs()
LOG.info('Wiping done')
if settings('kodi_db_has_been_wiped_clean') != 'true':
no_reboot = settings('kodi_db_has_been_wiped_clean') == 'true' or not reboot
settings('kodi_db_has_been_wiped_clean', value='true')
if not no_reboot:
# Root cause is sqlite WAL mode - Kodi might still have DB access open
LOG.warn('Need to restart Kodi before filling Kodi DB again')
settings('kodi_db_has_been_wiped_clean', value='true')
reboot_kodi()