pascalopitz / unoffical-sonos-controller-for-linux

An Electron based linux app for controlling your sonos system.
http://pascalopitz.github.io/unoffical-sonos-controller-for-linux/
MIT License
545 stars 49 forks source link

localMusic files with & in filename #172

Closed s1037989 closed 2 years ago

s1037989 commented 2 years ago

I've seen a few open issues with people reporting issues using localMusic. I have found that files with & in the filename cause the "On this device" selection to do nothing. The app is still fully responsive, but "On this device" does nothing. When I remove & from the file names of all files in the local music folder, then "On this device" immediately goes to the full listing of files. I have shown this to be successful for a local music folder with about 30 files, none with &; however, when I then jump straight to a local music folder with 16,000 files and no &, I still get no response from "On this device". So it may be that there are just too many files to list; but it also may be that there are other characters than just the & that are causing "On this device" to not behave as expected.

s1037989 commented 2 years ago

I have another folder of 2,062 files that are all named with a SHA-1 filename.

$ ls -1 *.mp3 | wc -l
2062
$ ls -1 *.mp3 | head -2
0004652d7715efe7436ac9e8c7648290026ceabc.mp3
002e5e530029979e919e86c212d62c2f37b838ba.mp3

Clearly then, no funny characters at all. The list loads in about 16s after clicking "On this device".

  <-- POST /smapi
  --> POST /smapi 200 16s 2.24mb

And, despite the worthless filename, all of those with worthwhile id3 tags show up nicely in the list "On this device". So, still, the file count (> 2,062) could be an issue, but it seems perhaps more likely that there's more than just & in filenames that cause "On this device" to not behave as expected.

s1037989 commented 2 years ago

Successful with 16,346 SHA-1-named mp3 files.

$ ls -1 *.mp3 | wc -l
16346
$ ls -1 | sort
00003b1fb64db1f5fe5a30dfd6d7d0da553a315a.mp3
0004e1865bc93d444b4bb00c5d4a3c40958002cd.mp3
<snip>
fff4f0db6bc8cc33c1a756fc71e649fffb34ea69.mp3
fffbe03a4ecae6c16ddd7f974bdf1b6e43e2b719.mp3

Takes 123s to load in the controller, however; but what do you expect with that many files needing to have their id3 tags read?

Done indexing /data/mp3
Unloaded DB
  <-- POST /smapi
  --> POST /smapi 200 123s 18.79mb

Therefore, the problem with localMusic is more than just & characters in the filename. I'm not sure what other characters cause issues. But since id3 tags are used, filenames don't matter. Now the only issue is speed... What can be done to load and scroll a list of 16,346 files more efficiently?

pascalopitz commented 2 years ago

The feature was experimental when I put it in, and it's been more trouble that it's been useful to myself. Happy to accept pull requests to make it work, but I think if I keep getting more tickets for it I'll remove it from the app all together.

On Thu, 30 Dec 2021, 17:22 Stefan Adams, @.***> wrote:

Successful with 16,346 SHA-1-named mp3 files.

$ ls -1 *.mp3 | wc -l 16346 $ ls -1 | sort 00003b1fb64db1f5fe5a30dfd6d7d0da553a315a.mp3 0004e1865bc93d444b4bb00c5d4a3c40958002cd.mp3

fff4f0db6bc8cc33c1a756fc71e649fffb34ea69.mp3 fffbe03a4ecae6c16ddd7f974bdf1b6e43e2b719.mp3 Takes 123s to load in the controller, however; but what do you expect with that many files needing to have their id3 tags read? Done indexing /data/wasabi.picard Unloaded DB <-- POST /smapi --> POST /smapi 200 123s 18.79mb Therefore, the problem with localMusic is more than just & characters in the filename. I'm not sure what other characters cause issues. But since id3 tags are used, filenames don't matter. Now the only issue is speed... What can be done to load and scroll a list of 16,346 files more efficiently? — Reply to this email directly, view it on GitHub , or unsubscribe . Triage notifications on the go with GitHub Mobile for iOS or Android . You are receiving this because you are subscribed to this thread.Message ID:
s1037989 commented 2 years ago

Oh no! It's such a great feature! My intention was to point that out: that many peoples' struggles with it may just be funny characters in their filenames. I'll see if I can figure out how to fix it.

pascalopitz commented 2 years ago

Thanks Stefan for your contribution. Merged.

s1037989 commented 2 years ago

Thanks! And thank you for building and maintaining this great app!