Closed masoniis closed 1 month ago
It seems the max length for MacOS file names is 255 characters. [1]
Do all titles have a - before artist names? Maybe we can truncate there?
I think the main concern is having potential file name conflicts. I'm not familiar enough with this player to know how it handles this or whether that even matters.
[1] APFS: https://en.wikipedia.org/wiki/Comparison_of_file_systems#Limits
Do all titles have a - before artist names? Maybe we can truncate there?
I think the main concern is having potential file name conflicts. I'm not familiar enough with this player to know how it handles this or whether that even matters.
Yeah, we can truncate and the main concern is file name conflict. One simple way to fix this issue to only include first artist's name instead of all artists.
It seems the max length for MacOS file names is 255 characters. [1]
Do all titles have a - before artist names? Maybe we can truncate there?
I think the main concern is having potential file name conflicts. I'm not familiar enough with this player to know how it handles this or whether that even matters.
[1] APFS: https://en.wikipedia.org/wiki/Comparison_of_file_systems#Limits
What about saving as some kind of UUID? I noticed someone mentioned this issue where they were thinking of using the album ID as a hash, but at that point, you might as well just use the album ID
If the concern is that it'd make it hard for users to look up songs in their files, maybe the solution is to include a command line argument that parses the files and returns the right file names? Maybe a local database to store the right file names and associate them with their IDs?
Describe the bug When playing a song from a playlist that contains very long authors or song name, spotify_player runs into problems attempting to save files that have names which exceed the (mac) OS length limit for writing.
To Reproduce On MacOS sonoma, play a song from an album such as this one. I did this on a separate chrome spotify client, before trying to launch the terminal. Now that the song is active, the terminal will produce this output:
Expected behaviour The CLI doesn't attempt to write files which have names that exceed the mac limit. Perhaps they should be clipped, or encoded, etc.
Log and backtrace No backtrace necessary, (my backtrace is entirely empty, this is my first launch of spotify_player). Here is the relevant log context:
It's clear from above what is causing the long file error.
Environment