[SCRIPT] sherpa.sh

This is the best place for community developers to publish their genius work. Your Apps enrich the QNAP Turbo NAS.
Post Reply
User avatar
dirkonline
Know my way around
Posts: 215
Joined: Mon Oct 18, 2010 4:08 pm

Re: [SCRIPT] sherpa

Post by dirkonline » Thu May 11, 2017 2:32 pm

Excellent. I will have a look at my config in /share/Download/nzbToMedia/autoProcessMedia.cfg and look at the sickrage setup (I assume ports etc) should be pretty straightforward

User avatar
OneCD
Ask me anything
Posts: 5844
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa

Post by OneCD » Thu May 11, 2017 4:02 pm

Yep, it's easy. There are a lot of comments in that file to help. :D

Correction: I've just returned to my NAS and checked - it should be the [SickBeard] section. ;)

production NAS: TS-569 Pro with Debian 9.8 'Stretch' (power on/off times are < 1 minute).
backup NAS: TS-559 Pro+ with QTS 4.2.6 #20181227

one.cd.only@gmail.com

Image Image Image Image

tazzi
Starting out
Posts: 13
Joined: Tue Aug 30, 2016 1:00 pm

Re: [SCRIPT] sherpa

Post by tazzi » Thu May 11, 2017 5:17 pm

OneCD wrote:Oh geez, not another fork... :DD

Can you bullet-point the differences for those of us (like me) who don't what what they are?

I haven't used Sickrage for over 2 years so have no idea what has changed. Sickgear history shows when/why it split from sickrage. All I can say is that there has never been an update to the master branch that broke anything for me. It just works as it should.

User avatar
OneCD
Ask me anything
Posts: 5844
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa

Post by OneCD » Fri May 12, 2017 2:47 am

tazzi wrote:All I can say is that there has never been an update to the master branch that broke anything for me. It just works as it should.

I can say the same about SickBeard and SickRage. :roll:

Anyway, thank you for your contribution.

production NAS: TS-569 Pro with Debian 9.8 'Stretch' (power on/off times are < 1 minute).
backup NAS: TS-559 Pro+ with QTS 4.2.6 #20181227

one.cd.only@gmail.com

Image Image Image Image

ThomDrei
New here
Posts: 2
Joined: Fri Mar 28, 2014 11:10 pm

Re: [SCRIPT] sherpa

Post by ThomDrei » Fri May 12, 2017 5:02 pm

The setup for the autoProcessMedia is quite simple. The only important thing is to set "fork = sickrage". Here's how I set it up, using usenet only and a separate category for anime. SickRage configured to handle anime separately, of course. :wink:

Code: Select all

[SickBeard]
    #### autoProcessing for TV Series
    #### tv - category that gets called for post-processing with SB
    [[tv]]
        enabled = 1
        host = localhost
        port = 7073
        username = ""
        password = ""
        ###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
        web_root = ""
        ssl = 0
        fork = sickrage
        delete_failed = 0
        # Enable/Disable linking for Torrents
        Torrent_NoLink = 0
        keep_archive = 1
        process_method = move
        # force processing of already processed content when running a manual scan.
        force = 1
        # tell SickRage/Medusa to delete all source files after processing.
        delete_on = 0
        # tell Medusa to ignore check for associated subtitle check when postponing release
        ignore_subs = 0
        extract = 1
        nzbExtractionBy = Downloader
        # Set this to minimum required size to consider a media file valid (in MB)
        minSize = 100
        # Enable/Disable deleting ignored files (samples and invalid media files)
        delete_ignored = 0
        ##### Enable if SickBeard is on a remote server for this category
        remote_path = 0
        ##### Set to path where download client places completed downloads locally for this category
        watch_dir = ""
        ##### Set the recursive directory permissions to the following (0 to disable)
        chmodDirectory = 0
    [[anime]]
        enabled = 1
        host = localhost
        port = 7073
        username = ""
        password = ""
        web_root = ""
        ssl = 0
        fork = sickrage
        delete_failed = 0
        Torrent_NoLink = 0
        keep_archive = 1
        process_method = move
        force = 1
        delete_on = 0
        ignore_subs = 0
        extract = 1
        nzbExtractionBy = Downloader
        minSize = 100
        delete_ignored = 0
        remote_path = 0
        watch_dir = ""
        chmodDirectory = 0

User avatar
dirkonline
Know my way around
Posts: 215
Joined: Mon Oct 18, 2010 4:08 pm

Re: [SCRIPT] sherpa

Post by dirkonline » Fri May 12, 2017 11:28 pm

Thanks! Well, this is awkward I should not fill this thread with it but... I cannot even get it to download anything, not finding episodes with my search provider that are right there where sickbeard just went and found it. Plus it claims that it cannot do a backlog due to lack of search provider for backlogs but that is configured :/ not happy

EDIT: nope possibly me being blind, the GUI is rather confusing I THINK it is working now, waiting to see if post-processing works :)

Oh and just wondering, there seems to be an update (seen in the Sickrage config page) how do I update to a new version?

EDIT 2: sooo I can just use the build in function? I mean it seems to have worked, magic!
Last edited by dirkonline on Fri May 12, 2017 11:39 pm, edited 1 time in total.

User avatar
OneCD
Ask me anything
Posts: 5844
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa

Post by OneCD » Sat May 13, 2017 2:58 am

ThomDrei wrote:The only important thing is to set "fork = sickrage".

Mine is set to 'auto' - works fine. ;)

production NAS: TS-569 Pro with Debian 9.8 'Stretch' (power on/off times are < 1 minute).
backup NAS: TS-559 Pro+ with QTS 4.2.6 #20181227

one.cd.only@gmail.com

Image Image Image Image

User avatar
OneCD
Ask me anything
Posts: 5844
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa

Post by OneCD » Sat May 13, 2017 3:02 am

dirkonline wrote:Oh and just wondering, there seems to be an update (seen in the Sickrage config page) how do I update to a new version?

EDIT 2: sooo I can just use the build in function? I mean it seems to have worked, magic!

It looks like SickRage is aware of the git binary, so my guess is it has the ability to update within the GUI (but I've not tried it that way). If this doesn't work, a restart at the CLI will execute a 'git pull' to update:

Code: Select all

/etc/init.d/SickRage.sh restart

production NAS: TS-569 Pro with Debian 9.8 'Stretch' (power on/off times are < 1 minute).
backup NAS: TS-559 Pro+ with QTS 4.2.6 #20181227

one.cd.only@gmail.com

Image Image Image Image

User avatar
dirkonline
Know my way around
Posts: 215
Joined: Mon Oct 18, 2010 4:08 pm

Re: [SCRIPT] sherpa

Post by dirkonline » Sat May 13, 2017 4:05 pm

Ah cheers, that makes sense. I do have trouble with some of the backlog searches not finding anything which is rather off as manual searches yield results though. That said, your script works like a charm so far and I am very happy, thank you for your hard work once again.

ThomDrei
New here
Posts: 2
Joined: Fri Mar 28, 2014 11:10 pm

Re: [SCRIPT] sherpa

Post by ThomDrei » Sun May 14, 2017 7:00 am

OneCD wrote:
ThomDrei wrote:The only important thing is to set "fork = sickrage".

Mine is set to 'auto' - works fine. ;)

Well, when mine was set to the default (was it "" or "auto"? I don't remember), I always got an error on failed downloads. Something like "SickBeard has no support for failed downloads" or something to that extent. So I googled a bit and someone said to set fork to sickrage. after which it successfully postprocessed failed downloads, as well. I think, this is just about reporting a failed download to the nzb site. A failed episode will still have the state "snatched", and SickRage still tries to download the same file over and over again, when I put it back to the "wanted" state or start a search, although it failed the first time. But this is for the SickRage forum and not for this script's thread, which by the way works like a charm, so thanks for that, OneCD! :D
If anyone can enlighten me on the failed download issue, though, feel free. PMs are welcome. ;) I'm only not using QSonarr (which I tried and liked a lot more) for the reason that it creates Kodi .nfo-files that are screwed up.

Nexonic
Starting out
Posts: 29
Joined: Fri Mar 23, 2012 9:25 am

Re: [SCRIPT] sherpa

Post by Nexonic » Sun May 14, 2017 8:27 am

Hi, is sherpa for the new QTS 4.3 x64 firmware?

User avatar
OneCD
Ask me anything
Posts: 5844
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa

Post by OneCD » Sun May 14, 2017 8:32 am

Yup! :D

production NAS: TS-569 Pro with Debian 9.8 'Stretch' (power on/off times are < 1 minute).
backup NAS: TS-559 Pro+ with QTS 4.2.6 #20181227

one.cd.only@gmail.com

Image Image Image Image

Nexonic
Starting out
Posts: 29
Joined: Fri Mar 23, 2012 9:25 am

Re: [SCRIPT] sherpa

Post by Nexonic » Sun May 14, 2017 8:39 am

Awesome! Thank you for this!

joedrew
New here
Posts: 2
Joined: Mon Dec 02, 2013 2:02 am

Re: [SCRIPT] sherpa

Post by joedrew » Mon May 15, 2017 10:13 am

Hm. Very strangely, sherpa seems to reset its PATH somehow to not include `/opt/bin` while downloading; this means that I can't use `pip` because it's not in the PATH.

Code: Select all

[ dbug ] (>>) <Init>
[ dbug ] (II) ====================================================================
[ dbug ] (**) SCRIPT:          started: Sun May 14 22:08:05 EDT 2017
[ dbug ] (**) SCRIPT:             file: sherpa.sh
[ dbug ] (**) SCRIPT:          version: 2017.05.14b
[ dbug ] (**) SCRIPT:      launched as: ./SABnzbdplus
[ dbug ] (**) SCRIPT:       target app: SABnzbdplus
[ dbug ] (II) --------------------------------------------------------------------
[ dbug ] (II) Markers: (**) detected, (II) information, (WW) warning, (EE) error,
[ dbug ] (II)          (--) done, (>>) function entry, (<<) function exit,
[ dbug ] (II)          (vv) variable name & value, ($1) positional argument value.
[ dbug ] (II) --------------------------------------------------------------------
[ dbug ] (**) NAS:               model: TS-469L
[ dbug ] (**) NAS:    firmware version: 4.3.3
[ dbug ] (**) NAS:      firmware build: 20170413
[ dbug ] (**) NAS:              kernel: 3.4.6 x86_64
[ dbug ] (**) NAS:           OS uptime: 11 days
[ dbug ] (**) NAS:         system load: 1 min=1.27, 5 min=1.22, 15 min=1.43
[ dbug ] (**) NAS:      default volume: /share/MD1_DATA
[ dbug ] (**) NAS:               $PATH: /opt/bin:/opt/sbin:/bin:/sbin:/usr/bin:/us
[ dbug ] (**) NAS:                /opt: /share/MD1_DATA/.qpkg/Entware-ng
[ dbug ] (**) NAS:     /share/Download: MD1_DATA/Download
[ dbug ] (II) --------------------------------------------------------------------
[ dbug ] (**) QPKG:     'QSabNZBdPlus': not installed
[ dbug ] (**) QPKG:       'Entware-ng': installed
[ dbug ] (**) QPKG:       'Entware-3x': not installed
[ dbug ] (II) found a suitable ARCH for Clinton's QPKG (x64)
[ dbug ] (II) found a suitable ARCH for Stephane's QPKG (x64)
[ dbug ] (**) QPKG:       'Entware-ng': installed
[ dbug ] (II) found a suitable Entware package (Entware-ng)
[ dbug ] (<<) <Init> [0]
[ dbug ] (>>) <PauseSabs>
[ dbug ] (**) QPKG:      'SABnzbdplus': installed
[ dbug ] (--) paused existing SABnzbd queue
[ dbug ] (<<) <PauseSabs> [0]
[ dbug ] (>>) <DownloadQPKGs>
[ dbug ] (**) QPKG:       'Entware-ng': installed
[ dbug ] (**) QPKG:   'Par2cmdline-MT': installed
[ dbug ] (>>) <DownloadQPKG>
[ dbug ] (II) existing QPKG checksum correct (SABnzbdplus_170131.qpkg)
[ dbug ] (<<) <DownloadQPKG> [0]
[ dbug ] (<<) <DownloadQPKGs> [0]
[ dbug ] (>>) <RemovePackageInstallers>
[ dbug ] (**) QPKG:          'Optware': not installed [250]
[ dbug ] (<<) <RemovePackageInstallers> [0]
[ dbug ] (>>) <InstallEntware>
[ dbug ] (**) QPKG:       'Entware-ng': installed
[ dbug ] (II) patch: do the "opt shuffle" - already done
[ dbug ] (<<) <InstallEntware> [0]
[ dbug ] (>>) <InstallOther>
[ dbug ] (**) QPKG:   'Par2cmdline-MT': installed
[ dbug ] (>>) <InstallFakeQPKGs>
[ dbug ] (**) QPKG:           'Python': installed
[ dbug ] (**) QPKG:              'git': installed
[ dbug ] (vv) fakeQPKG_python [false]
[ dbug ] (vv) fakebin_python [false]
[ dbug ] (vv) fakeQPKG_git [false]
[ dbug ] (vv) fakebin_git [false]
[ dbug ] (<<) <InstallFakeQPKGs> [0]
[ dbug ] (>>) <InstallIPKs>
[ dbug ] (>>) <UpdateEntware>
[ dbug ] (II) 'Entware' package list was updated less than 60 minutes ago
[ dbug ] (<<) <UpdateEntware> [0]
[ dbug ] (--) reloaded environment
[ proc ] downloading & installing IPKs (various) ...
[ done ] downloaded & installed IPKs (various)             
[ proc ] downloading & installing IPK (python-dev) ...
[ done ] downloaded & installed IPK (python-dev)             
[ dbug ] (<<) <InstallIPKs> [0]
[ dbug ] (>>) <InstallPIPs>
[ proc ] downloading & installing (pip modules) ...
./SABnzbdplus: line 579: pip: command not found
[ fail ] Download & install failed (pip modules) [127]   
[ fail ] Path: /bin:/sbin:/usr/bin:/usr/sbin:/usr/bin/X11:/usr/local/sbin:/usr/local/bin:/Apps/bin:/Apps/sbin:/usr/local/jre/bin
[ dbug ] (II) ====================================================================

result=[127]
[ dbug ] (II) ====================================================================
[ dbug ] (<<) <InstallPIPs> [17]
[ dbug ] (<<) <InstallOther> [17]
[ dbug ] (>>) <Cleanup>
[ dbug ] (**) QPKG:      'SABnzbdplus': installed
[ dbug ] (--) resumed existing SABnzbd queue
[ dbug ] (<<) <Cleanup> [17]
[ dbug ] (>>) <DisplayResult>
[ fail ] SABnzbdplus install failed! :S [17]
[ dbug ] (**) SCRIPT:         finished: Sun May 14 22:08:07 EDT 2017
[ dbug ] (**) SCRIPT:     elapsed time: 00h:00m:02s
[ dbug ] (II) ====================================================================
[ dbug ] (<<) <DisplayResult> [17]


I've got python installed from opkg, which is maybe tripping this up, though the python 2.7.12 qpkg is also installed because of reasons.

User avatar
OneCD
Ask me anything
Posts: 5844
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] Sherpa

Post by OneCD » Mon May 15, 2017 11:12 am

joedrew wrote:Hm. Very strangely, sherpa seems to reset its PATH somehow to not include `/opt/bin` while downloading; this means that I can't use `pip` because it's not in the PATH.

Ah, thanks for investigating this. From memory, Sherpa doesn't actually set the path - it relies on Entware to do this. Then re-sources the user environment from file. I'll have to check this out within the next day or so when I get a few free moments. ;)

In the meantime, if you don't mind upgrading to Entware-3x, you could try uninstalling Entware-ng and re-running Sherpa.

production NAS: TS-569 Pro with Debian 9.8 'Stretch' (power on/off times are < 1 minute).
backup NAS: TS-559 Pro+ with QTS 4.2.6 #20181227

one.cd.only@gmail.com

Image Image Image Image

Post Reply

Return to “Community Apps”