New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer file names from nzb to names from article body #361

Closed
hugbug opened this Issue Apr 14, 2017 · 2 comments

Comments

Projects
None yet
1 participant
@hugbug
Member

hugbug commented Apr 14, 2017

Articles read from news servers contain metadata about binary file, in particular its filename.

When NZBGet downloads files it saves it with names read from article metadata. This ensures the downloaded files have the same names as they were posted.

Nzb-files also contains detail information about included files, in particular article subject. The subject is usually formatted using rules allowing to embed file name into it. Therefore NZBGet also read file names from nzb-file when adding it to queue. For nzb-file which was not downloaded yet the names of included files can be seen in web-interface on page "Files" of download item details dialog.

Nzb-files generated by indexers are usually of high quality and contain article subjects with parseable nice file names. These names are sometimes even better than names from article metadata. Because of the obfuscation measures posters may embed incorrect names into article bodies although the indexers may provide deobfuscated names in subjects of nzb-files.

On the other side, nzb-files generated by search engines relies on raw-data from headers and the quality of subjects depends on posters. For subjects not properly formatted the file names cannot be determined. As a result file names from nzb-files should not be used and names from article metadata must be used.

Actually file names from article metadata are the right ones but for obfuscated posts it would be better to use files names stored in nzb-files.

At the end it doesn't matter much which file names to take as the correct names are restored during par-rename (or rar-rename) stage. It does matter though for downloads without par-files and rar-files.

In this issue: before using file name from article metadata check if the name looks like an obfuscated one. If obfuscated file name is detected - use the name from nzb-file instead.

@hugbug hugbug added the improvement label Apr 14, 2017

@hugbug hugbug added this to the v19 milestone Apr 14, 2017

hugbug added a commit that referenced this issue Apr 14, 2017

#361: prefer file names from nzb
to names from article body; to better handle obfuscated posts.

@hugbug hugbug closed this Apr 14, 2017

@hugbug hugbug reopened this Apr 14, 2017

hugbug added a commit that referenced this issue Apr 14, 2017

#361: pp-param "*naming"
to define naming scheme for downloaded files: “nzb” - use file names
from nzb, “article” - use file names from article metadata (default).
@hugbug

This comment has been minimized.

Show comment
Hide comment
@hugbug

hugbug Apr 15, 2017

Member

In this issue: before using file name from article metadata check if the name looks like an obfuscated one. If obfuscated file name is detected - use the name from nzb-file instead.

Instead of guessing another approach is implemented: for each nzb can be explicitly defined wether the file names should be used from nzb-file or from article metadata. By default article metadata is used. To use names from nzb-file pp-parameter *naming must be set to nzb. For example via console:

nzbget -E G O "*naming=nzb" 922

Or from a scan-script:

#!/bin/sh
### NZBGET SCAN SCRIPT
# Set file naming to "from nzb-file".
### NZBGET SCAN SCRIPT
echo "[NZB] NZBPR_*naming=nzb";
Member

hugbug commented Apr 15, 2017

In this issue: before using file name from article metadata check if the name looks like an obfuscated one. If obfuscated file name is detected - use the name from nzb-file instead.

Instead of guessing another approach is implemented: for each nzb can be explicitly defined wether the file names should be used from nzb-file or from article metadata. By default article metadata is used. To use names from nzb-file pp-parameter *naming must be set to nzb. For example via console:

nzbget -E G O "*naming=nzb" 922

Or from a scan-script:

#!/bin/sh
### NZBGET SCAN SCRIPT
# Set file naming to "from nzb-file".
### NZBGET SCAN SCRIPT
echo "[NZB] NZBPR_*naming=nzb";

@hugbug hugbug closed this Apr 15, 2017

@hugbug hugbug reopened this Apr 30, 2017

hugbug added a commit that referenced this issue Apr 30, 2017

#361: new option "FileNaming"
replace pp-parameter “*naming”.
@hugbug

This comment has been minimized.

Show comment
Hide comment
@hugbug

hugbug Apr 30, 2017

Member

Another change

  • removed pp-parameter *naming;
  • new option FileNaming with possible values auto, article, nzb.
Member

hugbug commented Apr 30, 2017

Another change

  • removed pp-parameter *naming;
  • new option FileNaming with possible values auto, article, nzb.

@hugbug hugbug closed this Apr 30, 2017

hugbug added a commit that referenced this issue Apr 30, 2017

hugbug added a commit that referenced this issue Oct 9, 2017

#361: prefer file names from nzb
to names from article body; to better handle obfuscated posts.

hugbug added a commit that referenced this issue Oct 9, 2017

#361: pp-param "*naming"
to define naming scheme for downloaded files: “nzb” - use file names
from nzb, “article” - use file names from article metadata (default).

hugbug added a commit that referenced this issue Oct 9, 2017

#361: new option "FileNaming"
replace pp-parameter “*naming”.

hugbug added a commit that referenced this issue Oct 9, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment