diff --git a/server/app/lib/albumslib.py b/server/app/lib/albumslib.py index eea60e4f..6e196523 100644 --- a/server/app/lib/albumslib.py +++ b/server/app/lib/albumslib.py @@ -37,7 +37,6 @@ class RipAlbumImage: class ValidateAlbumThumbs: - @staticmethod def remove_obsolete(): """ @@ -54,6 +53,10 @@ class ValidateAlbumThumbs: if e is None: os.remove(entry.path) + break + + if os.path.getsize(entry.path) == 0: + os.remove(entry.path) @staticmethod def find_lost_thumbnails(): @@ -61,9 +64,7 @@ class ValidateAlbumThumbs: Re-rip lost album thumbnails """ entries = os.scandir(THUMBS_PATH) - entries = [ - Thumbnail(entry.name) for entry in entries if entry.is_file() - ] + entries = [Thumbnail(entry.name) for entry in entries if entry.is_file()] albums = helpers.Get.get_all_albums() thumbs = [(album.hash + ".webp") for album in albums] diff --git a/server/app/lib/taglib.py b/server/app/lib/taglib.py index 4770035d..8cd6280e 100644 --- a/server/app/lib/taglib.py +++ b/server/app/lib/taglib.py @@ -9,7 +9,7 @@ from mutagen.id3 import ID3 from PIL import Image -def return_album_art(filepath: str): +def parse_album_art(filepath: str): """ Returns the album art for a given audio file. """ @@ -36,9 +36,12 @@ def extract_thumb(filepath: str, webp_path: str) -> bool: tsize = settings.THUMB_SIZE if os.path.exists(img_path): - return True + img_size = os.path.getsize(filepath) - album_art = return_album_art(filepath) + if img_size > 0: + return True + + album_art = parse_album_art(filepath) if album_art is not None: img = Image.open(BytesIO(album_art)) diff --git a/src/App.vue b/src/App.vue index a7089ad1..739c4424 100644 --- a/src/App.vue +++ b/src/App.vue @@ -96,11 +96,4 @@ onStartTyping(() => { display: none; } } - -.content { - padding: 0 $small; - margin-top: $small; - overflow: auto; - padding-right: $small !important; -} diff --git a/src/assets/css/BottomBar/BottomBar.scss b/src/assets/css/BottomBar/BottomBar.scss index 775e7c96..58820b87 100644 --- a/src/assets/css/BottomBar/BottomBar.scss +++ b/src/assets/css/BottomBar/BottomBar.scss @@ -4,7 +4,6 @@ .grid { background-color: $primary; - display: grid; height: 100%; padding-right: $small; diff --git a/src/assets/css/global.scss b/src/assets/css/global.scss index 10ef000c..bf2f69d0 100644 --- a/src/assets/css/global.scss +++ b/src/assets/css/global.scss @@ -1,5 +1,6 @@ @import "../css/ProgressBar.scss"; @import "mixins.scss"; +// @import "./moz.scss"; :root { --separator: #ffffff46; @@ -86,26 +87,47 @@ a { display: none; } +input[type="search"] { + height: 2.25rem !important; +} + .l-container { display: grid; grid-template-columns: min-content 1fr min-content; - grid-template-rows: 3.5rem 1fr 1fr; - grid-auto-flow: row; + grid-template-rows: max-content 1fr max-content; grid-template-areas: "l-sidebar nav search-input" "l-sidebar content r-sidebar" "l-sidebar content r-sidebar" "l-sidebar content tabs"; - width: 100%; align-content: center; max-width: 2720px; - height: 100vh; + height: calc(100vh - 1rem); margin: 0 auto; + gap: 1rem; + margin: $small; +} + +#tabs { + grid-area: tabs; + height: 3.5rem; + margin-top: -$small; +} + +#acontent { + grid-area: content; + max-width: 1955px; + overflow: hidden auto; + margin-top: -$small; + + .nav { + margin: $small; + width: calc(100% - 1rem); + } } .tabs { grid-area: tabs; - border-left: solid 1px $gray3; @include tablet-landscape { display: none; @@ -124,7 +146,6 @@ a { width: 17rem; grid-area: l-sidebar; background-color: $black; - margin: $small; padding: 1rem; } @@ -153,24 +174,10 @@ a { display: flex; } -#acontent { - grid-area: content; - width: 100%; - max-width: 1955px; - padding: $small; - padding-left: 0; - overflow: auto; - margin: 0 auto; - - .nav { - margin: $small; - width: calc(100% - 1rem); - } -} - .r-sidebar { grid-area: r-sidebar; - border-left: solid 1px $gray3; + margin-top: -$small; + width: 29rem; } .image { @@ -203,13 +210,13 @@ a { /* width */ ::-webkit-scrollbar { - width: 0.5rem; + width: 3px; } /* Track */ ::-webkit-scrollbar-track { - background: rgba(51, 51, 51, 0.459); + background: transparent; border-radius: 1rem; } @@ -259,6 +266,7 @@ a { background-position: 0 38%; } } + @keyframes similarAlbums { 0% { background-position: 0 38%; diff --git a/src/assets/css/moz.scss b/src/assets/css/moz.scss new file mode 100644 index 00000000..72b6c623 --- /dev/null +++ b/src/assets/css/moz.scss @@ -0,0 +1,16 @@ +// Styles that only apply on our dear Firefox + +@-moz-document url-prefix() { + #acontent { + padding-right: 1rem !important; + } + + #ap-page { + width: 100% !important; + padding-right: 1rem !important; + } + + .ap-page-bottom-container { + width: calc(100% - 1rem) !important; + } +} diff --git a/src/assets/images/noise-texture.svg b/src/assets/images/noise-texture.svg new file mode 100644 index 00000000..8acc4de0 --- /dev/null +++ b/src/assets/images/noise-texture.svg @@ -0,0 +1,78 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/src/components/AlbumView/Header.vue b/src/components/AlbumView/Header.vue index 6bf05e8e..45abe96d 100644 --- a/src/components/AlbumView/Header.vue +++ b/src/components/AlbumView/Header.vue @@ -15,6 +15,7 @@ v-motion-slide-from-left class="rounded shadow-lg" /> +
@@ -187,6 +188,7 @@ function theyContrast(color1: string, color2: string) { .art { display: flex; align-items: flex-end; + position: relative; img { height: 16rem; @@ -194,6 +196,11 @@ function theyContrast(color1: string, color2: string) { object-fit: cover; transition: all 0.2s ease-in-out; } + + .filter { + position: absolute; + // display: none; + } } .nocontrast { diff --git a/src/components/FolderView/FolderItem.vue b/src/components/FolderView/FolderItem.vue index 8ca2b6d5..141db6f1 100644 --- a/src/components/FolderView/FolderItem.vue +++ b/src/components/FolderView/FolderItem.vue @@ -31,7 +31,7 @@ defineProps<{ grid-template-columns: max-content 1fr; padding-right: 1rem; align-items: center; - background-color: $gray4; + background-color: $gray3; transition: all 0.2s ease; border-radius: 0.75rem; diff --git a/src/components/FolderView/FolderList.vue b/src/components/FolderView/FolderList.vue index fd9cc654..d97449a2 100644 --- a/src/components/FolderView/FolderList.vue +++ b/src/components/FolderView/FolderList.vue @@ -1,37 +1,31 @@ - diff --git a/src/components/FolderView/SongList.vue b/src/components/FolderView/SongList.vue index 34b10c85..c8a56221 100644 --- a/src/components/FolderView/SongList.vue +++ b/src/components/FolderView/SongList.vue @@ -130,9 +130,10 @@ function getTracks() { } .table { - width: 100%; height: 100%; overflow-y: hidden; + background-color: $gray5; + padding: $small 0; .current { a { diff --git a/src/components/RightSideBar/Home/Main.vue b/src/components/RightSideBar/Home/Main.vue index 2533d3ff..c8592ad0 100644 --- a/src/components/RightSideBar/Home/Main.vue +++ b/src/components/RightSideBar/Home/Main.vue @@ -8,8 +8,6 @@ diff --git a/src/components/RightSideBar/Main.vue b/src/components/RightSideBar/Main.vue index da6326ac..f1b8895d 100644 --- a/src/components/RightSideBar/Main.vue +++ b/src/components/RightSideBar/Main.vue @@ -27,9 +27,7 @@ const tabs = useTabStore(); diff --git a/src/components/RightSideBar/Search/AlbumGrid.vue b/src/components/RightSideBar/Search/AlbumGrid.vue index 7c590cad..89fc819f 100644 --- a/src/components/RightSideBar/Search/AlbumGrid.vue +++ b/src/components/RightSideBar/Search/AlbumGrid.vue @@ -36,7 +36,6 @@ function loadMore() { } .grid { - display: grid; grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); flex-wrap: wrap; gap: 0.75rem; diff --git a/src/components/RightSideBar/Search/ArtistGrid.vue b/src/components/RightSideBar/Search/ArtistGrid.vue index 76ecb489..82c21a54 100644 --- a/src/components/RightSideBar/Search/ArtistGrid.vue +++ b/src/components/RightSideBar/Search/ArtistGrid.vue @@ -35,7 +35,6 @@ function loadMore() { } .grid { - display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; } diff --git a/src/components/RightSideBar/Search/PlaylistsGrid.vue b/src/components/RightSideBar/Search/PlaylistsGrid.vue index 5a611d22..e30984ca 100644 --- a/src/components/RightSideBar/Search/PlaylistsGrid.vue +++ b/src/components/RightSideBar/Search/PlaylistsGrid.vue @@ -36,7 +36,6 @@ function loadMore() { } .grid { - display: grid; grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); flex-wrap: wrap; gap: 0.75rem; diff --git a/src/components/RightSideBar/SearchInput.vue b/src/components/RightSideBar/SearchInput.vue index 002d3511..9f526f1e 100644 --- a/src/components/RightSideBar/SearchInput.vue +++ b/src/components/RightSideBar/SearchInput.vue @@ -7,7 +7,7 @@ class="rounded" v-model="search.query" placeholder="Search your library" - type="text" + type="search" @focus="focusThis()" @blur="unfocusThis()" /> @@ -32,8 +32,9 @@ function unfocusThis() { diff --git a/src/components/nav/Search.vue b/src/components/nav/Search.vue index 7640bbb6..62e96653 100644 --- a/src/components/nav/Search.vue +++ b/src/components/nav/Search.vue @@ -14,9 +14,13 @@ diff --git a/src/views/FolderView.vue b/src/views/FolderView.vue index 4f501ed3..6ce808df 100644 --- a/src/views/FolderView.vue +++ b/src/views/FolderView.vue @@ -63,7 +63,6 @@ onBeforeRouteUpdate((to, from) => { #scrollable { overflow-y: auto; - height: calc(100% - $small); scrollbar-color: grey transparent; .banner { diff --git a/src/views/Playlists.vue b/src/views/Playlists.vue index 9e999ddd..5f8cb324 100644 --- a/src/views/Playlists.vue +++ b/src/views/Playlists.vue @@ -25,7 +25,6 @@ const pStore = usePStore(); scrollbar-color: $gray2 transparent; .grid { - display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 1rem; }