Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: swetoast/steamlink-launcher
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.0.6a
Choose a base ref
...
head repository: swetoast/steamlink-launcher
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 73 additions and 31 deletions.
  1. +36 −21 plugin.program.steamlink/addon.py
  2. +3 −3 plugin.program.steamlink/addon.xml
  3. +34 −7 readme.md
57 changes: 36 additions & 21 deletions plugin.program.steamlink/addon.py
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
__url__ = "https://github.com/swetoast/steamlink-launcher/"
__git_url__ = "https://github.com/swetoast/steamlink-launcher/"
__credits__ = "toast"
__version__ = "0.0.6a"
__version__ = "0.0.13"

dialog = xbmcgui.Dialog()
addon = xbmcaddon.Addon(id='plugin.program.steamlink')
@@ -31,37 +31,52 @@ def create_files():
outfile.close()
with open('/tmp/steamlink-watchdog.sh', 'w') as outfile:
outfile.write("""#!/bin/bash
# Shut down the graphical interface
systemctl stop mediacenter
check_pkgs_installed() {
output=$(dpkg --list $@ 2>&1)
}
req_packages="gnupg curl libgles2 libegl1 libgl1-mesa-dri"
# Restart hyperion service
if [ "$HYPERIONFIX" = 1 ]; then
if [ "$(pgrep hyperion)" ]; then
service hyperion stop
fi
sleep 8
if [ ! "$(pgrep hyperion)" ]; then
service hyperion start
fi
if ! check_pkgs_installed $req_packages; then
sudo apt update
for pkg in $req_packages; do
if ! check_pkgs_installed $pkg; then
kodi-send --action="Notification(Downloading and installing Steamlink dependencies ($pkg)... ,3000)"
sudo apt install $pkg -y
fi
done
fi
# Install and run Steam Link
if [ "$(which steamlink)" = "" ]; then
curl -o /tmp/steamlink.deb -#Of http://media.steampowered.com/steamlink/rpi/steamlink.deb
dpkg -i /tmp/steamlink.deb
kodi-send --action="Notification(Downloading and installing Steamlink Application... ,3000)"
curl -o /tmp/steamlink.deb -#Of http://media.steampowered.com/steamlink/rpi/latest/steamlink.deb
sudo dpkg -i /tmp/steamlink.deb
rm -f /tmp/steamlink.deb
fi
if [ $(/usr/bin/dpkg-query '-W' -f='${Status}' wakeonlan 2>/dev/null | /bin/grep -c "ok installed") -eq 1 ]; then
if [ -f "$HOME/.wakeup" ]; then
/usr/bin/wakeonlan $(cat "$HOME/.wakeup") # create a .wakeup with your MAC id in home folder to wake up your computer
fi
if [ -f "/home/osmc/.wakeup" ]; then
if ! check_pkgs_installed wakeonlan; then
sudo apt install wakeonlan -y;
fi
/usr/bin/wakeonlan "$(cat "/home/osmc/.wakeup")"
fi
sudo -u osmc steamlink
if [ -x "/home/osmc/steamlink/startup.sh" ]
then sudo -u osmc /home/osmc/steamlink/startup.sh
fi
# Restart the graphical interface
systemctl stop mediacenter
if [ "$(systemctl is-active hyperion.service)" = "active" ]; then systemctl restart hyperion; fi
sudo -u osmc steamlink
openvt -c 7 -s -f clear
if [ -x "/home/osmc/steamlink/shutdown.sh" ]
then sudo -u osmc /home/osmc/steamlink/shutdown.sh
fi
systemctl start mediacenter
""")
outfile.close()
6 changes: 3 additions & 3 deletions plugin.program.steamlink/addon.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.program.steamlink" name="Steamlink Launcher" version="0.0.6a" provider-name="Toast">
<addon id="plugin.program.steamlink" name="Steamlink Launcher" version="0.0.13" provider-name="Toast">
<requires>
<import addon="xbmc.python" version="2.25.0"/>
<import addon="xbmc.python" version="3.0.0"/>
</requires>
<extension point="xbmc.python.pluginsource" library="addon.py">
<provides>executable</provides>
@@ -18,7 +18,7 @@
<email></email> <!-- may be left blank -->
<source>https://github.com/swetoast/steamlink-launcher</source>
<news>
Updated with with wake on lan features
Kodi 19.x update and additional update for OSMC
</news>
<assets>
<icon>resources/icon.png</icon>
41 changes: 34 additions & 7 deletions readme.md
Original file line number Diff line number Diff line change
@@ -5,31 +5,58 @@
<a href="https://liberapay.com/Toast/donate"><img alt="Donate using Liberapay" align="right" align="top" src="https://liberapay.com/assets/widgets/donate.svg"></a>
# Steamlink Launcher for OSMC

This is a laucher only for Open Source Mediacenter (OSMC), the launcher installs two scripts that run and handles Steamlink remember this is all beta so report performance issues to Valve and launcher issues here, i will not handle performance issues at all will refer to Valve for that.
[Installation](#installation) | [Want to contribute](#want-to-contribute) | [Acknowledgement](#acknowledgement) | [Credits](#credits) | [Donator](#donator) | [Got issues](#got-issues) | [License](#license) | [Links](#links)



This launcher is exclusively designed for the Open Source Media Center (OSMC). It facilitates the installation of two scripts that operate and manage Steamlink. Please note that this is still in beta testing, so any performance-related issues should be reported directly to Valve. While I'm here to address issues related to the launcher, I won't be able to assist with performance problems - these should be directed to Valve.

## Installation

* log into ssh on your OSMC installation
* download the debian package and [install it](https://steamcommunity.com/app/353380/discussions/0/1743353164093954254)
* download the [zip](https://github.com/swetoast/steamlink-launcher/releases) of the launcher and install it via Kodi
1. Download the [zip](https://github.com/swetoast/steamlink-launcher/releases) file of the launcher and install it using Kodi.
2. The add-on will automatically install Steamlink. If wakeuponlan is installed, it is also supported. To use it, create a file in the home directory named `.wakeup` and add your MAC ID using the command `nano /home/osmc/.wakeup`.

NOTE: Please note that this add-on requires Kodi version 19 to be installed as it uses Python 3.

## Want to contribute


Make sure to lint your code so its proper then submit it via PR here on the tracker, All PR should be directed towards the development branch not the master branch
Make sure to lint your code so its proper then submit it via PR here on the tracker.

## Acknowledgement

© 2020 Valve Corporation. All rights reserved. Valve, Steam Link and Steam are trademarks and/or
© 2023 Valve Corporation. All rights reserved. Valve, Steam Link and Steam are trademarks and/or
registered trademarks of Valve Corporation in the US and other countries.

## Credits

Here is a full list of people that helped out on this project

* [Ludeeus](https://github.com/ludeeus) - code clean up
* [Slouken](https://github.com/slouken) - for adding lib replacement for OSMC
* [Valve/Slouken](https://github.com/swetoast/steamlink-launcher/commits?author=slouken) - for additional code donations and for adding lib replacement for OSMC
* [sgroen88](https://github.com/sgroen88) - adding shell execution to the script
* [ninfur](https://github.com/ninfur) - fixing the watchdog
* [Sam Crawley](https://github.com/sam-crawley) - watchdog rewrite

## Donator

Here is a list of people that donated to this project, super thankful for people donating.

* Moritz Goltdammer

## Got issues

* If you encounter a bug associated with the launcher, please submit an issue.
* If you experience problems related to OSMC, such as the Pi crashing or issues with overlays, initiate a discussion on the OSMC Forums.
* If Steamlink starts but you’re facing difficulties, seek support on the [Steam Forums](https://steamcommunity.com/app/353380/discussions/).
*
To minimize clutter on the issue tracker with OSMC-related issues, please remember that this launcher primarily initiates Steamlink and has minimal interaction with the operating system.
When reporting a bug, it's crucial to include logs. You can obtain these via the command line using `grab-logs -A`.
If you find that these fixes are outdated but everything is functioning correctly, please provide an update on the issue tracker.

### Known Workarounds:

* if you get a black stream from your Steam host, you need `dtoverlay=vc4-fkms-v3d,cma-512` instead of `dtoverlay=vc4-kms-v3d` in `config.txt` this workaround is for Raspberry Pi 4 (only)

## License