mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 04:23:01 +00:00
add media queries
This commit is contained in:
+9
-2
@@ -98,7 +98,7 @@ def get_album_artists(album, artist):
|
||||
for artist in artists:
|
||||
artist_obj = {
|
||||
"name": artist,
|
||||
"image": "http://127.0.0.1:8900/images/artists/webp/" + artist.replace('/', '::') + ".webp"
|
||||
"image": "http://0.0.0.0:8900/images/artists/webp/" + artist.replace('/', '::') + ".webp"
|
||||
}
|
||||
final_artists.append(artist_obj)
|
||||
|
||||
@@ -190,6 +190,9 @@ def getFolderTree(folder: str):
|
||||
if x['folder'] == req_dir:
|
||||
songs.append(x)
|
||||
|
||||
for song in songs:
|
||||
song['image'] = song['image'].replace('127.0.0.1', '0.0.0.0')
|
||||
|
||||
return {"files": helpers.remove_duplicates(songs), "folders": sorted(folders, key=lambda i: i['name'])}
|
||||
|
||||
|
||||
@@ -261,7 +264,7 @@ def getAlbumSongs(query: str):
|
||||
@cache.cached()
|
||||
def drop_db(title, artist):
|
||||
bio = functions.getAlbumBio(title, artist)
|
||||
return {'bio': bio}
|
||||
return {'bio': bio}, 200
|
||||
|
||||
|
||||
@bp.route('/convert')
|
||||
@@ -278,3 +281,7 @@ def convert_images_to_webp():
|
||||
img.save(os.path.join(final_path, file.name.replace('.jpg', '.webp')), format='webp')
|
||||
|
||||
return "Done"
|
||||
|
||||
@bp.route('/test')
|
||||
def test_http_status_response():
|
||||
return "OK", 200
|
||||
@@ -128,11 +128,10 @@ def extract_thumb(path: str) -> str:
|
||||
except:
|
||||
return use_defaults()
|
||||
|
||||
final_path = "http://127.0.0.1:8900/images/thumbnails/" + webp_path
|
||||
final_path = "http://0.0.0.0:8900/images/thumbnails/" + webp_path
|
||||
|
||||
return final_path
|
||||
|
||||
|
||||
def getTags(full_path: str) -> dict:
|
||||
"""
|
||||
Returns a dictionary of tags for a given file.
|
||||
|
||||
Reference in New Issue
Block a user