Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playlist question #845

Closed
RandomBloke85 opened this issue Apr 15, 2021 · 5 comments
Closed

Playlist question #845

RandomBloke85 opened this issue Apr 15, 2021 · 5 comments

Comments

@RandomBloke85
Copy link

Hello

Thank you for developing this fantastic little app. Just a small question regarding playlists:

My library has a playlist folder with some *.m3u's which it can't make use of. Is there a possibility to point to that folder? I also tried to create a playlist in the Music App and import an existing playlist in my library directory, but do get an error message.

Thank you

@paulijar
Copy link
Collaborator

To be able to play a m3u (or m3u8 or pls) file in the Files app or to import its contents to the Music app, the playlist file must contain relative paths to files within your cloud. The relative paths are resolved relative to the location of the playlist file. Playlist files containing absolute paths do not work, as the actual paths of your files is hidden by the cloud, and we only see the internal paths within the cloud storage.

If you think that your playlist files already fulfill these requirements, then I will need some more info, and preferably a sample of the file which doesn't seem to work.

@RandomBloke85
Copy link
Author

Hi Paul

Thanks for getting back to me.

I use a Windows software called "Playlist Creator" to create my playlists. The default is relative paths, so that was given, BUT with a backslash. I never thought this would matter, but obviously it does... ;-) Changing them to forward slashes and recreate the list solved the issue. Done. Thanks again!

However, some files got stripped away. I guess thats due to formats, Nextcloud music can't read/transcode (i.e. wma...).

@paulijar
Copy link
Collaborator

Yeah, backslash is not a valid directory separator on Linux. Instead, it's used as an escape character. Linux file names are allowed to contain almost any characters, including backslashes (which usually have to be escaped like \\). Hence, we can't blindly convert backslashes to slashes.

Importing playlist file to Music brings only such files which have been scanned and are part of the library. This requires two things: 1. The file resides somewhere under the folder which has been configured as the root of the music library. 2. The file is identified as an audio file by Nextcloud. The second condition depends on the file extension to mime type mappings of Nextcloud; the mapped mime type must be of format audio/*. It should be possible to modify these mappings yourself but the default mapping certainly doesn't include the extension .wma. And even if Nextcloud and Music would identify some file as an audio file that still doesn't guarantee that it could be played; that depends on the capabilities of the web browser used.

paulijar added a commit that referenced this issue May 2, 2021
When parsing a playlist file, we now support also the Windows style of
using backslashes as directory separators instead of slashes. The
solution is kind of heuristic or "best effort": The parsed path is
first tried to be used "as is". If there is no such file and the path
contains any backslashes, then those backslashes are converted to
slashes and the lookup is made again. It is principally possible, that
this would sometime find some unintended file, but those cases are
"pathological" and should not be a real-life issue.

refs #845
@paulijar
Copy link
Collaborator

paulijar commented May 2, 2021

After thinking this for some time, I now created a kind of heuristic support for backslashes as directory separators. The application still firsts considers the possibility that any backslash found in a path contained in a playlist file is just part of the file/folder name. But if such file is not found from the file system, then all backslashes are converted to slashes and the app retries finding the file like this.

@paulijar
Copy link
Collaborator

The backslash support mentioned above is now released as part of Music v1.2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants