[APKG] NZBGet

NZBGet is a cross-platform binary newsgrabber for nzb files, written in C . It supports client/server mode, automatic par-check/-repair and web-interface. NZBGet requires low system resources and runs great on routers, NAS-devices and media players. Includes nzbToMedia postprocess scripts.

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: [APKG] NZBGet

Post by clinton.hall »

Fair call, and most of it not completely new.

Most of this was done following templates of existing Apps, and then more and more added. I haven't matched the removal; scripts to the install scripts... i.e more has been added to the install and I have not gone as far as to remove them.

The use of git was not to bypass the review process, but rather to allow for updating of binaries only without having to repackage and upload the apkg each time...

What i had started working on (but why I haven't put it into this app yet I don't know) was a quick check of all files in /usr/local/lib and /usr/local/bin to see if they are sym-links. if they are, then check if their target is in the App folder and this file exists exists, if not, then delete the link...
I may use that as a cleanup as i more to a new format.

One key reason that many apps are linked into /usr/local is that they are compiled into that location and have some hard-coded re-directs/look-ups in them. In the case of NZBGet, this is easily over-come by explicitly telling it where to find the config...

Your export path and ld_library_path idea is spot on... something that I have recently been considering doing, but just never got around to... So yes... I will try and update to this method soon.

The /usr/local/AppCentral permissions is something I added to 2 of my Apps to try and help a number of people who suddenly could not run any Apps at all! I believe this is not required in current firmware, and yes, 777 was too "loose" but given most people run these on their home network (not business) I just did what seemed to get their Apps running the quickest.
I will try and make these changes and get this out soon. The reason many of these things haven't been done already is simply a matter of trying to find the time... and therefore releasing a "working" app and not a "perfect" app :)

I do appreciate the feedback.
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
User avatar
clinton.hall
Posts: 845
Joined: Thu May 09, 2013 7:01 pm
Location: New Zealand
Contact:

Re: [APKG] NZBGet

Post by clinton.hall »

Oh yeah... worth mentioning...

I am not a programmer... I actually work in a very different industry and kind of fell into this as a hobby. So if I do something that isn't considered "correct" by all means let me know... I am learning as I go here.
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
User avatar
clinton.hall
Posts: 845
Joined: Thu May 09, 2013 7:01 pm
Location: New Zealand
Contact:

Re: [APKG] NZBGet

Post by clinton.hall »

@mafredri
Any chance you can look at the following and comment?
https://www.dropbox.com/s/67xjwmk3dd2u9 ... 17_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
User avatar
mafredri
Posts: 371
Joined: Sat Mar 22, 2014 8:41 am

Re: [APKG] NZBGet

Post by mafredri »

Thanks for taking the time to addressing my concerns! I appreciate your openness in the matter :). Ok, maybe I mislabelled your use of git-repositories, my point was just that doing quick releases on the App Central does not seem possible and your method looks like a good alternative.

I also appreciate where you're coming from. Crafting a perfect app is by no means easy and with the current ASUSTOR guidelines almost impossible. Also, many ASUSTOR apps take quite a few liberties when modifying the system, which in my opinion makes them bad templates for other apps. All we can do is try to figure out what makes sense. I'm also impressed with your contributions to the community, and coming from a non-programming background, even more so! Keep up the good work :)!
clinton.hall wrote:@mafredri
Any chance you can look at the following and comment?
https://www.dropbox.com/s/67xjwmk3dd2u9 ... 17_any.apk
Cool, I'll have a look at it in the evening!

Cheers,
Mathias
Hi, I'm new here. Looking to be active in the community and help with development :).
Storage: AS-604T with 3GB RAM (Kingston KVR1333D3S8S9/2G)
User avatar
clinton.hall
Posts: 845
Joined: Thu May 09, 2013 7:01 pm
Location: New Zealand
Contact:

Re: [APKG] NZBGet

Post by clinton.hall »

Just noticed that I'll need to add a migration to existing .conf for nzbget since the unarar and 7zr are no longer at /usr/local/bin... they are in the path, so just setting unrar and 7z in the config via web ui will work... but I like to make sure that upgrades go smooth. (for anyone installing this version, please change settings, unpack, UnrarCmd = unrar and SevenZipCmd = 7z)

I did keep /usr/local/bin/nzbet, /usr/local/etc/nzbget.conf and /usr/local/share/nzbget simple becasue these won't e shared with anything else, and there are some config issues that just make this easier for this App.

I have also changed the pre-uninstall to only remove symlinks that point to the nzbget App repository... this is really just to clean up after the previous installs.

Hopefully I'll find time tomorrow to add the config migration, and then I'll look to do similar for the other Apps that use /usr/local (e.g SABnzbd)... most of the Apps like SickBeard and CP shouldn't have these issues (the only thing done is to add a module into the python site packages by means of a symlink... I'm sure there is another way to do this...)
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
User avatar
mafredri
Posts: 371
Joined: Sat Mar 22, 2014 8:41 am

Re: [APKG] NZBGet

Post by mafredri »

clinton.hall wrote:Just noticed that I'll need to add a migration to existing .conf for nzbget since the unarar and 7zr are no longer at /usr/local/bin... they are in the path, so just setting unrar and 7z in the config via web ui will work... but I like to make sure that upgrades go smooth. (for anyone installing this version, please change settings, unpack, UnrarCmd = unrar and SevenZipCmd = 7z)

I did keep /usr/local/bin/nzbet, /usr/local/etc/nzbget.conf and /usr/local/share/nzbget simple becasue these won't e shared with anything else, and there are some config issues that just make this easier for this App.

I have also changed the pre-uninstall to only remove symlinks that point to the nzbget App repository... this is really just to clean up after the previous installs.

Hopefully I'll find time tomorrow to add the config migration, and then I'll look to do similar for the other Apps that use /usr/local (e.g SABnzbd)... most of the Apps like SickBeard and CP shouldn't have these issues (the only thing done is to add a module into the python site packages by means of a symlink... I'm sure there is another way to do this...)
Wow, great work! Sounds perfectly reasonable to me, and glad that you are considering the user experience also :).

In regards to python, I've utilised the python virtualenv to not need to install modules into the Python application. I did this with my first release of Deluge. However, I noticed a problem with moving files and the path name going bonkers. I did temporarily include my own version of Python with the app, but I've since traced the issue (my python had wide-unicode support, the ASUSTOR one did not) and will be reverting to the virtualenv structure. I'm going to be updating the Deluge app in the coming days, if you would like to examine it. Perhaps I could also write a tutorial on packaging Python applications.


Cheers,
Mathias
Hi, I'm new here. Looking to be active in the community and help with development :).
Storage: AS-604T with 3GB RAM (Kingston KVR1333D3S8S9/2G)
User avatar
clinton.hall
Posts: 845
Joined: Thu May 09, 2013 7:01 pm
Location: New Zealand
Contact:

Re: [APKG] NZBGet

Post by clinton.hall »

hey, tutorials always welcome :)

I maintain a python project (nzbToMedia) and do a bit of work on CouchPotato... yet ironically I haven't played with python's virtual env (heard of it, never had a chance to look yet)... I'll try and look at this for the next releases of SB/CP etc.

The problem is every time I learn something new, I intend to roll that methodology across the Apps, but to some extent I have ended up with too many Apps and I usually go with "don't fix what ain't broken" :P... but yes, a re-release of all apps with standard methodology is due :)
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
User avatar
mafredri
Posts: 371
Joined: Sat Mar 22, 2014 8:41 am

Re: [APKG] NZBGet

Post by mafredri »

Heh, no worries. I get the "don't fix what ain't broken", it's a good mantra. After all, unless you stop at some point, there are endless improvements you can make :).

I had a look at your new nzbget package btw and it looks much better now in my opinion, good work! Off the top of my head one change I would still make is download ffmpeg to the app folder, link it to the nzbget/bin folder and pre/post-install back it up so it doesn't have to be re-downloaded.
Hi, I'm new here. Looking to be active in the community and help with development :).
Storage: AS-604T with 3GB RAM (Kingston KVR1333D3S8S9/2G)
User avatar
clinton.hall
Posts: 845
Joined: Thu May 09, 2013 7:01 pm
Location: New Zealand
Contact:

Re: [APKG] NZBGet

Post by clinton.hall »

Yeah... I had specifically thought about ffmpeg... and wasn't sure.

The reality is this can be used by NZBGet or SABnzbd (or indeed if using my nzbToMedia scripts in Transmission or utorrent etc)
So I figured having it in a common (public) directory was better so it wouldn't be re-downloaded by every installation. And users can easily access this via browser, delete the files and next start it will download the latest.

What I have just done now is keep the same download location (no need to re-download) and then link this back to the repos/bin directory (which was exported to the path).

I now just run everything from the App directory... no sym-linking into /usr/local (except for the "fix" to ensure python2 exists in the PATH... although I could actually link that back inside the App itself (repos/bin)... ???

Latest version here https://www.dropbox.com/s/e9p7bmoqojbgx ... 18_any.apk. Tested on 6-series and 3-series... I'm quite happy with this... thanks for giving me the "boot" to clean this up :)

Next mission... clean up SABnzbd!
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
User avatar
mafredri
Posts: 371
Joined: Sat Mar 22, 2014 8:41 am

Re: [APKG] NZBGet

Post by mafredri »

No problem, glad I could help. And thanks for hearing me out, appreciate it :).

Also, great work on the app, shaped up quite nicely! (PS. there seems to be the ".apk" part missing from the url in your latest link).
Hi, I'm new here. Looking to be active in the community and help with development :).
Storage: AS-604T with 3GB RAM (Kingston KVR1333D3S8S9/2G)
Post Reply

Return to “NZBGet”