Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EPG downloaded as xml.gz #24

Closed
andekande opened this issue Jan 24, 2023 · 3 comments
Closed

EPG downloaded as xml.gz #24

andekande opened this issue Jan 24, 2023 · 3 comments
Labels

Comments

@andekande
Copy link

andekande commented Jan 24, 2023

My EPG source is https://m3u4u.com/
A request to https://m3u4u.com/epg/a1b2c3d4e5 replies with these HTTP Headers:

content-type: application/x-gzip
content-length: 1758815
content-disposition: attachment; filename=EPG-Guide-20230124172906.xml.gz; filename*=UTF-8''EPG-Guide-20230124172906.xml.gz

So there is no content-encoding but content-disposition.
I believe that compression detection is not yet covered for that case in downloader module:
https://github.com/efoxbr/megacubo/blob/master/www/nodejs-project/modules/download/download.js#L406
https://github.com/efoxbr/megacubo/blob/master/www/nodejs-project/modules/download/download.js#L634
Where it should detect 'gzip'.

The EPG module throws with BAD_FORMAT: https://github.com/efoxbr/megacubo/blob/master/www/nodejs-project/modules/epg/epg.js#L238

An easy fix would be to check for '.gz' filename not only in url but also content-disposition header here:
https://github.com/efoxbr/megacubo/blob/master/www/nodejs-project/modules/download/download.js#L412

@EdenwareApps
Copy link
Owner

EdenwareApps commented Jan 26, 2023

Hi @andekande, thanks for pointing out the bug. Could you test again with version 16.8.1 from the link below to confirm that this bug is resolved?

https://github.com/efoxbr/megacubo/releases/v16.8.1

Edit: The installers were updated just now.

@andekande
Copy link
Author

Thank you @efoxbr.
EPG loaded succesfully !!!
Also User-Agent is transmitted (see #23) !!!
Your works makes me super happy. 👍 👏 📺

@EdenwareApps
Copy link
Owner

EdenwareApps commented Jan 30, 2023

@andekande Thanks for confirming. Let me know if you notice any other problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants