mirror of
https://github.com/koel/koel.git
synced 2026-04-25 16:56:02 +03:00
[GH-ISSUE #1919] [FR]: Browse by folder #1037
Labels
No labels
Authentication
Dependencies
Documentation
Feature Request
Flac
Help Wanted
Installation/Setup
Integration
Mobile
PR Welcome
Pending Release
Performance
Playlist
S3
Search
Sync
[Pri] Low
[Pri] Normal
[Status] Keep Open
[Status] Needs Author Reply
[Status] Needs Review
[Status] Stale
[Status] Will Implement
[Type] Blessed
[Type] Bug
[Type] Duplicate
[Type] Enhancement
[Type] Help Request
[Type] Question
[Type] Task
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/koel-koel#1037
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @yboulkaid on GitHub (May 12, 2025).
Original GitHub issue: https://github.com/koel/koel/issues/1919
Originally assigned to: @phanan on GitHub.
Description
Hi!
How easy/hard is it to add a folder view to Koel? I have carried my digital music collection with me for 20 years and my folder structure is much better than my metadata organization 😅
It's surprisingly hard to find a self-hosted media browser that has this :( I would even be fine with it as a Koel Plus feature
Cheers!
Additional information
No response
@phanan commented on GitHub (May 13, 2025):
It's not hard if you set out to design and build the functionality as the core feature of a music player from the start, NOT as an afterthought/addon. Imagine the complexity it'd bring to the current features: What would happen to the song list, artist list, album list, genres? How will editing work? How about liking, sharing, adding to / removing from playlists, etc? On every level – client code, API, database, the changes that need to be made for this (relatively) edge case would be massive.
On the other hand, it's relatively easy to find a music tag editor that can fill the tags based on folder structure and file names.
@yboulkaid commented on GitHub (May 13, 2025):
Thanks for the answer!
For the sake of discussion: the way I thought about it was more like an additional view of the existing data. You'd keep everything else that is valid for tag-based collections in place, and add a way to browse files instead of songs.
Each song already has a mapping to the physical file path, so it's possible to extract the folder hierarchy structure, and from there make it browsable.
That said, I understand it's your project and if you don't think it aligns with your philosophy it's all good :) Just saying that overall there's an underserved niche of users with file-based workflows, both for audio and image contents (photographers).
Cheers!
@phanan commented on GitHub (May 13, 2025):
@yboulkaid I wish it were as simple as just adding a way to browse files instead of songs, really. For example, basing the functionality on the database-stored file paths isn't the best approach, as it would likely require some non-optimized, non-DB-agnostic SQLs, so a better bet would be to read the filesystem on the fly. Then, UI-wise, how should it look? How will virtual scrolling work? Are we providing a menu tree or…? Things will only get more and more complicated from there.
@yboulkaid commented on GitHub (May 13, 2025):
I went through the same questions while building the data model for a folder-based photo gallery, sharing my notes and findings here if it's any help/inspiration :)
folderstable. The table has a unique index onpathand aparent_idforeign key to itself.folder_idforeign key. This makes finding the songs in a folder performant and database-agnosticfolderrecords as you traverse the filesystemsongsin it, show themWhere it can be tricky:
parent_id, folders need to be traversed breadth-first so that parents records are always created before childrenSo overall it's definitely some added complexity to take for a small niche of users, which is why I think it's acceptable to have it as a Koel Plus feature
@phanan commented on GitHub (May 14, 2025):
If we totally disregard other views (TBH I'm not the biggest fan of the idea), then yes, I reckon we could add a new screen called "Browse." I'm still not sure, however, how it'd look. A Finder-style list view may work, but how would we deal with folders with thousands of items—if we wanted to at all?
@gelokatil commented on GitHub (May 15, 2025):
It would be wonderful if this possible future folder navigation utility would allow adding the contents of a directory directly to create a playlist; perhaps it would be a simpler intermediate option than allowing indexing the physical directory of the music files as another metadata element.
Another option could be to create a third type of playlist (or a new option of the smart playlist) that accepts a directory or disk path as a parameter. Given my lack of knowledge on the subject, considering the development costs, as @phanan has commented, this seems more reasonable.
@yboulkaid commented on GitHub (May 15, 2025):
IMO folder browsing is orthogonal to the tag-based browsing, so depending on what you mean by "disregard" it can be an acceptable trade-off. Tag-based features would be removed (they don't make sense in a folder view), but song-based ones are enabled.
After playing around yesterday with Swing Music (similar to Koel, and implements a folder view), I brainstormed some of the interactions that would need to be supported, and added some notes:
SongrecordsSongrecordThe challenges:
@phanan commented on GitHub (May 15, 2025):
Sounds like some nice challenges to take :) I guess some of the problems
can only be solved once you encounter them. The biggest issue is still… time.
On Thu, May 15, 2025 at 12:49 Youssef Boulkaid @.***>
wrote:
@yboulkaid commented on GitHub (May 15, 2025):
As someone who's also starved for time, hear hear :)
I'll keep an eye on this thread, I'm available if you want to bounce off ideas!
@phanan commented on GitHub (May 28, 2025):
@yboulkaid et al. FYI the feature has been added to v7.5.x (Plus edition).
@gelokatil commented on GitHub (May 28, 2025):
Perfect! I'll try out the new feature and send you feedback, @phanan
@gelokatil commented on GitHub (Jun 22, 2025):
Hi @phanan
I've been testing the new Media Browser feature for a few weeks now, and I honestly can't find any flaws; it works like a charm :) . I have a few drawbacks, or rather, a couple of possible "improvements."
It would be very useful to be able to add a directory or multiple directories to a playlist if it were a tree. Right now, you can only add individual songs, which is fine.
On the other hand, in the Media Browser option, the left side of the window is empty. It might be interesting to fill that space with the song editing window embedded in the window itself, or find another way to edit song attributes directly in the Media Browser, taking advantage of the free space.
Thanks for everything.
@phanan commented on GitHub (Jun 22, 2025):
Thanks for the feedback! What do you mean the left side is empty?
On Sun, Jun 22, 2025 at 07:45 Gelo @.***> wrote:
@gelokatil commented on GitHub (Jun 22, 2025):
This, (sorry i mean right side)
@phanan commented on GitHub (Jun 22, 2025):
Isn’t that because you’re collapsing both the left and right sidebars? On a
standard laptop screen, it should look fine (I tested with short and long
file names).
On Sun, Jun 22, 2025 at 09:16 Gelo @.***> wrote:
@gelokatil commented on GitHub (Jun 22, 2025):
Maybe it's because I use a 24-inch desktop monitor but even showing the right panel, (which is not useful in the context of the media browser) there is a lot of free space in the middle.
On a 14-17 inch laptop monitor, I understand it would look much better.