Merge branch 'master' into develop

This commit is contained in:
tomkat83 2017-04-14 14:45:54 +02:00
commit 89fec3b971
5 changed files with 8 additions and 44 deletions

View file

@ -1,5 +1,5 @@
[![stable version](https://img.shields.io/badge/stable_version-1.7.5-blue.svg?maxAge=60&style=flat) ](https://dl.bintray.com/croneter/PlexKodiConnect/bin/repository.plexkodiconnect/repository.plexkodiconnect-1.0.0.zip) [![stable version](https://img.shields.io/badge/stable_version-1.7.6-blue.svg?maxAge=60&style=flat) ](https://dl.bintray.com/croneter/PlexKodiConnect/bin/repository.plexkodiconnect/repository.plexkodiconnect-1.0.0.zip)
[![beta version](https://img.shields.io/badge/beta_version-1.7.5-red.svg?maxAge=60&style=flat) ](https://dl.bintray.com/croneter/PlexKodiConnect_BETA/bin-BETA/repository.plexkodiconnectbeta/repository.plexkodiconnectbeta-1.0.0.zip) [![beta version](https://img.shields.io/badge/beta_version-1.7.6-red.svg?maxAge=60&style=flat) ](https://dl.bintray.com/croneter/PlexKodiConnect_BETA/bin-BETA/repository.plexkodiconnectbeta/repository.plexkodiconnectbeta-1.0.0.zip)
[![Installation](https://img.shields.io/badge/wiki-installation-brightgreen.svg?maxAge=60&style=flat)](https://github.com/croneter/PlexKodiConnect/wiki/Installation) [![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) [![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"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.plexkodiconnect" name="PlexKodiConnect" version="1.7.5" provider-name="croneter"> <addon id="plugin.video.plexkodiconnect" name="PlexKodiConnect" version="1.7.6" provider-name="croneter">
<requires> <requires>
<import addon="xbmc.python" version="2.1.0"/> <import addon="xbmc.python" version="2.1.0"/>
<import addon="script.module.requests" version="2.3.0" /> <import addon="script.module.requests" version="2.3.0" />

View file

@ -1,3 +1,6 @@
version 1.7.6
- Hotfix: Revert Cache missing artwork on PKC startup. This should help with slow PKC startup, videos not being started, lagging PKC, etc.
version 1.7.5 version 1.7.5
- Dutch translation, thanks @mvanbaak - Dutch translation, thanks @mvanbaak

View file

@ -126,40 +126,6 @@ def double_urldecode(text):
return unquote(unquote(text)) return unquote(unquote(text))
def get_uncached_artwork():
"""
Returns a list of URLs that haven't been cached yet
"""
all_urls = []
cached_urls = []
result = []
connection = kodiSQL('video')
cursor = connection.cursor()
# Get all artwork urls
cursor.execute("SELECT url FROM art WHERE media_type != 'actor'")
for url in cursor.fetchall():
all_urls.append(url[0])
connection.close()
connection = kodiSQL('music')
cursor = connection.cursor()
cursor.execute("SELECT url FROM art")
for url in cursor.fetchall():
all_urls.append(url[0])
connection.close()
# Get the cached urls
connection = kodiSQL('texture')
cursor = connection.cursor()
cursor.execute("SELECT url FROM texture")
for url in cursor.fetchall():
cached_urls.append(url[0])
connection.close()
for url in all_urls:
if url not in cached_urls:
result.append(url)
log.info('%s artwork urls have not been cached yet' % len(result))
return result
@ThreadMethodsAdditionalStop('plex_shouldStop') @ThreadMethodsAdditionalStop('plex_shouldStop')
@ThreadMethods @ThreadMethods
class Image_Cache_Thread(Thread): class Image_Cache_Thread(Thread):

View file

@ -15,14 +15,13 @@ from utils import window, settings, getUnixTimestamp, sourcesXML,\
ThreadMethods, ThreadMethodsAdditionalStop, LogTime, getScreensaver,\ ThreadMethods, ThreadMethodsAdditionalStop, LogTime, getScreensaver,\
setScreensaver, playlistXSP, language as lang, DateToKodi, reset,\ setScreensaver, playlistXSP, language as lang, DateToKodi, reset,\
advancedSettingsXML, tryDecode, deletePlaylists, deleteNodes, \ advancedSettingsXML, tryDecode, deletePlaylists, deleteNodes, \
ThreadMethodsAdditionalSuspend, create_actor_db_index, tryEncode, dialog ThreadMethodsAdditionalSuspend, create_actor_db_index, dialog
import downloadutils import downloadutils
import itemtypes import itemtypes
import plexdb_functions as plexdb import plexdb_functions as plexdb
import kodidb_functions as kodidb import kodidb_functions as kodidb
import userclient import userclient
import videonodes import videonodes
import artwork
import variables as v import variables as v
from PlexFunctions import GetPlexMetadata, GetAllPlexLeaves, scrobble, \ from PlexFunctions import GetPlexMetadata, GetAllPlexLeaves, scrobble, \
@ -1522,11 +1521,6 @@ class LibrarySync(Thread):
# Initialize time offset Kodi - PMS # Initialize time offset Kodi - PMS
self.syncPMStime() self.syncPMStime()
lastSync = getUnixTimestamp() lastSync = getUnixTimestamp()
if settings('enableTextureCache') == "true":
# Start caching artwork that has not been cached yet
for url in artwork.get_uncached_artwork():
artwork.ARTWORK_QUEUE.put(
artwork.double_urlencode(tryEncode((url))))
if settings('FanartTV') == 'true': if settings('FanartTV') == 'true':
# Start getting additional missing artwork # Start getting additional missing artwork
with plexdb.Get_Plex_DB() as plex_db: with plexdb.Get_Plex_DB() as plex_db:
@ -1612,6 +1606,7 @@ class LibrarySync(Thread):
elif window('plex_runLibScan') == 'del_textures': elif window('plex_runLibScan') == 'del_textures':
window('plex_runLibScan', clear=True) window('plex_runLibScan', clear=True)
window('plex_dbScan', value="true") window('plex_dbScan', value="true")
import artwork
artwork.Artwork().fullTextureCacheSync() artwork.Artwork().fullTextureCacheSync()
window('plex_dbScan', clear=True) window('plex_dbScan', clear=True)
else: else: