mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-03 20:13:02 +00:00
rewrite populate.py to minimize db and hdd reads
+ change process name in manage.py + update db query to save show albums as single, as an integer + enable periodic scans + misc
This commit is contained in:
+3
-1
@@ -228,6 +228,8 @@ def get_artist(artisthash: str):
|
||||
except ValueError:
|
||||
year = 0
|
||||
|
||||
decade = None
|
||||
|
||||
if year:
|
||||
decade = math.floor(year / 10) * 10
|
||||
decade = str(decade)[2:] + "s"
|
||||
@@ -273,8 +275,8 @@ def get_artist_albums(artisthash: str):
|
||||
eps = [a for a in all_albums if a.is_EP]
|
||||
|
||||
def remove_EPs_and_singles(albums_: list[Album]):
|
||||
albums_ = [a for a in albums_ if not a.is_EP]
|
||||
albums_ = [a for a in albums_ if not a.is_single]
|
||||
albums_ = [a for a in albums_ if not a.is_EP]
|
||||
return albums_
|
||||
|
||||
albums = filter(lambda a: artisthash in a.albumartists_hashes, all_albums)
|
||||
|
||||
Reference in New Issue
Block a user