This commit is contained in:
Odd Stråbø 2020-08-21 14:56:15 +02:00
parent 6341bb2c62
commit 8a3ca73d52
14 changed files with 26 additions and 22 deletions

View file

@ -1,9 +1,11 @@
import xml.etree.ElementTree as ET
import yaml
import sys
import os
from datetime import datetime
import yaml
def indent(elem, level=0):
'''
Nicely formats output xml with newlines and spaces
@ -23,6 +25,7 @@ def indent(elem, level=0):
if level and (not elem.tail or not elem.tail.strip()):
elem.tail = i
try:
py_version = sys.argv[1]
except IndexError:

View file

@ -17,8 +17,8 @@ sys.path.insert(0, __base__)
#################################################################################################
from entrypoint import Context # noqa: F402
from helper import LazyLogger # noqa: F402
from entrypoint import Context # noqa: E402
from helper import LazyLogger # noqa: E402
#################################################################################################

View file

@ -17,8 +17,8 @@ sys.path.insert(0, __base__)
#################################################################################################
from entrypoint import Context # noqa: F402
from helper import LazyLogger # noqa: F402
from entrypoint import Context # noqa: E402
from helper import LazyLogger # noqa: E402
#################################################################################################

View file

@ -17,8 +17,8 @@ sys.path.insert(0, __base__)
#################################################################################################
from entrypoint import Events # noqa: F402
from helper import LazyLogger # noqa: F402
from entrypoint import Events # noqa: E402
from helper import LazyLogger # noqa: E402
#################################################################################################

View file

@ -224,6 +224,7 @@ def get_library_items(library_id, item_type):
return _get(url, params)
def get_albums_by_artist(artist_id, basic=False):
params = {

View file

@ -435,13 +435,13 @@ class FullSync(object):
obj.artist(artist)
# Get all albums for each artist
artist_albums = [ album for album in albums if artist_name in album.get('Artists') ]
artist_albums = [album for album in albums if artist_name in album.get('Artists')]
for album in artist_albums:
# Add album to database
obj.album(album)
album_id = album.get('Id')
# Get all songs in each album
album_songs = [ song for song in songs if album_id == song.get('AlbumId') ]
album_songs = [song for song in songs if album_id == song.get('AlbumId')]
for song in album_songs:
dialog.update(percent,
message="%s/%s/%s" % (artist_name, album['Name'][:7], song['Name'][:7]))

View file

@ -435,7 +435,7 @@ class API(object):
if response.status_code == 200:
return response.json()
else:
return { 'Status_Code': response.status_code }
return {'Status_Code': response.status_code}
def get_public_info(self, server_address):
response = self.send_request(server_address, "system/info/public")

View file

@ -56,7 +56,7 @@ class HTTP(object):
else:
LOG.debug("Server address not set")
if '{UserId}'in string:
if '{UserId}' in string:
if self.config.data.get('auth.user_id', None):
string = string.replace("{UserId}", self.config.data['auth.user_id'])
else:

View file

@ -376,7 +376,7 @@ class Library(threading.Thread):
include = []
filters = ["tvshows", "boxsets", "musicvideos", "music", "movies"]
sync = get_sync()
whitelist = [ x.replace('Mixed:', "") for x in sync['Whitelist'] ]
whitelist = [x.replace('Mixed:', "") for x in sync['Whitelist']]
LOG.info("--[ retrieve changes ] %s", last_sync)
# Get the item type of each synced library and build list of types to request
@ -395,7 +395,7 @@ class Library(threading.Thread):
try:
# Get list of updates from server for synced library types and populate work queues
result = self.server.jellyfin.get_sync_queue(last_sync, ",".join([ x for x in query_filter ]))
result = self.server.jellyfin.get_sync_queue(last_sync, ",".join([x for x in query_filter]))
if result is None:
return True

View file

@ -182,13 +182,13 @@ class Movies(KodiDb):
if validate_dvd_dir(obj['Path'] + obj['Filename']):
obj['Path'] = obj['Path'] + obj['Filename'] + '/VIDEO_TS/'
obj['Filename'] = 'VIDEO_TS.IFO'
LOG.debug("DVD directry %s",obj['Path'])
LOG.debug("DVD directry %s", obj['Path'])
'''check bluray directries and point it to ./BDMV/index.bdmv'''
if validate_bluray_dir(obj['Path'] + obj['Filename']):
obj['Path'] = obj['Path'] + obj['Filename'] + '/BDMV/'
obj['Filename'] = 'index.bdmv'
LOG.debug("Bluray directry %s",obj['Path'])
LOG.debug("Bluray directry %s", obj['Path'])
else:
obj['Path'] = "plugin://plugin.video.jellyfin/%s/" % obj['LibraryId']

View file

@ -160,9 +160,9 @@ class Player(xbmc.Player):
def set_audio_subs(self, audio=None, subtitle=None):
if audio:
audio=int(audio)
audio = int(audio)
if subtitle:
subtitle=int(subtitle)
subtitle = int(subtitle)
''' Only for after playback started
'''

View file

@ -18,9 +18,9 @@ sys.path.insert(0, __base__)
#################################################################################################
from entrypoint import Service # noqa: F402
from helper.utils import settings # noqa: F402
from helper import LazyLogger # noqa: F402
from entrypoint import Service # noqa: E402
from helper.utils import settings # noqa: E402
from helper import LazyLogger # noqa: E402
#################################################################################################