mirror of
https://github.com/spl0k/supysonic.git
synced 2024-11-09 19:52:16 +00:00
parent
9dd7d8a58b
commit
ff0a9475d4
@ -265,8 +265,12 @@ class Scanner(Thread):
|
||||
trdict["artist"] = trartist
|
||||
trdict["created"] = datetime.fromtimestamp(mtime)
|
||||
|
||||
try:
|
||||
Track(**trdict)
|
||||
self.__stats.added.tracks += 1
|
||||
except ValueError:
|
||||
# Field validation error
|
||||
self.__stats.errors.append(path)
|
||||
else:
|
||||
if tr.album.id != tralbum.id:
|
||||
trdict["album"] = tralbum
|
||||
@ -274,7 +278,11 @@ class Scanner(Thread):
|
||||
if tr.artist.id != trartist.id:
|
||||
trdict["artist"] = trartist
|
||||
|
||||
try:
|
||||
tr.set(**trdict)
|
||||
except ValueError:
|
||||
# Field validation error
|
||||
self.__stats.errors.append(path)
|
||||
|
||||
@db_session
|
||||
def remove_file(self, path):
|
||||
|
Loading…
Reference in New Issue
Block a user