bebo-dot-dev / m3u-epg-editor

a python m3u / epg optimizer
120 stars 27 forks source link

Update m3u-epg-editor-py3.py #45

Closed LePresidente closed 4 years ago

LePresidente commented 4 years ago

is_gzipped was not set if the file was uncompressed which caused an exception.

LePresidente commented 4 years ago

sorry, this was my bad I tested only with links that were compressed.

aa23aa commented 4 years ago

Good

bebo-dot-dev commented 4 years ago

No problem, to be honest I think it would have worked without any issues if the change that you had introduced looked closer to the original code i.e. this change:

is_gzipped = args.epgurl.lower().endswith(".gz") or epg_response.headers['Content-Type'] == "application/x-gzip"

Personally I'd say that the code would look slightly more elegant if it looked like that. What do you say to making the code look like that?

bebo-dot-dev commented 4 years ago

Fixed in this repo: https://github.com/jjssoftware/m3u-epg-editor/commit/7ed808f01b98f64278ab5679c576da8bc6b430f7 Closing this PR Thanks