PDA

View Full Version : .nzb.zip



Alvis
01-11-2008, 02:51 AM
What's up with the zipped .nzbs? I just noticed this in the last day or two. Has something changed in the behavior of nzbfetch.php? Is there anyway to force raw .nzbs?

delimare
01-11-2008, 02:56 AM
Yeah, my finger is starting to hurt from the extra clicking needed to extract the .nzb. :cry:

Alvis
01-11-2008, 03:00 AM
That it's messing up the numbering scheme is my problem. Used to be the last .nzb downloaded was the highest numbered. Whatever's going on now, I can't say, but that's no longer the case.

Skiz
01-11-2008, 04:59 AM
That it's messing up the numbering scheme is my problem. Used to be the last .nzb downloaded was the highest numbered. Whatever's going on now, I can't say, but that's no longer the case.

Going to zipped NZBs is going to allow us to extend the retention.

Alvis
01-11-2008, 06:10 AM
Thanks for an explanation. If it means longer retention, I can live with the inconvenience.

So now, are the .nzb files numbered when uploaded, and then they stay that way?

What I used to like is that I could download say, five or six .nzb files to the directory I dump them in, and then go to my newsreader and import those five or six highest-numbered .nzbs all at once. Now I have to remember each numbered .nzb I extracted from the .zips and search through the directory for them.

The one thing I can think of that might help this out is changing the naming of the .nzbs themselves. Keep the .zip naming as-is, but maybe assign the .nzb the name of the topic it was uploaded from? I dunno - something unique would really help if they can't be generated as numbers in sequence anymore.

backlash
01-11-2008, 01:47 PM
yeah, the unique name would be nice.

tesco
01-11-2008, 10:22 PM
To change the name to the current number (actually, it's a time stamp) I would need to have the system extract the nzb from the zip, rename it, then compress it into a zip again.

I could look into a way of renaming a file that already exists in a zip, when I get a chance.

Daniel
01-12-2008, 07:58 PM
I could look into a way of renaming a file that already exists in a zip, when I get a chance.
If it's working via PHP, try $zip->renameIndex(0,'newname');

Alvis
01-17-2008, 10:02 AM
To change the name to the current number (actually, it's a time stamp) I would need to have the system extract the nzb from the zip, rename it, then compress it into a zip again.

I could look into a way of renaming a file that already exists in a zip, when I get a chance.

Thanks for considering the suggestion.

If understand things right, the .nzb is named with a time stamp from when its uploaded, gets compressed and saved on the server, and then when a download is requested the .zip file is dynamically renamed with a time stamp of the current time and sent out. IE the script sends me rightnowtime.zip that includes whenuploaded.nzb. Is that how it works?

I wouldn't ask that you de- and recompress the file when a download is requested. That kind of server load would defeat the point of this tactic to conserve resources.

One thing I hadn't thought of until now: what about having the script, in addition to renaming the .zip itself when a download is requested, also do a small binary edit to the .zip header where the .nzb name is stored?

From just a quick check of the file format, it looks like you could rename the .nzb file on-the-fly by editing the .zip at 001E, and change it to the same time stamp as the .zip file name, without changing the rest of the compressed data.

At the least, that would help sort even uncompressed files by most recently downloaded, just like how the script used to work.

I bet it could done quite easily in PHP, though I don't know enough to suggest how. Just something to be think on. Like I said before, anything that improves retention is awesome, and I can live with a few changes.

Daniel
01-17-2008, 10:35 AM
I bet it could done quite easily in PHP, though I don't know enough to suggest how. Just something to be think on. Like I said before, anything that improves retention is awesome, and I can live with a few changes.
Check my previous post on that matter. I have tested renameIndex() (http://us.php.net/manual/en/function.ziparchive-renameindex.php) on PHP 5.2.4 and as long as zlib is linked with PHP this will work, possibly in earlier versions than 5.2.0 too.

Personally, I'd love to have .nzb files named for their respective release titles (ie "Stargate Atlantis S04E11 720p HDTV x264-2HD.nzb") because alt.binz for example uses this filename to create a download-sub-folder with that name. This is something I always needed to do manually so far and I would love if you did away with that step :)