Created
October 7, 2017 02:29
-
-
Save galennare/58862f16e5c0ca4810d131c4d69bfd88 to your computer and use it in GitHub Desktop.
A script I made to parse files out of WMP playlists so I could move them into a new player.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
from shutil import copyfile | |
import os | |
fil = open("playlist.json") | |
jstring = json.loads(fil.read()) | |
medialist = jstring['media'] | |
os.mkdir("newplaylist") | |
for item in medialist: | |
try: | |
newfil = item['_src'] | |
except: | |
continue | |
print newfil | |
copyfile(newfil, 'newplaylist/' + newfil[newfil.rfind("\\"):]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Pardon the hardcoding, I did this late at night.