dropping need for jsonpickle
This commit is contained in:
parent
cfe4182f0a
commit
ef464a1dbf
@ -944,7 +944,6 @@ if __name__ == "__main__":
|
|||||||
logger.info("Exporting the user's playlist(s)...")
|
logger.info("Exporting the user's playlist(s)...")
|
||||||
# Only import if exporting
|
# Only import if exporting
|
||||||
import json
|
import json
|
||||||
import jsonpickle
|
|
||||||
import csv
|
import csv
|
||||||
from flatten_json import flatten
|
from flatten_json import flatten
|
||||||
|
|
||||||
@ -965,8 +964,7 @@ if __name__ == "__main__":
|
|||||||
item_dict = export_min(item)
|
item_dict = export_min(item)
|
||||||
pl_dict['items'].append(item_dict)
|
pl_dict['items'].append(item_dict)
|
||||||
|
|
||||||
json_dump = jsonpickle.Pickler(unpicklable=False).flatten(obj=pl_dict)
|
title = pl.title
|
||||||
title = json_dump['title']
|
|
||||||
output_file = '{}-{}-Playlist.{}'.format(user, title, opts.export)
|
output_file = '{}-{}-Playlist.{}'.format(user, title, opts.export)
|
||||||
if opts.export == 'json':
|
if opts.export == 'json':
|
||||||
with open(output_file, 'w') as fp:
|
with open(output_file, 'w') as fp:
|
||||||
|
Loading…
Reference in New Issue
Block a user