tramhao / termusic

Music Player TUI written in Rust
GNU General Public License v3.0
968 stars 42 forks source link

Allow for tracks to be added recursively from library #103

Open Porkepix opened 1 year ago

Porkepix commented 1 year ago

When using shift + L to add all the tracks from a directory to the playlist, it do work for the first level (ie. all tracks included in that directory), but it doesn't work for directories in that directory that also have tracks, and probably doesn't either for directories in levels below.

shift + L could walk directories recursively to get all the musics included in the whole tree. It just needs to be careful with links to don't go into deadlocks/infinite loops/counting several times the same files.

tramhao commented 1 year ago

It's a good idea and I'll look into it. Thanks for the feedback.

Porkepix commented 1 year ago

Also, note that tools such as fd and ripgrep already solved some of these issues (my initial remark was because I already reported issues on such tools in some corner cases).

hasezoey commented 5 months ago

i didnt notice there was a issue for this already (so i closed mine #164)

this should be easily enough to be added, but there are some questions:

and maybe anything i have missed?

self-referential link example:

$ mkdir test
$ cd test
$ mkdir level1
$ cd level1
$ ln -sfr ../
$ cd test/level1/test
$ pwd
/test/level1/test/level1/test