Ticket #21 (closed feature: Fixed)
Enhancements Patch for HellaWorld
| Reported by: | mavey | Owned by: | Cheez |
|---|---|---|---|
| Priority: | High | Milestone: | 1.10 |
| Component: | HellaWorld | Version: | 1.9 |
| Keywords: | patch, upload, download, stream | Cc: | dave@… |
Description
Hi,
I really like your HellaNZB interface. No shit. :) That's why I picked it among others, but I was missing some stuff, so here's a patch, which you can review and possibly include for future versions. :)
And some screenshots, of course :) http://awk.cz/hella/hellaworld.png http://awk.cz/hella/hellaworld-http.png
Patch: http://awk.cz/hella/hellaworld-1.9-dave.patch
New features: 1) NZB upload: this was the first thing I really needed (for remote nzb submitting). Had to update HellaController.php, because you always set the XMLRPC argument type to int. Now there's int/string autodetection.
2) HTTP access to completed downloads (optional in config.php). All downloads, which still exist in the target directory are clickable in the list (including after your dynamic page refresh). This needs also extra config on Apache's part - the base directory has to be served (doesn't matter where). New config options:
showlinks (bool) - enable this feature
basepath (string) - the base URL where Apache serves the downloads destination directory (hellanzb.conf:DEST_DIR). Can be empty, in which case default is used (proto://hostname/dir/ of the HellaWorld's index.php)
destpath (string) - the directory itself (DEST_DIR). This initial path is removed from the download's record, "destDir", and the rest is appended to the basepath. Together they make a complete URL to the directory of particular downloads.
Example: https://home.com/hella/ is HellaWorld's URL
Apache:
Alias /hella/media /mnt/usenet/done <Directory /mnt/usenet/done>
...
</Directory>
config.php: showlinks => true, basepath => '/hella/media' destpath => '/mnt/usenet/done'
Now clicking on a download "Chickflick", which was saved into: /mnt/usenet/done/Movies/Chickflick gets you: https://home.com/hella/media/Movies/Chickflick/ and you can see and get everything, no fuss.
In case a download isn't in the destpath (it was saved somewhere else), or it's not a directory (or it was already moved), there will be no link generated.
This extension is very important for me. At work, there's only HTTP proxy out Internet. No NNTP gets thru. So I upload all selected nzbs from various sources into HellaWorld, and in a few minutes (fast connection on the home server), I can stream or download everything directly to work. It's like EasyNews?, just not for the whole Usenet, but only selected stuff.
I could of course download traditionally and then get it via tunneled SFTP, FTP, etc, but the convenience is the important thing here. I can resume downloads, stream, use ANY app I like without worrying about its protocol support or waiting hours to get complete files.
3) New CSS class for active download tag - didn't "pop out" enough for me, so I make color change "themeable". :)
Background info: I've been a pro coder in several languages for over 10 years now (I'm 27) and you can find my code e.g. in the kernel and other OSS projects. I hope I didn't mess up your code. :) I tried to follow your formatting and coding habits. I'd like to join in on your project if you wouldn't mind, as I have experience with portability and many OSes/architectures (plus Linux distros). Subversion is in my blood. :) On the other hand, I could use your excellent (D)HTML/JavaScript knowledge.
I was thinking about more automated installation for HellaWorld, which could configure Apache itself. There are many noobs out there, who could give up on advanced features because of complexity. But these features are gonna give your project visible edge over other hellanzb frontends... Think about it.
See ya, David Kubicek
