Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def create_playlist(playlist):
- gplaylist = "[playlist]n"
- playlist1 = json.loads(playlist)
- x = 1;
- for i in enumerate(playlist1):
- for j in enumerate(i[1]['folder']):
- gplaylist += "File" + str(x) + "=" + parse_file(j[1]['file']) + "n"
- # Variable: j[1]['title'] must converted to "x412x437x440x44bx432x430x44f"
- gplaylist += "Title" + str(x) + "=" + j[1]['title'] + "n"
- x += 1
- gplaylist += "NumberOfEntries=" + str(x-1)
- write_playlist(gplaylist)
- def write_playlist(playlist):
- with io.open('play_list.pls', 'w', encoding='utf-8') as outfile:
- outfile.write(to_unicode(playlist))
Add Comment
Please, Sign In to add comment