Posts by tekno

    Well, I took a stab at modifying the wrapper script that is posted in this thread. Here is what I tried:

    New file named testwrapper.sh

    Bash
    #!/bin/sh
    PYTHONPATH=
    for addon in /usr/lib/python*/site-packages/Crypto /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 "$@"

    I confirmed that does seem to be the location of cryptography but maybe it needs to point to a specific subdirectory or file in that directory or maybe my "stab" was all wrong?

    This is what I get

    This would be really cool as cabernet (https://cabernetwork.github.io/) allows one to merge M3u lists and xml files by way of a web GUI and has some built in sources like xumo and pluto. Also it could probably work with the ffmpeg addon (as I recall there is one???) to proxy problematic sources. Not just useful for simple IPTV client but any PVR back-end.

    It could easily be installed into the addons folder and run from there I would think.

    As I recall there is (or was) an addon that among other things could run a script at starup but not finding it in current list of addons, so would have to start in autostart.sh . It would literally need nothing else other than cryptograpy and the existing GUI could serve as the interface.

    I suspect that one of the addons I have installed is a cryptography module , but not sure. Maybe this one?

    script.module.cryptolib

    ~/.kodi/addons/script.module.cryptolib # ls -l

    total 28

    -rw-r--r-- 1 root root 1076 Nov 18 2019 LICENSE

    -rw-r--r-- 1 root root 316 Nov 18 2019 README.md

    -rw-r--r-- 1 root root 571 Nov 18 2019 addon.xml

    -rw-r--r-- 1 root root 136 Nov 18 2019 changelog.txt

    -rw-r--r-- 1 root root 7237 Nov 18 2019 icon.png

    drwxr-xr-x 6 root root 4096 Nov 18 2019 lib

    ~/.kodi/addons/script.module.cryptolib/lib # ls -l

    total 44

    drwxr-xr-x 7 root root 4096 Feb 15 2020 Crypto

    -rw-r--r-- 1 root root 2648 Nov 18 2019 binascii_plus.py

    drwxr-xr-x 8 root root 4096 Feb 15 2020 cryptopy

    drwxr-xr-x 2 root root 4096 Nov 18 2019 fmath

    -rw-r--r-- 1 root root 24483 Nov 18 2019 pyblowfish.py

    drwxr-xr-x 2 root root 4096 Nov 18 2019 rsa

    and they go on from there...

    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!

    Ok so here is what I did and this worked!

    I copied the "wrapper" script above.

    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 "$@"

    Saved it as pythonwrapper.sh then made it executable

    from the directory where the pythonwrapper.sh file is...

    Code
    chmod +x pythonwrapper.sh

    then I executed

    Code
    ./pythonwrapper.sh .kodi/frndlytv/myscript.py --PORT 8080 --PARAMETER1 "ABC" --PARAMETER2 "XYZ"


    and it worked!

    Nothing happens when i use that command at ssh terminal, but I already have requests installed.

    I can confirm it is an installed dependency for some addons I have installed. I do not see a way to install it directly.

    In fact, searching for addon called "requests" causes Kodi to crash, but searching for other addons does not. I think that is a bug.

    Code
     python3 myscript.py
    Traceback (most recent call last):
      File "myscript.py", line 4, in <module>
        import requests
    ModuleNotFoundError: No module named 'requests'

    I know this is an old thread but it does refer to Libreelec 10 which I am running and the exact module I need python "requests". Can anyone help me to understand how to make this python wrapper work?

    Is the "tqdm" a dependency for requests?

    Thanks

    Yea, well i'm somewhat lost there .

    So I assume the implication there is that there will be no fix for Libreelec 10 for this even though it is the current stable version?

    Is there an older version that I can more easily install?

    Why is it in a repo if it is broken?

    I have Libreelec 10.0.2 generic x86_64 running on a mini PC .

    I installed ffmpeg tools and when I try to run ffmpeg I get

    Code
    ffmpeg: error while loading shared libraries: libx265.so.199: cannot open shared object file: No such file or directory

    I read in these forusm somewhere that I should install Emby server , but that does not solve the problem

    Additional info:

    Code
    # which ffmpeg
    /storage/.kodi/addons/tools.ffmpeg-tools/bin/ffmpeg

    Any ideas?

    I recently started working to change out my remotes and working to get consistent behavior between a couple of systems one on Windows and one on Libreelec both with the same HP MCE Remote . I switched to the MCE only remote and away from the Libreelec multi remote as seen here Infra-Red Remotes - LibreELEC.wiki I Did this to minimize the possibility of remote interference that I have seen a little of lately on other devices.

    Using the Remote Keymap editor addon, I set the Info button up for "global context menu". This was one of several changes I made using that addon. The gen.xml is :

    Code
    <keymap><global><keyboard><key id="power">activatewindow(shutdownmenu)</key><key id="247">showvideomenu</key><key id="37">fullscreen</key><key id="49">activatewindow(videos,tvshows )</key><key id="power">activatewindow(shutdownmenu)</key><key id="195">activatewindow(contextmenu)</key></keyboard></global><fullscreenlivetv><keyboard><key id="192">fullscreen</key><key id="247">showvideomenu</key></keyboard></fullscreenlivetv><fullscreenvideo><keyboard><key id="192">fullscreen</key><key id="247">showvideomenu</key></keyboard></fullscreenvideo></keymap>

    So here is what happens after using this keymap on MCE remote.

    I go to look at a context menu using remote and I see the first image, where you see an oversized context menu. Image one.

    At first I thought I did something wrong but read on.

    Interesting that I can load any context menu from the keyboard with the "c" key and it is normal. Image two

    Once I have loaded the context menu using the keyboard the context menu window then appears the correct size as seen in image three.

    I know my xml file may not be perfect it was under construction but now I do not have a solution. Odd how with my old xbox 360 remote and my custom remote config I never got this though on the same software install, same system.

    Chewitt,

    You know this is funny I look back at this years later and I see you claimed I was "whining" , which I still do not see. Not everyone learns the same way, so even though you might understand the wiki, does not mean it is clear to all. Every time I see this post I look again for the "whining" , which I still do not see.

    Since when is stating that something was not found as useful, or comparing or asking for some help whining? I think some moderators here have attitudes sometimes that they take out on posters.

    Maybe YOU ( yes I learned that from YOU) are the whiner? So it seems when you whine about what people post, it seems you claim they are "whining". When in reality the whining stated with YOU!

    I have seen other posts where you make those kinds of gruff or negative statements and maybe you are the one that needs to re-think what you post. Truth is in your posts all over this board. Are you never embarrassed looking back at some of these off the wall accusations?

    If you do not like someone's post for whatever reason then simply do not reply to it. There is no need to be insulting and condescending.

    Maybe you should work on being a little less judgmental. You are not God.

    Oh and go ahead ban me like you guys have to others who have made similar statements, it seems to be the norm. If you ban me it will serve to tell me you got the message.

    Tekno

    I was looking for "documentation" The "readme " is not provided when installing the back-end service.


    BTW the "username and password" i refer to is to get into the back-end. That should be obvious



    Thanks you despite the seemingly rude demeanor

    <<<UPDATE >>>>>

    That username and password seem to work till you click on a link and it just takes me back to login page

    Then connman tethering is not the solution you are seeking, because it shares the Ethernet connection behind NAT and has deiberately has zero config options beyond SSID/Passphrase. If you want a proper bridge either learn how to create that at kernel level or buy a WiFi bridge device. I use some older Apple Airport Express devices for testing when I want to avoid the need for WiFi drivers; they are obsolete and thus rather cheap to find on eBay (the last one I grabbed was $12).

    I knew I could use older Airports for connecting a USB printer to a Wireless network , but I suppose I never considered if it would work as a bridge. I have seen them often at Goodwill. Is there a specific model you recommend? I know that some of them probably have 2.4 Ghz only wifi but for my purposes (ethernet printer) that's not an issue. I will be putting it right next to a WIfi connected Kodi box that has an unused ethernet port, such a shame that Libreelec can not truly bridge. Nobody wants a bunch of subnets on a home network.

    You would be amazed what you can get from Goodwill if you know what you are buying.

    I do not think you can do a real bridge on Libreelec at all. I have done them on other Linux distros , I think Ubuntu.

    The idea here however is to get the most out of what you already have. The issue with bridging on many systems come down to hardware and its ability to "bridge" effectively especially when DHCP is required. I know at least one bridge I made worked fine for everything except DHCP which did not bother me, since i was using Fixed IPs already.

    >>>>>>>Update

    Just bought this for my printer, it was cheap enough: https://www.ebay.com/itm/203968357700

    Problematic system: Mission One Running Librelec 10.0.2 x86-64 on Intel N2807 @1.58 Ghz, Mesa DRI Intel HD Graphics (BYT)

    For Comparison: Modded Asus CN60 Chromebox running Libreelec 10.0.2 x86-64 on Intel 2955 @ 1.4 Ghz, Mesa DRI intel HD Graphics (HSW GT1)

    This is only with "Problematic system" above. The "For Comparison" system above does not behave this way on the same display.

    I have a very Old 30" Sharp LCD (https://www.amazon.com/Sharp-LC-30HV4…y/dp/B00009NFEQ) display that was originally part of an "HD Ready" TV component system . It came with an analog tuner (https://www.amazon.com/Sharp-Lc-30hv4…m/dp/B00IH8FJB2), but did have component, VGA and DVI inputs on that tuner. When that SD tuner component recently died I connected Directly to what I believed was a DVI port by way of an HDMI to DVI adapter (and yes it was responding as a normal DVI connection giving me 1280x768 as the only available 16x9 resolution. There are a couple of 4x3 resolutions available as well but since it is a 16x9 display that is all that interests me).

    I had previously connected using the same HDMI to DVI adapter but to the tuner component. When the tuner was connected the TV via tuner claimed to support 1080i and 720P (at 720p these were [email protected] or 1280x720@60), and these were the resolutions offered by Kodi. When connected to the display with no tuner, getting [email protected] seemed odd. Maybe the old tuner just remapped the 1080i or 720p image to [email protected]? Who knows. I was even able to hack analog audio into the proprietary port making use of the incredible sound this unit always had. Downside , almost no adjustment of video or audio other than what Kodi offers but the image looks great, sound is awesome, and both are probably better than they were with tuner component.

    While using this set up, particularly on Live TV, I noticed that I was often getting a small black bar on top and bottom of the image. I tried many solutions to fix this and the one I came up with seems odd however works. That is why I call this a possible bug.

    I had to go to the display adjustment settings (I went while a video was playing so I could see full frame). and the square you adjust till square, I made it "not square" or 1.067 (tall and thin) ultimately. Doing the math (768/720=1.0666_ ), this is precisely the figure I came up with making the adjustment.

    Now I know there are variations on resolutions that are not exactly 1:1 pixel ratios, so it would seem that 1280x768 would be one of those. Perhaps I am mistaken., so I compared to my modded Asus Chromebox running the same Librelec version and no adjustment was necessary to avoid black bars on this unit. The same problem does not exist on the modded chromebox running the same Libreelec version

    Who knows if other resolutions are affected as well. The work-around is great and I see no negative side effects but it seems to be a bug with that particular integrated GPU or driver?

    Mark

    following the guide here for Samba mountiong in Libreelec:

    Mount Network Share - LibreELEC.wiki

    I created the file at /storage/.config/system.d/storage-recordings.mount as directed

    I have tried different Samba version numbers as described in the Samba docs too

    When I run "systemctl status storage-recordings.mount" , I see the error

    Code
    ● storage-recordings.mount - cifs mount script
    Loaded: bad-setting (Reason: Unit storage-recordings.mount has a bad unit file setting.)
    Active: inactive (dead)
    Where: /storage/.kodi/userdata/addon_data/script.module.zap2epg
    What: //10.0.0.250/xmltv

    I can mount that IP and share from Windows changing out the slashes for backslashes and the directory is also valid.

    Is it possible that the system is trying to mount the SMB share before /storage is mounted?

    Otherwise as the share is from a raspberry Pi I guess I might as well try NFS.


    _-----------------update-------------------------

    Just tried NFS and same error.