Add setting to (de)activate playlist sync
This commit is contained in:
parent
c61fc3241f
commit
ca1033801d
5 changed files with 14 additions and 3 deletions
|
@ -61,6 +61,11 @@ msgctxt "#30009"
|
|||
msgid "Enable image caching during Kodi playback (restart Kodi!)"
|
||||
msgstr ""
|
||||
|
||||
# PKC settings sync options
|
||||
msgctxt "#30010"
|
||||
msgid "Sync Plex playlists"
|
||||
msgstr ""
|
||||
|
||||
# Button text
|
||||
msgctxt "#30012"
|
||||
msgid "OK"
|
||||
|
|
|
@ -51,7 +51,8 @@ STATE_SETTINGS = {
|
|||
'enableMusic': 'ENABLE_MUSIC',
|
||||
'forceReloadSkinOnPlaybackStop': 'FORCE_RELOAD_SKIN',
|
||||
'fetch_pms_item_number': 'FETCH_PMS_ITEM_NUMBER',
|
||||
'imageSyncNotifications': 'IMAGE_SYNC_NOTIFICATIONS'
|
||||
'imageSyncNotifications': 'IMAGE_SYNC_NOTIFICATIONS',
|
||||
'enablePlaylistSync': 'SYNC_PLAYLISTS'
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
|
|
|
@ -1201,6 +1201,8 @@ class LibrarySync(Thread):
|
|||
continue
|
||||
status = int(item['state'])
|
||||
if typus == 'playlist':
|
||||
if not state.SYNC_PLAYLISTS:
|
||||
continue
|
||||
playlists.process_websocket(plex_id=str(item['itemID']),
|
||||
updated_at=str(item['updatedAt']),
|
||||
state=status)
|
||||
|
@ -1558,7 +1560,7 @@ class LibrarySync(Thread):
|
|||
kodi_db_version_checked = True
|
||||
last_sync = utils.unix_timestamp()
|
||||
self.fanartthread.start()
|
||||
if playlists.full_sync():
|
||||
if state.SYNC_PLAYLISTS and playlists.full_sync():
|
||||
playlist_monitor = playlists.kodi_playlist_monitor()
|
||||
else:
|
||||
LOG.error('Initial start-up full sync unsuccessful')
|
||||
|
@ -1605,7 +1607,7 @@ class LibrarySync(Thread):
|
|||
LOG.info('Done initial sync on Kodi startup')
|
||||
artwork.Artwork().cache_major_artwork()
|
||||
self.fanartthread.start()
|
||||
if playlists.full_sync():
|
||||
if state.SYNC_PLAYLISTS and playlists.full_sync():
|
||||
playlist_monitor = playlists.kodi_playlist_monitor()
|
||||
else:
|
||||
LOG.info('Startup sync has not yet been successful')
|
||||
|
|
|
@ -41,6 +41,8 @@ FORCE_RELOAD_SKIN = True
|
|||
SYNC_DIALOG = True
|
||||
# Shall Kodi show dialogs for syncing/caching images? (e.g. images left to sync)
|
||||
IMAGE_SYNC_NOTIFICATIONS = True
|
||||
# Sync playlists from Plex to Kodi and vice-versa?
|
||||
SYNC_PLAYLISTS = True
|
||||
# Is synching of Plex music enabled?
|
||||
ENABLE_MUSIC = True
|
||||
# How often shall we sync?
|
||||
|
|
|
@ -58,6 +58,7 @@
|
|||
<category label="30506"><!-- Sync Options -->
|
||||
<setting type="lsep" label="30537" /><!-- Restart if you make changes -->
|
||||
<setting id="syncEmptyShows" type="bool" label="30508" default="false" visible="false"/>
|
||||
<setting id="enablePlaylistSync" type="bool" label="30010" default="true" visible="true"/><!-- Sync Plex playlists -->
|
||||
<setting id="dbSyncIndicator" label="30507" type="bool" default="true" /><!-- show syncing progress -->
|
||||
<setting type="sep" />
|
||||
<setting id="syncThreadNumber" type="slider" label="39003" default="10" option="int" range="1,1,20"/><!-- Limit download sync threads (recommended for rpi: 1) -->
|
||||
|
|
Loading…
Reference in a new issue