|
Post by Avak on Oct 7, 2014 5:06:14 GMT -5
Hi, I keep my GMMP music collection synced with my computer and with other devices and I'm trying to find a way to keep playlists synced as well. I changed the playlist path to the music folder, however, GMMP is writing the absolute local pathname instead of the relative local pathname i.e.
/storage/sdcard1/Music/Gil Scott-Heron/I'm New Here/02 Me and the Devil.mp3
instead of Gil Scott-Heron/I'm New Here/02 Me and the Devil.mp3
or ../Gil Scott-Heron/I'm New Here/02 Me and the Devil.mp3 (for playlists kept in a separate folder).
Of course, this could be edited by an external script, but it should be a pretty quick fix to add the option to write relative local pathnames to GMMP.
Will GMMP correctly interpret the relative pathnames?
Cheers, Avak
|
|
|
Post by GoneMAD on Oct 7, 2014 10:40:44 GMT -5
GMMP writes full path because it is the most efficient when loading a playlist.
But yes GMMP can read relative paths fine and actually does some fairly complex logic when trying to load a file from a playlist so even if the paths are incorrect there is still a high probability it will be able to find the file
If in the example above with /storage/sdcard1/Music/Gil Scott-Heron/I'm New Here/02 Me and the Devil.mp3 , if that location does not exist, gmmp will actually try to find it the paths set in the scanner. Lets say the scanner is set to /storage/sdcard0/Music instead of sdcard1 on the new device. The following filenames will get tried until it finds one that exists
/storage/sdcard1/Music/Gil Scott-Heron/I'm New Here/02 Me and the Devil.mp3 /storage/gmmp/playlists/storage/sdcard1/Music/Gil Scott-Heron/I'm New Here/02 Me and the Devil.mp3 (this is trying it as a relative path to the location of the playlist file) /storage/sdcard0/Music/02 Me and the Devil.mp3 /storage/sdcard0/Music/I'm New Here/02 Me and the Devil.mp3 /storage/sdcard0/Music/Gil Scott-Heron/I'm New Here/02 Me and the Devil.mp3
So if your folder structure is comparable to the old device.. it'll most likely find it. This process is slow however, but viewing a playlist and resaving it will re-save the playlist with the full path again on the new device
|
|
|
Post by Avak on Oct 8, 2014 9:51:56 GMT -5
Thanks for the detailed answer! So playlists will definitely sync from my computer to GMMP on my phone, but I don't think my computer's music player works with similar logic. So playlists created on my phone won't sync back to the computer without a script to replace local pathnames. That's why I suggested the additional option to save the path locally, but I may be one of only a few trying to sync back to my computer...
Cheers
|
|
|
Post by GoneMAD on Oct 8, 2014 12:45:20 GMT -5
Thanks for the detailed answer! So playlists will definitely sync from my computer to GMMP on my phone, but I don't think my computer's music player works with similar logic. So playlists created on my phone won't sync back to the computer without a script to replace local pathnames. That's why I suggested the additional option to save the path locally, but I may be one of only a few trying to sync back to my computer... Cheers i can add an export playlists option or something like that to the request list
|
|
|
Post by Avak on Oct 8, 2014 13:41:14 GMT -5
Thanks - much appreciated!
|
|
|
Post by codellini on Jul 18, 2023 23:17:32 GMT -5
+1 for this request. I don't see it on the trello board, but I really like the idea of an option to export M3U with relative file paths.
I primarily manage my audio collection with a desktop app. I'd love to be able to make occasional playlist additions on the go, but I can't sync them back to my PC because of the paths. I'm surprised more people don't have the same issue; do most GMMP users manage their collections solely on mobile devices?
|
|
|
Post by GoneMAD on Jul 19, 2023 18:08:44 GMT -5
|
|
|
Post by patrick on Aug 7, 2023 9:22:28 GMT -5
It's also not hard to search and replace the "sdcard/whatever/Music/" string and replace it with "./" to get the relative path.
Back in the days I created a short .exe who did this for me for every playlist in the playlist directory. You can also use the editor on Windows to search and replace that string. Also you can use tasker to automate this on Android.
Once replaced GMMP will work with the relative paths (and doesn't replace the existing relative paths). You however would have to rerun this if you add a new file.
|
|