Get FrndlyTV on Libreelec

  • I have yet to see a Kodi addon for FrndlyTV but meanwhile this is provided as-is .Please note in another forum the author of Frndlytv for Channels (the script used here) seems to demand that this script is for Channels (a paid PVR platform). The script will work this way despite his intention to break it's compatibility for other uses by using incomplete/incorrect m3u header. It appears that Simple IPTV client does not care about that header.

    It is also possible to use a PVR but if you are familiar with configuring them you know they can be problematic and a lot of work, or just downright quirky.

    FrndlyTV is a very low cost streaming TV service. https://frndlytv.com/ . They do offer a free week trial, so you can see how this works for you first.

    This will get you up and running to view live TV channels using the Simple IPTV addon with your FrndlyTV subscription. If you are more experienced you can modify the install for use with IPTVMerge. You can also use a single install to serve up the m3u list to multiple devices (not just Kodi)

    The first steps of the solution here are specific to Libbreelec, the rest would work on any platform with Python 3 and Python requests.

    This is one of the possible uses of python discussed in this thread here

    jim_p
    July 7, 2022 at 11:31 AM

    I did this on Libreelec Generic x86_64 and I can not speak to other platforms and how they may or may not vary. My guess is that this will work in all versions of Libreelec


    This step is Specific to Libreelec

    First step Installing python requests addon: (I can not confirm that this works as I already had this module installed)

    Log in to your Libreelec box over ssh.

    Enter or paste the following command

    Code
    kodi-send --action="InstallAddon(script.module.requests)"

    the following will appear on the Kodi screen and you must confirm installation there.


    This step is Specific to Libreelec

    Next, Create Python Wrapper:

    create a file

    /storage/.kodi/pythonwrapper.sh

    paste the following into that file

    Bash
    #!/bin/sh
    PYTHONPATH=
    for addon in /storage/.kodi/addons/*/lib /storage/.kodi/addons/*/libs /usr/lib/kodi/addons/*/lib; do
      [ -d "${addon}" ] && PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${addon}"
    done
    export PYTHONPATH
    exec /usr/bin/python "$@"

    (thanks to Jim_P for pythonwrapper script and the kodi python requests install above)

    Save the file then make it executable

    Code
    chmod+x /storage/.kodi/pythonwrapper.sh


    Next Install FrndlyTV for Channels python script:

    More info here:

    Frndly TV for Channels
    www.matthuisman.nz

    You can ignore the part of that page that talk about docker and channels

    Direct Link to file:

    https://github.com/matthuisman/frndlytv-for-channels/archive/refs/heads/master.zip

    Simply extract the contents of this file and put them in

    /storage/.kodi/frndlytv on the libreelec system

    This step is Specific to Libreelec (you will need to figure out how to make it start automatically if using something other than libreelec

    Create a New Autostart File

    /storage/.kodi/autostart.sh on the libreelec system

    and paste the following contents into it (you must modify the part for your account info; username and password)

    Bash
    #!/bin/sh
    /storage/.kodi/pythonwrapper.sh /storage/.kodi/frndlytv/app.py --PORT 8183 --USERNAME "[email protected]" --PASSWORD "YourPassword" >/dev/null 2>&1 &

    Reboot the system where you have installed the script.

    Install simple IPTV PVR client on Kodi system.

    Confirm script installation and that it is running:

    From a computer on the network or the browser on libreelec we will open http://ipaddress:8183 , where "ipaddress" is the IP address of the computer the script is installed on and should now be running. (you may need to use localhost or 127.0.0.1 in place of IP address when on the same machine that is running the script)

    If it is all working so far you should see links to the m3u and xml files you need to use in simple IPTV PVR client. Make a note of the addresses. This has changed in the days since this was posted. I think most people want the "no gracenote" links with both the m3u8 link and the xml link

    Configure the Simple IPTV client:

    Using the links on the page in previous step (this document is not intended to teach you how to configure that client)

    You should now have live TV available through the IPTV Simple client

    In the IPTV Simple client settings > Advanced tab:

    1) where is says "Use inputstream.adaptive...." check this box.

    2) in "User agent" set (without quotes):

    "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.84 Safari/537.36"

    or any other valid web browser user agent string

    REBOOT kodi system

    ENJOY!

    Edited 12 times, last by tekno (July 11, 2022 at 3:49 PM).

  • One small but important correction to the OP

    the correct path to the autostart file is

    /storage/.config/autostart.sh

    not

    /storage/.kodi/autostart.sh as indicated in OP

    There are also some other issues that may occur at startup and I have seen them in LE11.x and current version of this script as of this writing.

    1) That issue is that the IPTV Client may try to access the playlist at http://127.0.0.1:8183/playlist.m3u8 before the "FrndlyTV for Channels" web server script is actually ready

    2) There is no #EXTM3U header at the beginning of the file at http://127.0.0.1:8183/playlist.m3u8

    So on the Libreelec box with the aforementioned script running via ssh we can download the playlist using wget into the .kodi directory thereby creating a static version of this file as it does not change anyway, unless the IP of the machine changes. I therefore recommend a fixed IP address.

    Code
    cd /storage/.kodi
    wget http://127.0.0.1:8183/playlist.m3u8
    nano playlist.m3u8

    #EXTM3U

    at the very top of the file if the file does not start with

    Code
    #EXTM3U

    add if at the beginning of the file you see

    Code
    x-tvg-url="xxx","yyy","zzz"

    where xxx , yyy and zzz are Guide URLs.

    you may (or may not) have to remove these entries as well. I do believe they will work with IPTV merge and the guides will be picked up but they may get in the way of other software

    Lastly IPTV Simple Client needs to get pointed to the local playlist file

    Code
    /storage/.kodi/playlist.m3u8