1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Added basic filter to reject wrong scrobbles

This commit is contained in:
Krateng 2019-08-30 15:57:54 +02:00
parent 5d9ecc0557
commit 974574da98
3 changed files with 9 additions and 1 deletions

View File

@ -1,6 +1,6 @@
import re
import utilities
from doreah import tsv
from doreah import tsv, settings
# need to do this as a class so it can retain loaded settings from file
# apparently this is not true
@ -52,6 +52,9 @@ class CleanerAgent:
def parseArtists(self,a):
if a.strip() in settings.get_settings("INVALID_ARTISTS"):
return []
if a.strip() == "":
return []

View File

@ -111,6 +111,10 @@ def get_track_dict(o):
def createScrobble(artists,title,time,volatile=False):
if len(artists) == 0 or title == "":
return {}
dblock.acquire()
i = getTrackID(artists,title)

View File

@ -24,6 +24,7 @@ TRACK_SEARCH_PROVIDER = None
[Database]
DB_CACHE_SIZE = 8192 # how many MB on disk each database cache should have available.
INVALID_ARTISTS = ["[Unknown Artist]","Unknown Artist"]
[Local Images]