diff --git a/server/app/api.py b/server/app/api.py index 65922c6..c37ebba 100644 --- a/server/app/api.py +++ b/server/app/api.py @@ -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 \ No newline at end of file diff --git a/server/app/functions.py b/server/app/functions.py index df0972c..73baad0 100644 --- a/server/app/functions.py +++ b/server/app/functions.py @@ -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. diff --git a/server/manage.py b/server/manage.py index 52e5aed..239537a 100644 --- a/server/manage.py +++ b/server/manage.py @@ -3,4 +3,4 @@ from app import create_app if __name__ == '__main__': app = create_app() - app.run(debug=True, threaded=True, host="127.0.0.1", port=9876) + app.run(debug=True, threaded=True, host="0.0.0.0", port=9876) diff --git a/server/start.sh b/server/start.sh index da9ab28..ed2ec16 100755 --- a/server/start.sh +++ b/server/start.sh @@ -1,3 +1,3 @@ -python manage.py +python manage.py # gunicorn -b 0.0.0.0:9876 --workers=4 "wsgi:create_app()" --log-level=debug \ No newline at end of file diff --git a/src/assets/css/_variables.scss b/src/assets/css/_variables.scss index bdcc3b3..414fee7 100644 --- a/src/assets/css/_variables.scss +++ b/src/assets/css/_variables.scss @@ -1,11 +1,39 @@ // colors -$card-dark: #08090C; +$card-dark: #08090c; $red: #df4646; $blue: rgb(5, 80, 150); $green: rgb(67, 148, 67); $separator: #ffffff46; $pink: rgb(196, 58, 58); // sizes -$small: .5em; -$smaller: .25em; \ No newline at end of file +$small: 0.5em; +$smaller: 0.25em; + +// media query mixins + +@mixin phone-only { + @media (max-width: 599px) { + @content; + } +} +@mixin tablet-portrait { + @media (max-width: 900px) { + @content; + } +} +@mixin tablet-landscape { + @media (max-width: 1200px) { + @content; + } +} +@mixin for-desktop-up { + @media (min-width: 1200px) { + @content; + } +} +@mixin for-big-desktop-up { + @media (min-width: 1800px) { + @content; + } +} diff --git a/src/assets/css/global.scss b/src/assets/css/global.scss index 64e9f19..e3c0023 100644 --- a/src/assets/css/global.scss +++ b/src/assets/css/global.scss @@ -136,14 +136,13 @@ button { width: 30em; position: relative; margin-bottom: 0.5em; -} -@media (max-width: 70em) { - .r-sidebar { + @include tablet-landscape { display: none; } } + .image { background-position: center; background-repeat: no-repeat; @@ -248,3 +247,5 @@ button { background-image: url(../../assets/icons/playing.webp); transition: all 0.3s ease-in-out; } + + diff --git a/src/components/FolderView/Header.vue b/src/components/FolderView/Header.vue index a453c04..80e869c 100644 --- a/src/components/FolderView/Header.vue +++ b/src/components/FolderView/Header.vue @@ -112,6 +112,10 @@ export default { background-image: url(../../assets/icons/folder.svg); margin-right: $small; } + + @include phone-only { + display: none; + } } } \ No newline at end of file diff --git a/src/components/FolderView/SongList.vue b/src/components/FolderView/SongList.vue index 8695faf..a77feb0 100644 --- a/src/components/FolderView/SongList.vue +++ b/src/components/FolderView/SongList.vue @@ -4,10 +4,10 @@
Track | -Artist | -Album | -Duration | +Track | +Artist | +Album | +Duration |
---|---|---|---|---|---|---|---|
+ | |||||||
{{ song.title }}
+
+
+ {{
+ artist
+ }}
+
|
- + |
{{ song.album_artist }}
|
-
- {{ song.album }}
+ |
+
+ {{ song.album }}
+
|
- + | {{ `${Math.trunc(song.length / 60)} min` }} |