Ticket #21 (closed feature: Fixed)

Opened 13 months ago

Last modified 12 months ago

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

Attachments

hellaworld-1.9-dave.patch (10.2 kB) - added by mavey 13 months ago.
New features (upload, download) - patch
upload-fix.diff (0.6 kB) - added by drarok 12 months ago.

Change History

Changed 13 months ago by mavey

New features (upload, download) - patch

Changed 13 months ago by mavey

Forgot one more thing - added "icon" and "shortcut icon" to the rel links. People will see your icon on their bookmarks of HellaWorld. Such (usually toolbar) bookmarks can have name or description removed and be just an icon. Saves a lot of browser UI space. You can see it on those screenshots as well. Once you bookmark it (e.g. by dragging location URL to the toolbar) and click it, the icon will be assigned to the bookmark.

One note to the basepath option. It can be empty or relative URL path as I said earlier (in which case current proto://hostname/ will be prefixed to it) or it can be complete URL like https://home.com/hella/word, in which case no modifications are applied. Forgot to mention it explicitly.

That's about it. Some of the new CSS stuff may need some work to make it stable across all supported browsers. I didn't check anything except for Gecko.

BTW, that drag'n'drop reordering stuff - magic! :) I really have to say, JavaScript? has gone a long way since I was doing (D)HTML. I didn't want to bother with filtering the obfuscated code thru auto-indenter to look at it, but kudos nonetheless. It looks a lot like my perl. ;o) Although I usually arrange the letters to some shape, like a circle, square or unicorn. :) It then really stands out as a spit in the face to whomever tries to read it. They see you're a real bastard, but have respect you for all the work it took you to prove it. ;o)

Bye! Use my mail to reply, please. I will definitely forget to check back here.

Changed 13 months ago by mavey

Still no reply, eh? I guess you're not interested then. If it's all the same to you, I will fork HellaWorld, rename it and submit on OSS dev sites among my other projects.

Bye

Changed 13 months ago by Cheez

Many thanks for the patch and ideas. I've been on a bit of a Hiatus of late as I've been busy with work. I shall definitely be looking into this though. :)

Changed 13 months ago by Cheez

  • status changed from new to assigned

Changed 12 months ago by drarok

Changed 12 months ago by drarok

I've attached a diff from my copy of hellaworld, relaxing the rules on the uploaded file, as the ones I used have some odd filenames. Also, changed rename_file() call to the recommended move_uploaded_file().

Changed 12 months ago by drarok

  • status changed from assigned to closed
  • resolution set to Fixed

Implemented in r170.

I changed your short tags usage to "<?php echo" as I know there's at least one use who has short tags disabled.

Note: See TracTickets for help on using tickets.