mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-26 02:36:10 +00:00
added option to exclude theme videos on sync
This commit is contained in:
parent
7f21c61753
commit
6e66f60331
1 changed files with 13 additions and 11 deletions
|
@ -124,7 +124,6 @@ def addUser():
|
||||||
|
|
||||||
# THEME MUSIC/VIDEOS
|
# THEME MUSIC/VIDEOS
|
||||||
def getThemeMedia():
|
def getThemeMedia():
|
||||||
|
|
||||||
doUtils = DownloadUtils()
|
doUtils = DownloadUtils()
|
||||||
playUtils = PlayUtils()
|
playUtils = PlayUtils()
|
||||||
|
|
||||||
|
@ -157,6 +156,8 @@ def getThemeMedia():
|
||||||
dialog.ok('Warning', 'The settings file does not exist in tvtunes. Go to the tvtunes addon and change a setting, then come back and re-run')
|
dialog.ok('Warning', 'The settings file does not exist in tvtunes. Go to the tvtunes addon and change a setting, then come back and re-run')
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# Offer to exclude video themes
|
||||||
|
includeVideoThemes = xbmcgui.Dialog().yesno("Theme Types", "Should video themes be included?")
|
||||||
|
|
||||||
# Create library directory
|
# Create library directory
|
||||||
if not xbmcvfs.exists(library):
|
if not xbmcvfs.exists(library):
|
||||||
|
@ -174,6 +175,7 @@ def getThemeMedia():
|
||||||
|
|
||||||
# Get Ids with Theme Videos
|
# Get Ids with Theme Videos
|
||||||
itemIds = {}
|
itemIds = {}
|
||||||
|
if includeVideoThemes:
|
||||||
for view in userViews:
|
for view in userViews:
|
||||||
url = "{server}/mediabrowser/Users/{UserId}/Items?HasThemeVideo=True&ParentId=%s&format=json" % view
|
url = "{server}/mediabrowser/Users/{UserId}/Items?HasThemeVideo=True&ParentId=%s&format=json" % view
|
||||||
result = doUtils.downloadUrl(url)
|
result = doUtils.downloadUrl(url)
|
||||||
|
|
Loading…
Reference in a new issue