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

[guide] convert to *.wpl playlist to sync with Windows Media Player #22

Open
cswrd opened this issue Apr 18, 2020 · 0 comments
Open

[guide] convert to *.wpl playlist to sync with Windows Media Player #22

cswrd opened this issue Apr 18, 2020 · 0 comments

Comments

@cswrd
Copy link

cswrd commented Apr 18, 2020

There're lots of playlist formats and file encodings and even more software to read them for playback. Resulting in issues like #8 and #15. After doing some research and tests, I'll describe here a very simple method to solve at least one of such scenarios: convert the m3u output from PPP to .wpl, that Windows Media Player can finally read (my previous approach to just convert to ANSI (#8) didn't work fully). I've tested 800 songs containing a lot of arbitrary characters in their file path. And oll of them worked: ä ' [ & - ! ) _ and so on. While it's a semi-automated description, the steps could be implemented in PPP by someone in probably no time.

3 steps are required, basically converting the m3u from PPP to an xml file. I do this with Notepad++ and the search and replace feature:

  1. replace 5 characters forbidden in xml
  2. enclose each line in a xml tag (add a prefix to each line, add a suffix to each line)
  3. add a static header and footer to the file

Steps in detail
1)
Replace the following 5 characters with these strings (like also described here):

< to &lt;
> to &gt;
& to &amp;
" to &qout;
' to &apos;

2)
Add to each line the prefix (notepad++ enable regex and search for ^ to get the begin of a line)

<media src="

Add to each line the suffix (notepad++ enable regex and search for $ to get the end of a line)

"/>

3)
Add to the beginning of the file

<?wpl version="1.0"?>
<smil>
    <body>
        <seq>

Add to the end of the file

	</seq>
    </body>
</smil>

Save as *.wpl.
done.

This should also work the opposite way around.

Would be nice to have someone implement this :)

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

1 participant