Add-on porting existing code into an add-on

  • Hi I was thinking about an add-on for Librelec to add RSS feeds Comparison of BitTorrent clients - Wikipedia to transmission I've set up a some RSS feeds for my mum and dad to push content to them video and audio e.g. recipes and Libravox audtio books taken from Archive Torrents : Free Audio : Download & Streaming : Internet Archive

    I have read the Transmission team do not want to include RSS in their project. Some folk in the Librelec community have suggested containers to add this kind of add-on, however on low end hardware such as the single board computers a native approach may have some merit. Additionally there is an misconception that all RSS feed using bittorrent are not legal. I have this script set up and working in a minimal ARM based distro (DietPi on Orange Pi One) I understand that all the code is Open source (GPL) GitHub - lupus78/feedtransmission: feedtransmission is a python script to read RSS/Atom feeds of torrents and add them to Transmission to download as are the 2 packages


    I've had a quick scan of the Wiki for developing script and video add ons (I think this would be the former) from a GUI standpoint a single page with the following setting would be fine

    Transmission settings (Optional would default to localhost no auth)
    IP of Transmission server, Port, Username, Password - These values if present would be passed as arguments to the feedtransmission script via a crontab entry

    Poll Frequency (Optional)
    Integer in the range 5-60 to allow poll interval in crontab to be set, defaults to 15minutes

    Delete Local Items file (Optional)
    The script logs items that have been processed in a local text file to prevent duplicate downloads. This button would delete the local file if present used for testing

    I realise some changes will be needed to port this to an add-on

    1) Include the the Python script and packages in the add-on. I think the script will just be part of the ZIP file that is the add-on though I'm unclear on how / if the packages can / should be included
    2) XML file for the GUI should be part of the ZIP I've read the setting examples on the getting started page of the Video add-on Wiki assume the same is true for a script add-on?
    3) The script logs processed RSS entries to a local text file need guidance on what I should use as the default directory for the add-on to store data. I understand there is an add-on local storage area

    Any guidance advice would be welcome. I've not written an add-on before but from what I've read to complete this work I will need to develop some Python scripts and add the items into an add-on

    Specific questions

    1) From a licensing standpoint if all the code contributed is GPL would that be Ok?
    2) What is the best practice to add / edit crontab from Python in a Libreelect Environment?
    3) What is the best practice to delete add-on specific local files from Python in a Libreelect Environment?
    4) What is the best practice to include Python packages in an add-on in a Libreelect Environment?
    5) What is the best practice to support cross platform support in an add-on in a Libreelect Environment (e.g I'm developing on ARM so my file separator would be / etc)?
    6) Does this seem like a viable approach for an add-on to add this type of functionality: Librelelec script add-on or would a program or service add-on be better?