pawanpaudel93 / m3u-parser

A parser for m3u files. It parses the contents of the m3u file to a list of streams information which can be saved as a JSON/CSV/M3U file.
MIT License
33 stars 16 forks source link

Write the parsed list to M3U format #7

Closed dineiar closed 3 years ago

dineiar commented 3 years ago

The package currently does not provide a way to write parsed entries back to m3u format, am I right?

I think it would be nice to have the option to save streams_info in m3u format after applying some filters to the parsed list. Currently, to_file function only offers the option to save as json or csv format.

pawanpaudel93 commented 3 years ago

@dineiar Yes the package only supports parsed m3u to CSV and JSON and not back to m3u format currently. Yes, that's a great idea to put the parsed m3u back to its original format. Thanks for your suggestion.

dineiar commented 3 years ago

Great. I'll try to provide a PR in the next few days with this.

pawanpaudel93 commented 3 years ago

@dineiar I have added support for saving back to m3u format.. Please check and give feedback...

dineiar commented 3 years ago

Hey @pawanpaudel93, thanks for the quick answer. It works! However, I'm working with somewhat big M3U files and generating them was taking some tome. I tried to improve your code in the PR #11, please check it out.

pawanpaudel93 commented 3 years ago

@dineiar Thanks for your PR #11.