OxygenCobalt / Auxio

A simple, rational music player for android
GNU General Public License v3.0
1.82k stars 120 forks source link

Support M3U paths starting with /storage/ #693

Closed paradoxical95 closed 1 week ago

paradoxical95 commented 4 months ago

Describe the Bug/Crash

I have over a 1000 songs and currently use BlackPlayer. Exported all my playlists from it. Tried importing those and it says "Unable to import playlist" Is there some backwards compatibility that you need to add or is BlackPlayer messing around in the m3u file? I'd love to daily drive Auxio but I cannot without my playlists.

Describe the intended behavior

Should simply import playlist from the exported M3U file.

What android version do you use?

Android 11

What device model do you use?

RealMe Narzo 50A (Android 11)

Bug report

-

Duplicates

OxygenCobalt commented 4 months ago

Can I have a sample playlist file? @paradoxical95

paradoxical95 commented 4 months ago

Yeah sure. Here you go. FewPlaylists.zip

OxygenCobalt commented 4 months ago

Okay, so Black Player just outputs the absolute android path (with /storage/emulated/0) with their M3U files. Auxio expects absolute paths that are at least relative to their volume, since it's somewhat difficult to work with volume info and it's not cross-compatible with PCs. Evidently I'll need to handle and support this.

Try seeing if Black Player supports exporting with relative M3U paths. Auxio should support those fine @paradoxical95.

paradoxical95 commented 4 months ago

I checked and currently BlackPlayer doesn't support relative paths. Can you tell me what I must edit manually? If I can edit those files so that I can make them usable in Auxio? And will you be pushing this in next update? 2Playlists.zip

Edit - I tried an app called "Music Speed Changer" which, for a change, found and exported my playlists in .m3u8 instead of .m3u but that also failed to load from Auxio. Attaching the Zip file above. Has one m3u and one m3u8

OxygenCobalt commented 4 months ago

That's weird. Relative paths are usually supported by most players.

You would need to edit the files and remove all instances of /storage/B8E5-FB87 or /storage/emulated/0 in the paths. Then Auxio should be able to understand it as an absolute path.

Currently, I cannot work on this fix since a sponsor has prioritized another feature. I will get to it as soon I am done with that.

m3u and m3u8 will not change anything. Those file extensions just signal what the character encoding is.

paradoxical95 commented 4 months ago

Okay. I see. No worries mate, take your time. The app is superb otherwise. By removing the instances of storage, you mean this right? I should edit all my playlist to look more like this right? (starting with /MusicMine/... as that's my Music Folder in my SD Card) image

OxygenCobalt commented 4 months ago

Yeah, that works.

paradoxical95 commented 4 months ago

Okay so I tried that and it didn't work. Attaching my fixed files. I removed the starting portion as I mentioned before and tried re-importing but it failed again. IDK how to fix this now. Playlists_Fixed.zip

OxygenCobalt commented 4 months ago

Are the playlists in the same folder as your sd card @paradoxical95? The absolute paths are still treated as relative to volume in Auxio.

paradoxical95 commented 4 months ago

Yep, that helped. I made a folder and moved it to the root of my SD card instead of Phone storage and it worked. ! Thanks

Just a suggestion @OxygenCobalt , after importing it asks me to Name the playlist, but instead I suggest it should name whatever the name of the .m3u file was and let the user rename it if need be? Is that possible?

OxygenCobalt commented 4 months ago

Just a suggestion @OxygenCobalt , after importing it asks me to Name the playlist, but instead I suggest it should name whatever the name of the .m3u file was and let the user rename it if need be? Is that possible?

Eh, I don't like the idea of using the M3U filename, it just looks strange.

chocmake commented 4 months ago

Eh, I don't like the idea of using the M3U filename, it just looks strange.

fwiw when I save M3U/M3U8 playlists I name the file like I would the playlist in-player (whether desktop or mobile), which means it's the desired title as-is (eg: Video Game OST Selections.m3u8). Perhaps you've encountered some kind of auto-generated playlist filenames leading to a negative association though and prefer normalizing their appearance by a prompt.

paradoxical95 commented 4 months ago

Eh, I don't like the idea of using the M3U filename, it just looks strange.

fwiw when I save M3U/M3U8 playlists I name the file like I would the playlist in-player (whether desktop or mobile), which means it's the desired title as-is (eg: Video Game OST Selections.m3u8). Perhaps you've encountered some kind of auto-generated playlist filenames leading to a negative association though and prefer normalizing their appearance by a prompt.

IKR? I do that too but then it became redundant to me. Like my playlist is named "EDMs". Why are you asking me to name it when it's literally named EDMs 🤣

OxygenCobalt commented 4 months ago

Okay. While I could autofill with the file name in the playlist name dialog, the issue is that I don't want someone to have to search for a playlist (possibly within a big list) just to rename it. There's a lot of friction in that process compared to always asking to rename the playlist first.

KraXen72 commented 4 months ago

You could have the playlist filename as a placeholder text, and if the name field is submitted empty, it uses the placeholder, otherwise, it uses the value

OxygenCobalt commented 1 week ago

Fixed this. Assuming your phone allows me to access the volumes, it should let me interpret these M3U files correctly.