mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-03 20:13:02 +00:00
move loader to search bar
This commit is contained in:
+3
-4
@@ -7,11 +7,11 @@ from app.helpers import (
|
||||
convert_to_json,
|
||||
remove_duplicates,
|
||||
save_image,
|
||||
isValidFile,
|
||||
# isValidFile,
|
||||
create_config_dir,
|
||||
extract_thumb,
|
||||
run_fast_scandir,
|
||||
home_dir, app_dir,
|
||||
run_fast_scandir
|
||||
)
|
||||
|
||||
from app import cache
|
||||
@@ -358,7 +358,7 @@ def getAlbumSongs(query: str):
|
||||
artist = query.split('::')[1].replace('|', '/')
|
||||
|
||||
songs = all_songs_instance.find_songs_by_album(album, artist)
|
||||
songs_array = convert_to_json(songs)
|
||||
songs_array = remove_duplicates(convert_to_json(songs))
|
||||
|
||||
print(artist)
|
||||
|
||||
@@ -372,6 +372,5 @@ def getAlbumSongs(query: str):
|
||||
"duration": sum(song['length'] for song in songs_array),
|
||||
"image": songs_array[0]['image'],
|
||||
"artist": songs_array[0]['album_artist']
|
||||
# "date": songs_array[0]['date']
|
||||
}
|
||||
return {'songs': songs_array, 'info': album_obj}
|
||||
|
||||
@@ -127,7 +127,7 @@ def getTags(full_path):
|
||||
try:
|
||||
title = audio['TIT2'][0]
|
||||
except:
|
||||
title = 'Unknown'
|
||||
title = full_path.split('/')[-1]
|
||||
except:
|
||||
title = full_path.split('/')[-1]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user