[QPKG] sherpa mini-package-manager (CLI) beta

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
Easy as a breeze
Posts: 305
Joined: Mon Oct 18, 2010 4:08 pm

Re: [SCRIPT] sherpa

Post by dirkonline »

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
Guru
Posts: 12038
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa

Post by OneCD »

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. ;)

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

Re: [SCRIPT] sherpa

Post by tazzi »

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.
ThomDrei
New here
Posts: 2
Joined: Fri Mar 28, 2014 11:10 pm

Re: [SCRIPT] sherpa

Post by ThomDrei »

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
Easy as a breeze
Posts: 305
Joined: Mon Oct 18, 2010 4:08 pm

Re: [SCRIPT] sherpa

Post by dirkonline »

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
Guru
Posts: 12038
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa

Post by OneCD »

ThomDrei wrote:The only important thing is to set "fork = sickrage".
Mine is set to 'auto' - works fine. ;)

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
User avatar
OneCD
Guru
Posts: 12038
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa

Post by OneCD »

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

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
User avatar
dirkonline
Easy as a breeze
Posts: 305
Joined: Mon Oct 18, 2010 4:08 pm

Re: [SCRIPT] sherpa

Post by dirkonline »

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 »

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: 31
Joined: Fri Mar 23, 2012 9:25 am

Re: [SCRIPT] sherpa

Post by Nexonic »

Hi, is sherpa for the new QTS 4.3 x64 firmware?
User avatar
OneCD
Guru
Posts: 12038
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa

Post by OneCD »

Yup! :D

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

Re: [SCRIPT] sherpa

Post by Nexonic »

Awesome! Thank you for this!
joedrew
New here
Posts: 2
Joined: Mon Dec 02, 2013 2:02 am

Re: [SCRIPT] sherpa

Post by joedrew »

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
Guru
Posts: 12038
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] Sherpa

Post by OneCD »

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.

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
User avatar
dirkonline
Easy as a breeze
Posts: 305
Joined: Mon Oct 18, 2010 4:08 pm

Re: [SCRIPT] Sherpa

Post by dirkonline »

Gosh the fun never ends, Now I suddenly get this error during post processing even though it seemed to work fine this early morning

Code: Select all

Could not find platform independent libraries <prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Traceback (most recent call last):
  File "/share/CACHEDEV1_DATA/.qpkg/SABnzbdplus/Repository/lib/python/site.py", line 73, in <module>
    __boot()
  File "/share/CACHEDEV1_DATA/.qpkg/SABnzbdplus/Repository/lib/python/site.py", line 2, in __boot
    import sys, imp, os, os.path   
ImportError: No module named os
Is there a way to update / repair nzbtomedia ?
I am somehow sure this is the culprit here as it is set to perform post procssing. Although there was no category set for these downloads as they were manual

even more so...

Code: Select all

   
0:00
0 KB/s 
Queue 3.36 | 3.25 | 3.27 | V=380M R=65M   118.6 GB Free Space (Temp Folder)   4.2 TB Free Space
 Add NZB
History
Jimmy.Kimmel.2017.05.15.Ed.Helms.HDTV.x264-CROOKS	SickBeard: Successfully post-processed Jimmy.Kimmel.2017.05.15.Ed.Helms.HDTV.x264-CROOKS.nzb!	
16/05/2017 17:51	

Mommy.Dead.and.Dearest.2017.720p.HBO.WEB-DL.DD5.1.H.264-monkee	ImportError: No module named os	
16/05/2017 17:40	 
Search
  9.7 GB Today 168.0 GB This Month 385.1 GB Total
×
Jimmy.Kimmel.2017.05.15.Ed.Helms.HDTV.x264-CROOKS
[17:51:28] [INFO]::MAIN: Loading config from [/share/CACHEDEV1_DATA/Download/nzbToMedia/autoProcessMedia.cfg]
[17:51:28] [INFO]::MAIN: Checking database structure...
[17:51:28] [INFO]::MAIN: Checking if git needs an update
[17:51:28] [ERROR]::MAIN: Unable to determine installed version via git, please check your logs!
[17:51:28] [INFO]::MAIN: No update needed
[17:51:28] [INFO]::MAIN: nzbToMedia Version:11.03 Branch:master (Linux 3.10.20-al-2.5.3_sa)
[17:51:28] [INFO]::MAIN: #########################################################
[17:51:28] [INFO]::MAIN: ## ..::[nzbToMedia.pyc]::.. ##
[17:51:28] [INFO]::MAIN: #########################################################
[17:51:28] [INFO]::MAIN: Script triggered from SABnzbd
[17:51:30] [WARNING]::MAIN: Data from SABnzbd queue could not be parsed
[17:51:32] [WARNING]::MAIN: Data from SABnzbd history could not be parsed
[17:51:32] [INFO]::MAIN: Auto-detected SECTION:SickBeard
[17:51:32] [INFO]::MAIN: Calling SickBeard:tv to post-process:Jimmy.Kimmel.2017.05.15.Ed.Helms.HDTV.x264-CROOKS.nzb
[17:51:33] [INFO]::MAIN: SickBeard:tv fork set to sickrage
[17:51:33] [INFO]::MAIN: FLATTEN: Flattening directory: /share/Download/sabnzbd/complete/Jimmy.Kimmel.2017.05.15.Ed.Helms.HDTV.x264-CROOKS
/share/CACHEDEV1_DATA/.qpkg/SABnzbdplus/x31/bin-utils/ffprobe: error while loading shared libraries: libavdevice.so.54: cannot open shared object file: No such file or directory
/share/CACHEDEV1_DATA/.qpkg/SABnzbdplus/x31/bin-utils/ffprobe: error while loading shared libraries: libavdevice.so.54: cannot open shared object file: No such file or directory
[17:51:33] [ERROR]::TRANSCODER: Checking [/share/CACHEDEV1_DATA/Download/nzbToMedia/tests/test.mp4] has failed
[17:51:33] [INFO]::TRANSCODER: DISABLED: ffprobe failed to analyse test file. Stopping corruption check.
[17:51:33] [POSTPROCESS]::SICKBEARD: SUCCESS: The download succeeded, sending a post-process request
[17:51:36] [POSTPROCESS]::SICKBEARD: Processing in folder /share/CACHEDEV1_DATA/Download/sabnzbd/complete/Jimmy.Kimmel.2017.05.15.Ed.Helms.HDTV.x264-CROOKS
[17:51:36] [POSTPROCESS]::SICKBEARD: Processing /share/CACHEDEV1_DATA/Download/sabnzbd/complete/Jimmy.Kimmel.2017.05.15.Ed.Helms.HDTV.x264-CROOKS
[17:51:36] [POSTPROCESS]::SICKBEARD: Processing folder /share/CACHEDEV1_DATA/Download/sabnzbd/complete/Jimmy.Kimmel.2017.05.15.Ed.Helms.HDTV.x264-CROOKS
[17:51:36] [POSTPROCESS]::SICKBEARD: /share/CACHEDEV1_DATA/Download/sabnzbd/complete/Jimmy.Kimmel.2017.05.15.Ed.Helms.HDTV.x264-CROOKS : No processable items found in folder
[17:51:36] [POSTPROCESS]::SICKBEARD: Successfully processed
[17:51:36] [INFO]::CLEANDIRS: Directory /share/Download/sabnzbd/complete/Jimmy.Kimmel.2017.05.15.Ed.Helms.HDTV.x264-CROOKS still contains 1 unprocessed file(s), skipping ...
[17:51:36] [INFO]::MAIN: The /share/CACHEDEV1_DATA/Download/nzbToMedia/nzbToSickBeard.py script completed successfully.
SickBeard: Successfully post-processed Jimmy.Kimmel.2017.05.15.Ed.Helms.HDTV.x264-CROOKS.nzb!
Post Reply

Return to “Community Apps”