diff --git a/addons/service/downloadmanager/FlexGet/changelog.txt b/addons/service/downloadmanager/FlexGet/changelog.txt new file mode 100644 index 000000000..386f744f0 --- /dev/null +++ b/addons/service/downloadmanager/FlexGet/changelog.txt @@ -0,0 +1,4 @@ +1.2.360 +- Initial version +1.2.503 +- Version bump to FlexGet 1.2.503 diff --git a/addons/service/downloadmanager/FlexGet/icon/icon.png b/addons/service/downloadmanager/FlexGet/icon/icon.png new file mode 100644 index 000000000..c05f58041 Binary files /dev/null and b/addons/service/downloadmanager/FlexGet/icon/icon.png differ diff --git a/addons/service/downloadmanager/FlexGet/package.mk b/addons/service/downloadmanager/FlexGet/package.mk new file mode 100644 index 000000000..99bc5e715 --- /dev/null +++ b/addons/service/downloadmanager/FlexGet/package.mk @@ -0,0 +1,46 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="FlexGet" +PKG_VERSION="1.2.503" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://flexget.com/" +PKG_URL="https://pypi.python.org/packages/source/F/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.gz" +# PKG_SOURCE_DIR="$PKG_NAME" +PKG_DEPENDS_TARGET="toolchain Python" +PKG_PRIORITY="optional" +PKG_SECTION="service/downloadmanager" +PKG_SHORTDESC="FlexGet is a program aimed to automate downloading or processing content (torrents, podcasts, etc.) from different sources like RSS-feeds, html-pages, various sites and more." +PKG_LONGDESC="FlexGet is a multipurpose automation tool for content like torrents, nzbs, podcasts, comics, series, movies, etc. It can use different kinds of sources like RSS-feeds, html pages, csv files, search engines and there are even plugins for sites that do not provide any kind of useful feeds." +PKG_IS_ADDON="yes" +PKG_ADDON_TYPE="xbmc.service" +PKG_AUTORECONF="no" +PKG_MAINTAINER="unofficial.addon.pro" + +addon() { + # set + # python -c "import sys; print(sys.path)" + mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/site-packages + wget -O get-pip.py https://bootstrap.pypa.io/get-pip.py + python get-pip.py -t $ADDON_BUILD/$PKG_ADDON_ID/site-packages FlexGet + python get-pip.py -t $ADDON_BUILD/$PKG_ADDON_ID/site-packages transmissionrpc +} diff --git a/addons/service/downloadmanager/FlexGet/source/bin/FlexGet.start b/addons/service/downloadmanager/FlexGet/source/bin/FlexGet.start new file mode 100644 index 000000000..446abd9c0 --- /dev/null +++ b/addons/service/downloadmanager/FlexGet/source/bin/FlexGet.start @@ -0,0 +1,39 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. /etc/profile + +oe_setup_addon service.downloadmanager.FlexGet + +if [ "$FLEXGET_PATH_CUSTOM_CONFIG" = "" ]; then + FLEXGET_PATH_CUSTOM_CONFIG="/storage/.config/flexget" +fi +mkdir -p $FLEXGET_PATH_CUSTOM_CONFIG + +# Addon settings +ADDON_DIR="$HOME/.kodi/addons/service.downloadmanager.FlexGet" +ADDON_HOME="$HOME/.kodi/userdata/addon_data/service.downloadmanager.FlexGet" + +export PYTHONPATH="$PYTHONPATH:$ADDON_DIR/site-packages/" + +python -c "import flexget; flexget.main()" -c $FLEXGET_PATH_CUSTOM_CONFIG/config.yml $* + diff --git a/addons/service/downloadmanager/FlexGet/source/default.py b/addons/service/downloadmanager/FlexGet/source/default.py new file mode 100644 index 000000000..426ff4a0f --- /dev/null +++ b/addons/service/downloadmanager/FlexGet/source/default.py @@ -0,0 +1,25 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ +#import xbmc, time, os, subprocess +#subprocess.Popen("FlexGet.service", shell=True, close_fds=True) +#import xbmcgui +#dialog = xbmcgui.Dialog() +#dialog.ok('', 'This is a console-only addon') + diff --git a/addons/service/downloadmanager/FlexGet/source/settings-default.xml b/addons/service/downloadmanager/FlexGet/source/settings-default.xml new file mode 100644 index 000000000..b1549a740 --- /dev/null +++ b/addons/service/downloadmanager/FlexGet/source/settings-default.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/addons/service/downloadmanager/FlexGet/source/system.d/service.downloadmanager.FlexGet.service b/addons/service/downloadmanager/FlexGet/source/system.d/service.downloadmanager.FlexGet.service new file mode 100644 index 000000000..85fcc40f9 --- /dev/null +++ b/addons/service/downloadmanager/FlexGet/source/system.d/service.downloadmanager.FlexGet.service @@ -0,0 +1,20 @@ +[Unit] +Description=FlexGet +After=graphical.target + +[Service] +Type=idle +ExecStart=/bin/sh -c "exec sh /storage/.kodi/addons/service.downloadmanager.FlexGet/bin/FlexGet.start daemon start" +ExecStop=/bin/sh -c "exec sh /storage/.kodi/addons/service.downloadmanager.FlexGet/bin/FlexGet.start daemon stop" +ExecReload=/bin/sh -c "exec sh /storage/.kodi/addons/service.downloadmanager.FlexGet/bin/FlexGet.start daemon reload" +TimeoutStopSec=5 +Restart=always +RestartSec=10 +StartLimitInterval=0 +Nice=19 +CPUSchedulingPolicy=idle +Restart=on-failure + +[Install] +WantedBy=kodi.target +