Hunter5000 / Twitch-Fox-Legacy

An addon for Mozilla Firefox that sets off an alarm when a followed Twitch.tv streamer goes online.
13 stars 5 forks source link

Add support Streamlink (replace livestreamer) #24

Open thejustsoul opened 7 years ago

thejustsoul commented 7 years ago

If possible add support Streamlink, this is a replacement for Livestreamer (it seems abandoned, long time no updates).

UPD: Streamlink-Portable

tl-pierre commented 7 years ago

I put the path of streamlink instead of livestreamer and it works (/usr/local/bin/streamlink for me on Mint 18.1). I think you can update the description of TwitchFox on the mozilla addons website !

thejustsoul commented 7 years ago

A small guide for those who want to make and use a portable Streamlink (v0.3.0+) with Twitch-Fox:

  1. Download installer from https://github.com/streamlink/streamlink/releases/download/0.3.0/streamlink-0.3.0.exe
  2. Unpack streamlink-0.3.0.exe, using 7-zip (as a regular archive) in the right folder
  3. Edit file bin\streamlink-script.py, replace the first line to #!Python\python, save
  4. Copy file $APPDATA\streamlink\streamlinkrc to Streamlink folder
  5. Edit file streamlinkrc, find and replace options:
    rtmpdump=rtmpdump\rtmpdump.exe
    ffmpeg-ffmpeg=ffmpeg\ffmpeg.exe
  6. Create in the Streamlink folder a batch file, ex.: streamlink.bat, with the code:
    @echo off
    setlocal
    set PATH="%~dp0bin"
    pushd "%~dp0"
    streamlink.exe --config "%~dp0streamlinkrc" %*
    popd
    exit /B
  7. In the settings Twitch-Fox, specify path to this batch as path for livestreamer
  8. Can remove folder $APPDATA and $PLUGINSDIR, they are not needed
  9. Done.

If you don't want to make portable Streamlink:

  1. Simply install the application (streamlink-0.3.0.exe)
  2. Specify full path to streamlink.exe, ex.: C:\Program Files (x86)\Streamlink\bin\streamlink.exe in the settings Twitch-Fox
  3. Done.

I hope it will be useful to someone.