Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Problem: One folder empty view
#21
(10-08-2023, 10:31 PM)Tim Curtis Wrote: It's prolly this line of code in function renderFolderView()


Code:
if (typeof(data[i].file) != 'undefined' && data[i].file.indexOf('RADIO') == -1) {
   files[l] = data[I];
   l = l + 1;
}

OMG!

ETA
I'd eventually restrict this to the real, complete radio path.
Reply
#22
Yes, that would prolly be the way to go.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#23
Fixed in this commit
https://github.com/moode-player/moode/co...60fb030eaa
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#24
(10-09-2023, 02:30 PM)Tim Curtis Wrote: Fixed in this commit
https://github.com/moode-player/moode/co...60fb030eaa

Hi Tim,

looking at the code-fix, IMHO there will still be issues... as of now I believe a folder named "BANANAS" will not be read, as indexof("NAS") will return true...
Reply
#25
(10-09-2023, 03:12 PM)Nutul Wrote:
(10-09-2023, 02:30 PM)Tim Curtis Wrote: Fixed in this commit
https://github.com/moode-player/moode/co...60fb030eaa

Hi Tim,

looking at the code-fix, IMHO there will still be issues... as of now I believe a folder named "BANANAS" will not be read, as indexof("NAS") will return true...

Could be right :-0

I'll test.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#26
(10-09-2023, 03:56 PM)Tim Curtis Wrote:
(10-09-2023, 03:12 PM)Nutul Wrote:
(10-09-2023, 02:30 PM)Tim Curtis Wrote: Fixed in this commit
https://github.com/moode-player/moode/co...60fb030eaa

Hi Tim,

looking at the code-fix, IMHO there will still be issues... as of now I believe a folder named "BANANAS" will not be read, as indexof("NAS") will return true...

Could be right :-0

I'll test.

The folderView() code looks ok since its only checking for 'RADIO/'.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#27
(10-09-2023, 04:03 PM)Tim Curtis Wrote:
(10-09-2023, 03:56 PM)Tim Curtis Wrote:
(10-09-2023, 03:12 PM)Nutul Wrote:
(10-09-2023, 02:30 PM)Tim Curtis Wrote: Fixed in this commit
https://github.com/moode-player/moode/co...60fb030eaa

Hi Tim,

looking at the code-fix, IMHO there will still be issues... as of now I believe a folder named "BANANAS" will not be read, as indexof("NAS") will return true...

Could be right :-0

I'll test.

The folderView() code looks ok since its only checking for 'RADIO/'.

Yep, right.
Anyway, "*RADIO/" still could prevent something, while "/RADIO/" should not.

IMO, the check should be path != "/var/lib/mpd/music/RADIO/", and not indexof("RADIO") == -1, which will prevent anything with RADIO in its name from being scanned, no matter where.

It is true, indeed, that it suffices not to name the folders all-uppercase, but from a logical point of view... ;-)
Reply
#28
The folders NAS, RADIO, SDCARD and USB are all relative to /var/lib/mpd/music/ in output returned by MPD lsinfo.

Thus testing for RADIO/ will be ok.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Forum Jump: