Wait 40 sec / Trying to fetch NZB from ........

SABnzbd makes Usenet as simple and streamlined as possible by automating everything we can. All you have to do is add an .nzb. SABnzbd takes over from there, where it will be automatically downloaded, verified, repaired, extracted and filed away with zero human interaction.

Moderator: Lillian.W@AST

User avatar
clinton.hall
Posts: 845
youtube meble na wymiar Warszawa
Joined: Thu May 09, 2013 7:01 pm
Location: New Zealand
Contact:

Re: Wait 40 sec / Trying to fetch NZB from ........

Post by clinton.hall »

Sorry about this... once upon a time I believe this did work.

Can you edit the WeighVersion function in /usr/local/AppCentral/sabznbd/CONTROL/start-stop.sh?

Code: Select all

WeighVersion() { #translates the version into a numerical "weight" that can be compared to see which version is newer
	local Version=$1
	local Vweight=0
	Location=$(expr index $Version 'RBA')
	let Locationm1=$Location-1 
	#Test for unstable release
	if [ $Location -gt 1 ]; then
		#Unstable release found, weigh accordingly
		Nversion=${Version:0:$Locationm1} #strip the unstable part off, keep the numerical version
		Vmajor=$(/bin/echo $Nversion | /usr/bin/cut -d. -f1)
		Vminor=$(/bin/echo $Nversion | /usr/bin/cut -d. -f2)
		Vfix=$(/bin/echo $Nversion | /usr/bin/cut -d. -f3)
		let Vweight=$Vmajor*1000000+$Vminor*10000+$Vfix*100
		case ${Version:$Locationm1:1} in
			R) #Release candidate
				let Minus=$Location+1
				let Vweight=$Vweight+80+${Version:$Minus}
			;;
			B) #Beta
				let Minus=$Location+3
				let Vweight=$Vweight+40+${Version:$Minus}

			;;
			A) #Alpha
				let Minus=$Location+4
				let Vweight=$Vweight+${Version:$Minus}
			;;
		esac
	else
		#must be stable release, so 
		Vmajor=$(/bin/echo $Version | /usr/bin/cut -d. -f1)
		Vminor=$(/bin/echo $Version | /usr/bin/cut -d. -f2)
		Vfix=$(/bin/echo $Version | /usr/bin/cut -d. -f3)
		let Vweight=99+$Vmajor*1000000+$Vminor*10000+$Vfix*100
	fi
	echo -n "$Vweight"
}
then try restarting SABnzbd and it should now update to 0.8.0Beta1
AS-604T
3 x ST4000DM0000 (Seagate 4TB) in Raid5
2 GB RAM expansion
AS-302T

Apps (user)
NZBGet - CouchPotato - SickBeard - Git - Python

Apps (maintainer):
NZBGet - BitTorrent Sync - Mylar - LazyLibrarian - Gamez
-Maintenance of Apps acquired from JohhnyFive since ADM2.0:
SABnzbd - CouchPotato - SickBeard - HeadPhones - Subsonic

About Me: http://fockwulf.wix.com/index
bostoneric
Posts: 45
Joined: Thu Aug 29, 2013 2:36 am

Re: Wait 40 sec / Trying to fetch NZB from ........

Post by bostoneric »

not really sure how to do that?
am i ssh and "vi" the file?


here is what is currently in my file.

Code: Select all

WeighVersion() { #translates the version into a numerical "weight" that can be compared to see which version is newer                                                  
        local Version=$1                                                                                                                                               
        local Vweight=0                                                                                                                                                
        Location=$(expr index $Version 'RBA')                                                                                                                          
        #Test for unstable release                                                                                                                                     
        if [ $Location -gt 1 ]; then                                                                                                                                   
                #Unstable release found, weigh accordingly                                                                                                             
                Nversion=${Version:0:$Location-1} #strip the unstable part off, keep the numerical version                                                             
                Vmajor=$(/bin/echo $Nversion | /usr/bin/cut -d. -f1)                                                                                                   
                Vminor=$(/bin/echo $Nversion | /usr/bin/cut -d. -f2)                                                                                                   
                Vfix=$(/bin/echo $Nversion | /usr/bin/cut -d. -f3)                                                                                                     
                let Vweight=$Vmajor*1000000+$Vminor*10000+$Vfix*100                                                                                                    
                case ${Version:$Location-1:1} in                                                                                                                       
                        R) #Release candidate                                                                                                                          
                                let Minus=${#Version}-$Location-1                                                                                                      
                                let Vweight=$Vweight+80+${Version:-$Minus}                                                                                             
                        ;;                                                                                                                                             
                        B) #Beta                                                                                                                                       
                                let Minus=${#Version}-$Location-3                                                                                                      
                                let Vweight=$Vweight+40+${Version:-$Minus}                                                                                             
                                                                                                                                                                       
                        ;;                                                                                                                                             
                        A) #Alpha                                                                                                                                      
                                let Minus=${#Version}-$Location-4                                                                                                      
                                let Vweight=$Vweight+${Version:-$Minus}                                                                                                
                        ;;                                                                                                                                             
                esac                                                                                                                                                   
        else                                                                                                                                                           
                #must be stable release, so                                                                                                                            
                Vmajor=$(/bin/echo $Version | /usr/bin/cut -d. -f1)                                                                                                    
                Vminor=$(/bin/echo $Version | /usr/bin/cut -d. -f2)                                                                                                    
                Vfix=$(/bin/echo $Version | /usr/bin/cut -d. -f3)                                                                                                      
                let Vweight=99+$Vmajor*1000000+$Vminor*10000+$Vfix*100                                                                                                 
        fi                                                                                                                                                             
        echo -n "$Vweight"                                                                                                                                             
}  
Sularco
Posts: 21
Joined: Sat Aug 30, 2014 4:40 pm

Re: Wait 40 sec / Trying to fetch NZB from ........

Post by Sularco »

bostoneric wrote:not really sure how to do that?
am i ssh and "vi" the file?


here is what is currently in my file.

Code: Select all

WeighVersion() { #translates the version into a numerical "weight" that can be compared to see which version is newer                                                  
        local Version=$1                                                                                                                                               
        local Vweight=0                                                                                                                                                
        Location=$(expr index $Version 'RBA')                                                                                                                          
        #Test for unstable release                                                                                                                                     
        if [ $Location -gt 1 ]; then                                                                                                                                   
                #Unstable release found, weigh accordingly                                                                                                             
                Nversion=${Version:0:$Location-1} #strip the unstable part off, keep the numerical version                                                             
                Vmajor=$(/bin/echo $Nversion | /usr/bin/cut -d. -f1)                                                                                                   
                Vminor=$(/bin/echo $Nversion | /usr/bin/cut -d. -f2)                                                                                                   
                Vfix=$(/bin/echo $Nversion | /usr/bin/cut -d. -f3)                                                                                                     
                let Vweight=$Vmajor*1000000+$Vminor*10000+$Vfix*100                                                                                                    
                case ${Version:$Location-1:1} in                                                                                                                       
                        R) #Release candidate                                                                                                                          
                                let Minus=${#Version}-$Location-1                                                                                                      
                                let Vweight=$Vweight+80+${Version:-$Minus}                                                                                             
                        ;;                                                                                                                                             
                        B) #Beta                                                                                                                                       
                                let Minus=${#Version}-$Location-3                                                                                                      
                                let Vweight=$Vweight+40+${Version:-$Minus}                                                                                             
                                                                                                                                                                       
                        ;;                                                                                                                                             
                        A) #Alpha                                                                                                                                      
                                let Minus=${#Version}-$Location-4                                                                                                      
                                let Vweight=$Vweight+${Version:-$Minus}                                                                                                
                        ;;                                                                                                                                             
                esac                                                                                                                                                   
        else                                                                                                                                                           
                #must be stable release, so                                                                                                                            
                Vmajor=$(/bin/echo $Version | /usr/bin/cut -d. -f1)                                                                                                    
                Vminor=$(/bin/echo $Version | /usr/bin/cut -d. -f2)                                                                                                    
                Vfix=$(/bin/echo $Version | /usr/bin/cut -d. -f3)                                                                                                      
                let Vweight=99+$Vmajor*1000000+$Vminor*10000+$Vfix*100                                                                                                 
        fi                                                                                                                                                             
        echo -n "$Vweight"                                                                                                                                             
}  
Hi Bostoneric,

If you install "Shell in a Box" from the appstore you can then access the NAS through a terminal window on your browser.

Im no expert so this is only a rough guide to editing the file, if there's anyone out there with more knowledge or spots a mistake please update the post.

1. Once the terminal window is open logon as root, password is the same as your admin password
2. Navigate your way to the file location, e.g. cd /usr/local/AppCentral/sabnzbdplus/CONTROL
3. Create a backup of the file you will be editing. e.g. cat start-stop.sh > start-stop.sh.old
4. Edit the file using "vi" e.g. vi start-stop.sh
5. Locate the WeightVersion section by using the arrow or page up / page down keys
6. To make changes in the file first press i and enter (this will initiate insert mode)
7. Make the changes to the required lines, in this case...
Insert line 5:- let Locationm1=$Location-1
Update line 9 from :- Nversion=${Version:0:$Location-1} #strip the unstable part off, keep the numerical version to Nversion=${Version:0:$Locationm1} #strip the unstable part off, keep the numerical version
Update line 14 from :- case ${Version:$Location-1:1} in to case ${Version:$Locationm1:1} in
Update line 16 from :- let Minus=${#Version}-$Location-1 to let Minus=$Location+1
Update line 17 from :- let Vweight=$Vweight+80+${Version:-$Minus} to let Vweight=$Vweight+80+${Version:$Minus}
Update line 20 from :- let Minus=${#Version}-$Location-3 to let Minus=$Location+3
Update line 21 from :- let Vweight=$Vweight+40+${Version:-$Minus} to let Vweight=$Vweight+40+${Version:$Minus}
Update line 24 from :- let Minus=${#Version}-$Location-4 to let Minus=$Location+4
Update line 25 from :- let Vweight=$Vweight+${Version:-$Minus} to let Vweight=$Vweight+${Version:$Minus}
8. Once you've finished the changes press the ESC key to end insert mode
9. To save the changes type :w and then enter
10. To exit type :q and enter
11. Exit the shell terminal
12. Restart Sabnzbd in the appcenter.

Don't forget to the add the tag file ALL_RELEASES in the log directory (listed earlier in this thread).

I think that should do it.
bostoneric
Posts: 45
Joined: Thu Aug 29, 2013 2:36 am

Re: Wait 40 sec / Trying to fetch NZB from ........

Post by bostoneric »

great that worked. it updated to v0.8.0Beta1.... but getting a new error now.

Code: Select all

URL Fetching failed; Server uses an untrusted HTTPS certificate
bostoneric
Posts: 45
Joined: Thu Aug 29, 2013 2:36 am

Re: Wait 40 sec / Trying to fetch NZB from ........

Post by bostoneric »

unchecked "enable_https_verification" under Special, Switches.
User avatar
clinton.hall
Posts: 845
Joined: Thu May 09, 2013 7:01 pm
Location: New Zealand
Contact:

Re: Wait 40 sec / Trying to fetch NZB from ........

Post by clinton.hall »

Fixed in latest version of App... should be available soon from App Central.

You can do manual install from here https://www.dropbox.com/s/970y35cyspn4x ... 07_any.apk
AS-604T
3 x ST4000DM0000 (Seagate 4TB) in Raid5
2 GB RAM expansion
AS-302T

Apps (user)
NZBGet - CouchPotato - SickBeard - Git - Python

Apps (maintainer):
NZBGet - BitTorrent Sync - Mylar - LazyLibrarian - Gamez
-Maintenance of Apps acquired from JohhnyFive since ADM2.0:
SABnzbd - CouchPotato - SickBeard - HeadPhones - Subsonic

About Me: http://fockwulf.wix.com/index
Sularco
Posts: 21
Joined: Sat Aug 30, 2014 4:40 pm

Re: Wait 40 sec / Trying to fetch NZB from ........

Post by Sularco »

clinton.hall wrote:Fixed in latest version of App... should be available soon from App Central.

You can do manual install from here https://www.dropbox.com/s/970y35cyspn4x ... 07_any.apk
Hi Clinton,

Just to let you know using this version on my 204T on ADM version 2.4.2.RIG1 doesn't work, I get the same 40 sec wait loop, reverted back to 0.8.0Beta1 and everything is working again.
User avatar
clinton.hall
Posts: 845
Joined: Thu May 09, 2013 7:01 pm
Location: New Zealand
Contact:

Re: Wait 40 sec / Trying to fetch NZB from ........

Post by clinton.hall »

I think you misunderstand what was fixed.
The latest app version fixed the update issue so that you could instal v0.8.0 beta using the "all releases" tag.

The "stable" version of SABnzbd still does not work with ssl, so you need to use the beta.
AS-604T
3 x ST4000DM0000 (Seagate 4TB) in Raid5
2 GB RAM expansion
AS-302T

Apps (user)
NZBGet - CouchPotato - SickBeard - Git - Python

Apps (maintainer):
NZBGet - BitTorrent Sync - Mylar - LazyLibrarian - Gamez
-Maintenance of Apps acquired from JohhnyFive since ADM2.0:
SABnzbd - CouchPotato - SickBeard - HeadPhones - Subsonic

About Me: http://fockwulf.wix.com/index
Post Reply

Return to “SABnzbdplus”