[PR #1911] [CLOSED] feat: album release year data and album list sort modes #1949

Closed
opened 2026-02-26 03:32:50 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/koel/koel/pull/1911
Author: @Jacob-Noah
Created: 4/5/2025
Status: Closed

Base: masterHead: feat/album-year


📝 Commits (4)

  • 0397da2 feat: add album release year to model/views
  • d59ec68 feat: add album list sort modes
  • efd9966 Merge branch 'koel:master' into feat/album-year
  • 8559e32 Merge branch 'master' into feat/album-year

📊 Changes

15 files changed (+167 additions, -9 deletions)

View changed files

app/Console/Commands/UpdateAlbumReleaseYears.php (+34 -0)
📝 app/Http/Controllers/API/AlbumController.php (+4 -2)
📝 app/Http/Resources/AlbumResource.php (+2 -0)
📝 app/Models/Album.php (+1 -1)
📝 app/Repositories/AlbumRepository.php (+5 -2)
📝 app/Services/FileScanner.php (+21 -0)
📝 app/Values/UserPreferences.php (+5 -0)
database/migrations/2025_04_04_213046_add_release_year_to_albums_table.php (+18 -0)
📝 resources/assets/js/components/album/AlbumCard.vue (+1 -0)
📝 resources/assets/js/components/screens/AlbumListScreen.vue (+16 -2)
📝 resources/assets/js/components/screens/AlbumScreen.vue (+1 -0)
resources/assets/js/components/ui/AlbumSortModeSwitch.vue (+49 -0)
📝 resources/assets/js/stores/albumStore.ts (+5 -2)
📝 resources/assets/js/stores/preferenceStore.ts (+1 -0)
📝 resources/assets/js/types.d.ts (+4 -0)

📄 Description

With great pleasure I contribute my most desired feature and one that I believe would assist many music collectors' efforts in transitioning to Koel, #1894. For simplicity's sake I absorb the release year for albums from the first track's metadata. This enables the ability to display them and add sort modes to the album list. I'm pretty happy with the results:

NVIDIA_Overlay_SZgQgWewb1

Pagination otherwise works as normal, as well as the album view mode options. I added a command for collecting the release year for existing libraries, it's just a little long because it's got such a specific use-case, but it could also be done as part of the migration if desired. All tests passed locally for me except for filesystem related tests that I assume require Linux.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/koel/koel/pull/1911 **Author:** [@Jacob-Noah](https://github.com/Jacob-Noah) **Created:** 4/5/2025 **Status:** ❌ Closed **Base:** `master` ← **Head:** `feat/album-year` --- ### 📝 Commits (4) - [`0397da2`](https://github.com/koel/koel/commit/0397da20ccc8a2b718e2086704e07421711e3cee) feat: add album release year to model/views - [`d59ec68`](https://github.com/koel/koel/commit/d59ec687b834e1c89fbb6e35e08a3cf594def26c) feat: add album list sort modes - [`efd9966`](https://github.com/koel/koel/commit/efd9966c137e79c0a0436e756a854cee9fb4fb6a) Merge branch 'koel:master' into feat/album-year - [`8559e32`](https://github.com/koel/koel/commit/8559e32e3f466ad102fe95c797c0c2a6ac6b8338) Merge branch 'master' into feat/album-year ### 📊 Changes **15 files changed** (+167 additions, -9 deletions) <details> <summary>View changed files</summary> ➕ `app/Console/Commands/UpdateAlbumReleaseYears.php` (+34 -0) 📝 `app/Http/Controllers/API/AlbumController.php` (+4 -2) 📝 `app/Http/Resources/AlbumResource.php` (+2 -0) 📝 `app/Models/Album.php` (+1 -1) 📝 `app/Repositories/AlbumRepository.php` (+5 -2) 📝 `app/Services/FileScanner.php` (+21 -0) 📝 `app/Values/UserPreferences.php` (+5 -0) ➕ `database/migrations/2025_04_04_213046_add_release_year_to_albums_table.php` (+18 -0) 📝 `resources/assets/js/components/album/AlbumCard.vue` (+1 -0) 📝 `resources/assets/js/components/screens/AlbumListScreen.vue` (+16 -2) 📝 `resources/assets/js/components/screens/AlbumScreen.vue` (+1 -0) ➕ `resources/assets/js/components/ui/AlbumSortModeSwitch.vue` (+49 -0) 📝 `resources/assets/js/stores/albumStore.ts` (+5 -2) 📝 `resources/assets/js/stores/preferenceStore.ts` (+1 -0) 📝 `resources/assets/js/types.d.ts` (+4 -0) </details> ### 📄 Description With great pleasure I contribute my most desired feature and one that I believe would assist many music collectors' efforts in transitioning to Koel, #1894. For simplicity's sake I absorb the release year for albums from the first track's metadata. This enables the ability to display them and add sort modes to the album list. I'm pretty happy with the results: ![NVIDIA_Overlay_SZgQgWewb1](https://github.com/user-attachments/assets/9d57c65f-481b-420f-864a-029d73c63bc7) Pagination otherwise works as normal, as well as the album view mode options. I added a command for collecting the release year for existing libraries, it's just a little long because it's got such a specific use-case, but it could also be done as part of the migration if desired. All tests passed locally for me except for filesystem related tests that I assume require Linux. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 03:32:50 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/koel-koel#1949
No description provided.