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

[FEAT] tv_grab_url should follow redirects #258

Closed
1 task done
henrydatei opened this issue Jul 30, 2024 · 3 comments · Fixed by #259
Closed
1 task done

[FEAT] tv_grab_url should follow redirects #258

henrydatei opened this issue Jul 30, 2024 · 3 comments · Fixed by #259

Comments

@henrydatei
Copy link
Contributor

henrydatei commented Jul 30, 2024

Is this a new feature request?

  • I have searched the existing issues

Wanted change

I'm coming from XMLTV/xmltv#237, they suggested I should ask here.

TVHeadend gives the opportunity to grab XMLTV data with what they call "XMLTV: XMLTV URL grabber". Internally this just calls tv_grab_url, a script which uses curl to download XMLTV data from the URL which you provide to the "XMLTV: XMLTV URL grabber". I want to use https://xmltv.info/de/epg.xml as a provider. The problem is now, that this XMLTV provider generates a unique link for every request, so if you request https://xmltv.info/de/epg.xml you get a redirect to https://xmltv.info/de/epg.xml/e4aed9d33f528a05dd3fa1ed2f8b3ef3 and here you get the XMLTV data. After accessing this link is invalid. So for tv_grab_url to function with this provider it needs to follow redirects.

Reason for change

see above

Proposed code change

If you look in the script tv_grab_url code you find the line

curl -s "$URL"

but to follow redirects it should be

curl -sL "$URL"
Copy link

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

@henrydatei
Copy link
Contributor Author

I've asked in the xmltv repo the same question, they said this should be the right place (XMLTV/xmltv#237)

@aptalca
Copy link
Member

aptalca commented Aug 8, 2024

Thanks for the PR. The people who used to maintain this image are no longer using it (or are no longer part of the team) and I'm not too familiar with some of the ancillary functionality that was added here.

But this PR seems sensible.

@aptalca aptalca closed this as completed in 3ff1f50 Aug 8, 2024
aptalca added a commit that referenced this issue Aug 8, 2024
@LinuxServer-CI LinuxServer-CI moved this from Issues to Done in Issue & PR Tracker Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants