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

Allow user to set specific IP of hdhomerun unit #144

Open
wants to merge 3 commits into
base: Nexus
Choose a base branch
from

Conversation

fuzzard
Copy link
Contributor

@fuzzard fuzzard commented Dec 28, 2022

Im away from home and had a need to watch tv from my hdhomeruns located at home. Im connected via a vpn, so the "normal" discovery methods dont work. no broadcast searches, and the HTTP discovery API doesnt return anything as the WAN IP doesnt match the WAN ip of the actual hdhomerun units.

The libhdhomerun api makes it so we can quite easily provide a specific IP for the search to look at for a device (and all the associated tuner info).

All ive added is a setting to enter an address, we than supply that address to a search. This will only work for ipv4 addresses. Ive made no attempt at supporting ipv6 (who uses ipv6 on LANs?).
This also doesnt support multiple units, just a single one unlike the normal search methods. This might be something to add later, but i think this use case isnt going to be common, and realistically we should probably look at the multiple provider stuff in Kodi now for multiple tuners.

Tested functional on x86_64 macos running Nexus RC2

Copy link
Member

@phunkyfish phunkyfish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@phunkyfish phunkyfish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On second thought, as you can specify help text for settings now it might be wise in this case. It uses the same mechanism as label, just use help instead.

@fuzzard
Copy link
Contributor Author

fuzzard commented Dec 28, 2022

Have added help labels for the two discovery related options. Have also put them into their own group.

Added some other comments in the strings.po (usage of labels/category/etc) inline with what pvr.iptvsimple has had. It looked like it might be useful, although we only have a handful of settings in this addon.

My only other question is about the capability to restart an addon on setting change. Is there a setting xml attribute that will do this, or does it need to be handled in the addon code?
I see iptvsimple does an addon read in its process() function, but i think this might be a bit overkill for this addon, since it would be a set once (or rarely) and dont change type of setting, so not sure if polling continuously for settings changes is worth it. For now ive added a comment in the help label to say to restart the addon.
Let me know what you think is the best way to handle it.

fuzzard added 3 commits December 29, 2022 07:34
Add some help label and information about some strings for translators
Move discovery settings into their own specific group
@phunkyfish
Copy link
Member

How you have done it is correct.

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

Successfully merging this pull request may close these issues.

2 participants