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

Question about auto-reconnect #13

Closed
fa7ecc1f76 opened this issue Jan 13, 2020 · 11 comments
Closed

Question about auto-reconnect #13

fa7ecc1f76 opened this issue Jan 13, 2020 · 11 comments

Comments

@fa7ecc1f76
Copy link

Hi there,

did you do anything in regards to re-connection handling? I couldn't really find anything in the code.
I'm not sure if urllib.request does something in these regards. So if the stream disconnects for whatever reason, the recording should not stop before the recording duration set.

Best regards,
J

@beedaddy
Copy link
Owner

You're right, there's no reconnection handling in the code. I don't know if/when I have some time to check what could be done here...

@fa7ecc1f76
Copy link
Author

No worries, I just wanted to know. Still great to have. Maybe I find some time myself. Having a wrapper around mplayer currently, opening it via pty and checking if died before the recording is complete.

@fa7ecc1f76
Copy link
Author

I think using the urllib3 would be a good idea, urllib3 can automatically retry idempotent requests.
did a bit of searching and found this: https://dev.to/zenulabidin/python-http-at-lightspeed-part-2-urllib3-and-requests-476

@lastsamurai26
Copy link
Contributor

Do you fixed the Problem @fa7ecc1f76 ?
i have the same problem, but unfortunately I don't know how to fix it exactly.

@fa7ecc1f76
Copy link
Author

Hi @lastsamurai26 -

yes, but I didn't commit the changes here, kept it as a local private branch. Until I have time to raise a pull request here, I can send the changes I've made to you. I will get in touch this weekend latest.

@lastsamurai26
Copy link
Contributor

that would be excellent :-)

@fa7ecc1f76
Copy link
Author

This is it, you need to rename it to .py again of course. I recommend a diff with the current version and you'll see what I did.

radiorec.py.txt

@lastsamurai26
Copy link
Contributor

yes, I will do a diff patch. Thanks for the help :)

@fa7ecc1f76
Copy link
Author

@lastsamurai26 feel free to use the code and contribute it to this project or anywhere else. I don't really have time currently.

@lastsamurai26
Copy link
Contributor

:-) i've pulled your changes :)

@fa7ecc1f76
Copy link
Author

Cool. Feel free to take over from here.

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

No branches or pull requests

3 participants