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:
parent
5d9ecc0557
commit
974574da98
@ -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 []
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user