Add OSMC launcher & some small fixes#2
Conversation
| LD_PRELOAD="/usr/local/lib/libmoonlight-aml.so /usr/osmc/lib/libamavutils.so /usr/osmc/lib/libamadec.so /usr/osmc/lib/libamcodec.so" \ | ||
| moonlight stream \ | ||
| -platform aml \ | ||
| -app "$@" >> logfile 2>&1 |
There was a problem hiding this comment.
I based this on moonlight-stream/moonlight-embedded#573 (comment)
If I understand correctly, -platform aml forces the video to run with the Amlogic hardware
.
| # pipe launch script output to Kodi logger | ||
| # moonlight launcher output should be logged to a file to prevent chatty Kodi logs (see any launch.sh) | ||
| with launch_cmd.stdout: | ||
| for line in iter(launch_cmd.stdout.readline, b''): | ||
| self.logger.info(f'{line}') | ||
| with launch_cmd.stderr: | ||
| for line in iter(launch_cmd.stderr.readline, b''): | ||
| self.logger.error(f'{line}') |
There was a problem hiding this comment.
This helps me to debug things if the launch script fails.
| host = self.plugin.getSetting('host_addr') | ||
| moonlightOut = subprocess.check_output(['moonlight', 'list', host], cwd=binary_path, timeout=5, encoding='utf-8', start_new_session=True) |
There was a problem hiding this comment.
This adds the configured host address as argument to moonlight. Without it, Luna would err on my system.
There was a problem hiding this comment.
I think this is because I don't have any mDNS configured on my network. Is this something we need to take into account?
There was a problem hiding this comment.
Looking more closely, I think this is because the written config file is not read. Luna writes moonlight.conf to one of these paths:
/etc/moonlight.conf- The binary path that MLE is installed in (e.g.
/usr/local/bin/moonlight.conf) - If above aren't writable, it falls back to the addon path (e.g.
~/.kodi/addons/script.luna/moonlight.conf).
According to the docs, MLE only tries to read from the first one by default or from $XDG_CONFIG_HOME/moonlight/moonlight.conf.
So I think I need to change this to either pass the config path explicitly, or write the config file to $XDG_CONFIG_HOME/moonlight/moonlight.conf always. What do you think?
- Add platform-specific fixes to `osmc_vero` launcher
|
Does this fix Luna in corelec? |
I don't think Luna itself is the issue, but how outdated the (bundled) version of I'd fix it, but have no proper build environment. |
Hi @TheChoconut, I've been tinkering with Luna to get Moonlight working on a Vero V and I thought I'd share these changes. Let me know what you think.