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