M3U bulk import

I can't seem to make use of the bulk playlist import feature. I keep my files on a raspberry pi and use the sftp feature of astiga to reach them. The m3u files have the following structure for every song:

/mnt/MyPassport/Music/Music/Gin Blossoms/1992 - New Miserable Experience/1-02 Hey Jealousy.flac

/mnt/MyPassport/Music/Music/Weezer/1994 - Weezer/1-07 Say It Ain't So.flac

Every time I import them, a pop-up warns me that the files contain absolute paths and can't be parsed. How should the m3u file look for it to be parsed?

Comments

  • KoenKoen Member, Former

    Astiga checks whether the playlist file contains absolute paths, because most of the time, the root of the file system and root on Astiga are not the same, thus the absolute path on the filesystem does not correspond to the path when accessing it through Astiga. (e.g. your playlist contains references to C:\Users\Bob\Music\Never Gonna Give You Up.mp3, but on your cloud storage it is located on /bob/Music/Never Gonna Give You Up.mp3).

    Any relative path is accepted. So any path that uses the location of the other file based on its own location.

    For example: if you have a playlist file /a/b/c/playlist.m3u, and you want to add /a/b/c/file1.mp3 and /a/b/d/file2.mp3, then the paths would be file1.mp3 and ../d/file2.mp3. (.. is the standard way to describe "go up one directory"). /e/f/g/file3.mp3 could be added using ../../../e/f/g/file3.mp3.

    It considers something an absolute path when it starts with /, has : as second character, or contains ://.

    For my personal collection, I created a small script that converts m3u files in a folder (and subfolders) with absolute paths to relative paths. It can be found here, though be aware that it overwrites your original m3u files, so make a backup of them first: https://gist.github.com/Koenvh1/1e4793595e78724aba2b680c8bac37e4

  • Thanks for the helpful reply. I made it work.

  • Im not even sure where the playlist import feature is. can someone help me locate it?

  • KoenKoen Member, Former

    @geek4hire625 It can be found under Synchronise -> Bulk-import playlists (or https://play.asti.ga/import-playlists).

  • brissmithbrissmith Member
    edited August 2020

    The beta bulk playlist import finds my import files. Two of them. It shows two buttons next to them which I assume you press to import. This seems to have worked for the last on the list. But not the previous one found in the list which is in the same format. Seems to show an old playlist first then the second found list. It is almost as if playlest 1 exists therefore doesnt index on to playlist 2 and 3. Istead it just ignores new fiirst found playlist and applies new second found playlist to playlist 2 which should be a third list. Even if I add a third playlist to be found the actual lists after the process doesnt seem to change from the first added. Seems to be some code indexing erorr or a process I am unaware of. That was in windows annd android.

    In android the same thing happens but when clicking on the playlist nothing happens there is no music showing as in the windows version. Only after forcing offline the online did it update. This needs to be checked programatically. Hope this helps

    Post edited by brissmith on
  • As far as location goes you can follow Koen's link above but it is also available on the sync page as purple highlighted text. Like a hyper link.

    To the uninitiated like myself it might be better to look more button.😉

  • KoenKoen Member, Former

    Whenever you press the import button, it will import that playlist with the name in the textbox on the right. If a playlist already exists with that name, it will be overwritten. Though bear in mind that this will only work for m3u, m3u8 and pls playlists that contain relative paths.

    Anyhow, in your case @brissmith it had to do with the text encoding. The files were saved as Windows-1252, whereas UTF-8 was expected. This works fine for most standard characters, but for special characters (á, ø, ñ), the code point they use differs, thus it could not parse it properly (you may have seen it before where a character was replaced by �). It should now work correctly.

  • Thanks Koen worked well now. The perils with working with no standard playlist format. You are correct that the playlist was a crude conversion. It's a bit of VHS vs Beta or for the new gen mp3 vs WPL vs etc.etc

    It works perfectly now thank you very much. Haven't seen another player with this functionality.😃

  • Hello, I'm sorry I wanna do this thing to modify my m3u file but I don't know how to use Python

    Is it possible to have a step-by-step guide?

    Thanks

  • gravelldgravelld Administrator

    How many do you have? Send them to info@asti.ga and I can just run the conversion for you.

  • Hello,

    I'm currently making them, I'll have 15-18 files I think 😬

    Thank you very much, I'll send them to the address you gave me

    Thing is, each time I'll add a file to the playlist I'll have to make a new .m3u file, right?

  • gravelldgravelld Administrator
    edited August 2023

    No, you can edit the playlist in Astiga if it's only Astiga you want to update - https://www.reddit.com/r/Astiga/comments/14zk6vb/playlist_progress/

    (Apologies for the slow response 🙂 )

  • Okay thanks, will do that

    (no worries, I'm pretty slow myself 😉 will send you my files asap)

  • gravelldgravelld Administrator

    😆

Sign In or Register to comment.