newznab-tmux icon indicating copy to clipboard operation
newznab-tmux copied to clipboard

PPA think RAR is JPEG due to filename

Open Fossil01 opened this issue 3 years ago • 5 comments

Specific filename inside rar: blablablabla.jpeg.mp4 Subject inside NZB: subject="[2/33] - "BLABLABLA.Jpeg.XXX.1080p.MP4-blabla.vol00-01.par2" yEnc (1/3)"

Because there's jpeg in the filename in the NZB NNTmux tries to download the file and run it through Imagick to save as a "sample".

Looks like the regex here is the culprit: https://github.com/NNTmux/newznab-tmux/blob/master/Blacklight/processing/post/ProcessAdditional.php#L919

Fossil01 avatar Jun 07 '22 10:06 Fossil01

I checked some releases and they do have names like that and proper samples set for them.

DariusIII avatar Jun 07 '22 17:06 DariusIII

I am running the exact same code but I do get this issue. I even tested the regex which matched the filename/subject, which means it will treat it as a JPEG. It saves the file to the tmpunrarpath as sampleimage.jpg

Fossil01 avatar Jun 07 '22 20:06 Fossil01

Regex does match that, that is true.

DariusIII avatar Jun 14 '22 19:06 DariusIII

Still getting these:

ERROR: negative or zero image size `REMOVED/6/66f994f2-3561-4dce-82ae-eb800a9370b3/396969_REMOVED.bdrip.x264-doucement.jpg' @ error/image.c/CloneImage/794

No further stack trace.

Fossil01 avatar Jul 12 '22 10:07 Fossil01

Not sure why this happens but something like this might help in _processJPGMessageIDs()

                if(exif_imagetype($this->tmpPath.'samplepicture.jpg')) {
                    // Image is valid
                }

Fossil01 avatar Jul 12 '22 10:07 Fossil01

I am looking to fix this, but are we certain that these are not trully images? This regex specifically looks for jpeg inside the filename, not at the end of it.

DariusIII avatar Feb 04 '23 20:02 DariusIII

It's been a while but since I added that if statement I don't think it happened again.

Fossil01 avatar Feb 04 '23 21:02 Fossil01