diff --git a/README.md b/README.md index 3441acc..358d375 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,5 @@ -# musicx-v +### Alice Music -## Project setup -``` -yarn install -``` +![](./images/1.png) -### Compiles and hot-reloads for development -``` -yarn serve -``` - -### Compiles and minifies for production -``` -yarn build -``` - -### Lints and fixes files -``` -yarn lint -``` - -### Customize configuration -See [Configuration Reference](https://cli.vuejs.org/config/). +`installation instructions coming soon ...` \ No newline at end of file diff --git a/images/1.png b/images/1.png new file mode 100644 index 0000000..d017d02 Binary files /dev/null and b/images/1.png differ diff --git a/server/app/api.py b/server/app/api.py index 381a911..c6920d8 100644 --- a/server/app/api.py +++ b/server/app/api.py @@ -57,9 +57,7 @@ def search(): artist_obj = { "name": artist, - "image": "http://0.0.0.0:8900/images/artists/" - + artist.replace("/", "::") - + ".webp", + "image": helpers.check_artist_image(artist), } if artist_obj not in artists_dicts: @@ -141,9 +139,7 @@ def get_albumartists(): for artist in artists: artist_obj = { "name": artist, - "image": "http://0.0.0.0:8900/images/artists/" - + artist.replace("/", "::") - + ".webp", + "image": helpers.check_artist_image(artist), } final_artists.append(artist_obj) diff --git a/server/app/helpers.py b/server/app/helpers.py index f11f4df..d91a9db 100644 --- a/server/app/helpers.py +++ b/server/app/helpers.py @@ -116,3 +116,14 @@ def extract_image_colors(image) -> list: formatted_colors.append(color) return formatted_colors + +def check_artist_image(image: str) -> str: + """ + Checks if the artist image is valid. + """ + img_name = image.replace("/", "::")+ ".webp" + + if not os.path.exists(os.path.join(app_dir, "images", "artists", img_name)): + return "http://0.0.0.0:8900/images/artists/0.webp" + else: + return "http://0.0.0.0:8900/images/artists/" + img_name, \ No newline at end of file diff --git a/src/assets/css/global.scss b/src/assets/css/global.scss index 52f56ee..b8e57d4 100644 --- a/src/assets/css/global.scss +++ b/src/assets/css/global.scss @@ -97,6 +97,10 @@ button { .tabs { grid-area: tabs; + + @include tablet-landscape { + display: none; + } } .topnav { diff --git a/src/components/shared/HotKeys.vue b/src/components/shared/HotKeys.vue index 6ea0478..52fa2f4 100644 --- a/src/components/shared/HotKeys.vue +++ b/src/components/shared/HotKeys.vue @@ -32,7 +32,7 @@ const isPlaying = playAudio.playing; } .play-pause { - background-image: url(../../assets/icons/play.svg) !important; + background-image: url(../../assets/icons/play.svg); } .isPlaying {