From b161da1c1a1632725a44e998ff0d1872b3d5d184 Mon Sep 17 00:00:00 2001 From: Krateng Date: Sun, 26 Jul 2020 13:00:38 +0200 Subject: [PATCH] Cleanup --- maloja/__pkginfo__.py | 5 +++-- maloja/database.py | 1 - maloja/utilities.py | 12 +++++------- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/maloja/__pkginfo__.py b/maloja/__pkginfo__.py index 6433cf5..78c0d3c 100644 --- a/maloja/__pkginfo__.py +++ b/maloja/__pkginfo__.py @@ -5,7 +5,7 @@ author = { "email":"maloja@krateng.dev", "github": "krateng" } -version = 2,5,3 +version = 2,6,0 versionstr = ".".join(str(n) for n in version) links = { "pypi":"malojaserver", @@ -31,7 +31,8 @@ resources = [ "data_files/*/*", "data_files/*/*/*", "proccontrol/*", - "proccontrol/*/*" + "proccontrol/*/*", + "thirdparty/*" ] commands = { diff --git a/maloja/database.py b/maloja/database.py index c491c9c..608da89 100644 --- a/maloja/database.py +++ b/maloja/database.py @@ -8,7 +8,6 @@ from .malojatime import register_scrobbletime, time_stamps, ranges from .urihandler import uri_to_internal, internal_to_uri, compose_querystring from . import compliant_api -#from .external import proxy_scrobble from .thirdparty import proxy_scrobble_all from .__pkginfo__ import version diff --git a/maloja/utilities.py b/maloja/utilities.py index 0118805..3be8b94 100644 --- a/maloja/utilities.py +++ b/maloja/utilities.py @@ -15,7 +15,7 @@ from doreah.logging import log from doreah.regular import yearly, daily #from .external import api_request_track, api_request_artist -from .thirdparty import get_image_track_all, get_image_artist_all +from . import thirdparty from .__pkginfo__ import version from . import globalconf from .globalconf import datadir @@ -292,9 +292,8 @@ def getTrackImage(artists,title,fast=False): # fast request only retuns cached and local results, generates redirect link for rest if fast: return "/image?title=" + urllib.parse.quote(title) + "&" + "&".join(["artist=" + urllib.parse.quote(a) for a in artists]) - # non-fast lookup (esentially only the resolver lookup) -# result = api_request_track((artists,title)) - result = get_image_track_all((artists,title)) + # non-fast lookup (essentially only the resolver lookup) + result = thirdparty.get_image_track_all((artists,title)) # cache results (even negative ones) #cachedTracks[(frozenset(artists),title)] = result @@ -347,9 +346,8 @@ def getArtistImage(artist,fast=False): # fast request only retuns cached and local results, generates redirect link for rest if fast: return "/image?artist=" + urllib.parse.quote(artist) - # non-fast lookup (esentially only the resolver lookup) -# result = api_request_artist(artist=artist) - result = get_image_artist_all(artist) + # non-fast lookup (essentially only the resolver lookup) + result = thirdparty.get_image_artist_all(artist) # cache results (even negative ones) #cachedArtists[artist] = result