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:
@@ -1,6 +1,6 @@
|
|||||||
import re
|
import re
|
||||||
import utilities
|
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
|
# need to do this as a class so it can retain loaded settings from file
|
||||||
# apparently this is not true
|
# apparently this is not true
|
||||||
@@ -52,6 +52,9 @@ class CleanerAgent:
|
|||||||
|
|
||||||
def parseArtists(self,a):
|
def parseArtists(self,a):
|
||||||
|
|
||||||
|
if a.strip() in settings.get_settings("INVALID_ARTISTS"):
|
||||||
|
return []
|
||||||
|
|
||||||
if a.strip() == "":
|
if a.strip() == "":
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
|||||||
@@ -111,6 +111,10 @@ def get_track_dict(o):
|
|||||||
|
|
||||||
|
|
||||||
def createScrobble(artists,title,time,volatile=False):
|
def createScrobble(artists,title,time,volatile=False):
|
||||||
|
|
||||||
|
if len(artists) == 0 or title == "":
|
||||||
|
return {}
|
||||||
|
|
||||||
dblock.acquire()
|
dblock.acquire()
|
||||||
|
|
||||||
i = getTrackID(artists,title)
|
i = getTrackID(artists,title)
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ TRACK_SEARCH_PROVIDER = None
|
|||||||
[Database]
|
[Database]
|
||||||
|
|
||||||
DB_CACHE_SIZE = 8192 # how many MB on disk each database cache should have available.
|
DB_CACHE_SIZE = 8192 # how many MB on disk each database cache should have available.
|
||||||
|
INVALID_ARTISTS = ["[Unknown Artist]","Unknown Artist"]
|
||||||
|
|
||||||
[Local Images]
|
[Local Images]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user