OpenViX / HRTunerProxy

Setup Enigma2 to act as HR-Tuner Proxy
GNU General Public License v2.0
76 stars 26 forks source link

Unable to configure interface device name #50

Open sronsiek opened 3 years ago

sronsiek commented 3 years ago

Hi - just trying out this great looking plugin on dm8000 for use with emby.

My dm is setup for use on a vlan, and while eth0 is the physical device, it's IP is set up on vlan device eth0.2

root@dm8: # ifconfig
eth0      Link encap:Ethernet  HWaddr 00:09:34:1C:88:D7  
          inet6 addr: fe80::209:34ff:fe1c:88d7/64 Scope:Link
          ...

eth0.2    Link encap:Ethernet  HWaddr 00:09:34:1C:88:D7  
          inet addr:192.168.43.8  Bcast:192.168.43.255  Mask:255.255.255.0
         ...

This is not inspected by HRTunerProxy, resulting in the plugin not finding the boxes IP because the inspected interface names are hard-coded:

plugin/__init__.py

 def getIfInfo():
  for port in ('eth0', 'eth1', 'wlan0', 'wlan1', 'wlan2', 'wlan3', 'ra0'):
    ifinfo = getIfConfig(port)
    if 'addr' in ifinfo:
      return ifinfo
  return None

def getIP():
  IP = '0.0.0.0'
  ifinfo = getIfInfo()
  if ifinfo:
    IP = ifinfo['addr']
  return '%s' % IP

I have not found a means of configuring additional interface - can this be done?

Is is possible to install the src package and modify the code on the dm8 for dynamic re-compile?

Huevos commented 3 years ago

Is is possible to install the src package and modify the code on the dm8 for dynamic re-compile?

Just ftp the updated *.py file to your receiver and reboot.