1
Вопросы / Questions / Re: Export playlist from PC, import to Android device
« on: April 15, 2020, 12:59:55 »
I don't know of a simple way to fix the playlists. Make a toy playlist of just a couple of songs on each device and export in m3u8 format. Youll see you need to change backslashes to forward slashes, replace the first part of a windows path with the first part of the android path, strip carriage return from windows end of line.
My very old structure on windows had a path U:/Music/iTunes/iTunes Media/Music/ (after swapping / for \). Sometimes I see the U:, sometimes not, so I handle both ways. The structure on a samsung device was /storage/0000-0000/Music/.
I cannot instruct in using unix shell commands but this is the sed command I use to do all the substitutions. Very intimidating if you are unfamiliar.
sed -e 's$\\$/$g' -e 's$U:/Music/iTunes/iTunes Media/Music/$/storage/0000-0000/Music/$' -e 's$/Music/iTunes/iTunes Media/Music/$/storage/0000-0000/Music/$' -e 's$\r$$' < "$f" > "sam-$f"
My very old structure on windows had a path U:/Music/iTunes/iTunes Media/Music/ (after swapping / for \). Sometimes I see the U:, sometimes not, so I handle both ways. The structure on a samsung device was /storage/0000-0000/Music/.
I cannot instruct in using unix shell commands but this is the sed command I use to do all the substitutions. Very intimidating if you are unfamiliar.
sed -e 's$\\$/$g' -e 's$U:/Music/iTunes/iTunes Media/Music/$/storage/0000-0000/Music/$' -e 's$/Music/iTunes/iTunes Media/Music/$/storage/0000-0000/Music/$' -e 's$\r$$' < "$f" > "sam-$f"