Splitting your script into several scripts may be a better alternative. When the user saves settings in web-interface the script configuration options are saved to NZBGet configuration file using the script name as prefix.
For example:. When the script is executed NZBGet passes the values of all configuration options to the script using environment variables. This will be described later in this document. Since NZBGet automatically adds script name when saving the options, the options defined in different scripts are not interfere with each other or with NZBGets own options. NZBGet passes different information to the script.
All data is passed as environment variables env-vars. There are two env-vars for each option:. For example, for pp-option Server.
NOTE : In a case the user has installed the script but have not saved the configuration, the options are not saved to configuration file yet. The script will not get the options passed. This is a situation your script must handle. You can either use a default settings or terminate the script with a proper message asking the user to check and save configuration in web-interface.
Example python :. Sometimes it may be helpful to be able to execute extension scripts from settings page. For example pp-script EMail. Starting from v19 it is possible to put buttons on the script settings page. The buttons are defined as part of script configuration, similar to script configuration options but with a slightly different syntax:. Otherwise it would appear as an usual option with edit field. Older NZBGet versions prior v19 ignore command definitions.
Therefore scripts utilizing the new feature can be also used in older NZBGet version without breaking it. When user presses the button NZBGet executes the script in a special context passing button name via env. The script can check if it runs in command mode by examining this variable python example :. During execution of the script NZBGet presents a special dialog showing script output.
The script must exit with one of predefined exit codes indicating success exit code 93 or failure exit code User may close the progress dialog but the script continues running in the background. All messages printed by the script are saved to NZBGet log and are seen in web-interface on Messages tab. See post-processing script EMail. Farm shows you exactly what settings to use for popular newsreaders.
Farm account username and password. Farm as our second news server and Giganews as our third. After entering Giganews as Server 3 and confirming it could connect successfully, to rank Giganews ahead of Usenet.
Farm but still behind Newshosting, we just selected 'Move Up'. Well done. Your configuration has been saved successfully. We will do this via NZB.
With more traditional or classic newsreader clients, such as Grabit, you download all the post headers think of these like the subject lines of emails of one or more newsgroups, browse them and then pick the posts you want to download including the files they contain. That process might be OK for smaller files, such as images, but for larger files it takes a long time as they are made up of many many posts.
Plus, there may be missing parts posts in the series that are missing and it only takes 1 or a few missing parts to mess up your download. That can be frustrating! And just like torrents, you can submit the NZB to your newsreader either by downloading an NZB file they are tiny to your computer and then opening it in your newsreader or by submitting the NZB as a URL to your newsreader. All 3 methods will do the same thing: NZBGet will jump into action and start to find and download the content associated with the NZB you added.
Actually, there are a few ways to find NZBs. An NZB indexer or simply indexer is different from a Usenet search engine. This means that the name of the content you are looking for - whether a filename or movie title - must be contained in the catalog of post headers. In contrast, indexers take the time and trouble to check the actual contents in Usenet posts and make sure that the NZB is associated with all the right pieces posts no matter what they are named or what newsgroups they are posted to.
This lets you browse or do advance searches of indexer content with ease. The best indexers will even display rich information about the content such as reviews for movies or series and episode information for TV shows. Many indexers support thumbnail previews of content too. Plus, most indexers support RSS feeds. An RSS feed is a way to connect an indexer to NZBGet so that when new content you want becomes available, the indexer will communicate this instantly to NZBGet and it will spring into action and download the content right away.
This automatic downloading method can happen so fast that you get the content before even the fastest DMCA and equivalent takedown notices are filed. Every indexer is different and unique with their own interface, search capabilities and ways of indexing files found in Usenet newsgroups. But the general concepts in this example will apply to most indexers and help you no matter which indexer you ultimately choose.
Usenet indexers' contents are usually organized into easy Categories select to zoom. Top Tip - When browsing a category or subcategory , we like to sort by the "Grabs" or similar column as this tells us what downloads have been popular among the indexer's members.
For this example, we browsed the TV category and scrolled down until we found an NZB associated with content that was not too big in size and had been downloaded many times.
In the screenshots, please note that we have blurred out potentially controversial elements such as filenames. Clicking on the TV show episode that caught our eye, we are presented with a screen that shows why indexers are so awesome. One cool features some indexers support is 'Search for similar'. This content has been superbly indexed select to zoom.
We could have instead added it to our "shopping cart" which is just a way to collect a number of NZBs and download them in one batch rather than individually. The NZB is a tiny 41k in size, so it downloads in an instant.
We save the NZB file to a separate folder on our computer we have just for NZBs we employ this same technique for torrents too. For extra safety, we save NZBs and all our downloaded files! Read more. In the new window that pops up, select Add local files. If you like, add a Priority or category too for the content. If you don't want to download the content right away you just want to add the NZB but not download its associated content just yet , you can also select 'Add paused'.
This is easy to do, is supported by many indexers and has some pretty cool advantages. To set this up in your indexer, log in, and look for specific settings for NZBGet Integration sample below. This is another reason why it's good to save NZB files to a dedicated folder: you can set up NZBGet or any other newsreader you use to monitor this folder for new NZBs and automatically start downloading the content associated with them.
For example, among some indexer's many cool features, you might be able to manage TV Shows and Movies. This section defines which servers NZBGet should connect to.
The servers should be numbered subsequently without holes. For example if you configure three servers you should name them as Server1,. Server2 and Server3. If you need to delete Server2 later you should also. Otherwise it will not be properly. Server number doesn't affect its priority level. Set to "no" to temporary disable the server.
The name is used in UI and for logging. It can be any string, you. Level priority of news server The servers are ordered by their level. NZBGet first tries to download. If that server fails,. NZBGet tries all other levelservers. If all servers fail, it proceeds. Put your major download servers at level 0 and your fill servers at. Several servers with the same level may be defined, they have.
If you have multiple accounts with same conditions retention, etc. If download fails on one news server, NZBGet does not try. Value "0" means no group defined default. User name to use for authentication. Server requires "Join Group"-command yes, no. Cipher to use for encrypted server connection. By default when the option is empty the underlying encryption library. To achieve the best performance. You can also get an error "Could not. Maximum number of simultaneous connections to this server It could be a dns-hostname e.
An IP-address is more effective because does not require dns-lookup. Your computer may have multiple network interfaces and therefore multiple IP.
If you want NZBGet to listen to all interfaces and be available from. NOTE: If you set the option to " This restriction applies to web-interface too.
Port which NZBGet server and remote client use NOTE: The communication via this port is not encrypted. For encrypted. User name which NZBGet server and remote client use. Set to empty value to disable user name check check only password.
Older versions used predefined. Third-party tools or web-sites written. Password which NZBGet server and remote client use. Set to empty value to disable authorization request. Secure control of NZBGet server yes, no. Activate the option if you want to access NZBGet built-in web-server. You should also provide certificate. Port which NZBGet server and remote client use for encrypted. Full path to certificate file for encrypted communication.
Full path to key file for encrypted communication. Set MainDir with an absolute path to be sure where it will write. This allows NZBGet daemon to be launched in rc. NOTE: This option has effect only if the program was started from. Specify default umask affects file permissions for newly created.
The value should be written in octal form the same as for "umask" shell. Empty value or value "" disable the setting of umask-mode; current. Create subdirectory with category-name in destination-directory yes, no.
Value "0" disables the check. How old nzb-file should at least be for it to be loaded to queue seconds. NZBGet checks if nzb-file was not modified in last few seconds, defined by.
That safety interval prevents the loading of files, which. Automatic merging of nzb-files with the same filename yes, no. A typical scenario: you put nzb-file into incoming directory, NZBGet adds. You find out, that the file doesn't have par-files. You want the second. You only need to. Set path to program, that must be executed before a nzb-file is added. This program is called each time a new file is found in incoming. That program can unpack archives which were put in incoming directory, make.
NZBGet passes following arguments to nzbprocess-program as environment. It is a directory. In addition to these arguments NZBGet passes all. For Example. The dots in option names are replaced with underscores, for example. The nzbprocess-script can change nzb-name, category, priority,. To change nzb-name use following syntax:. Although priority can be any integer value, the web-interface operates.
To assign post-processing parameters:. In this example a post-processing. To change top-flag nzb-file will be added to the top of queue :. To change paused-flag nzb-file will be added in paused state :. The nzbprocess-script can delete processed file, rename it or move somewhere. After the calling of the script the file will be either added to queue.
NOTE: Files with extensions ". NOTE: Files with extension ". NzbProcess-script before adding to queue. This feature allows. NzbProcess-script to prevent the scanning of nzb-files extracted from. Set path to program, that must be executed after a nzb-file is added.
This program is called each time a new nzb-file is added to queue. That program can modify the files in download queue for example. NZBGet passes following arguments to nzbaddedprocess-program as environment. This name can be used in calls. If the file was added.
If the file was added via web-interface it contains. This ID can. Check for duplicate files yes, no. If this option is enabled the program checks by adding of a new nzb-file:. This check aims on detecting. If the program find two files with identical names, only the. In last two cases: if the file exists it will not be added to queue. If this option is disabled, all files are downloaded and duplicate files.
Existing files are never deleted or overwritten. Save download queue to disk yes, no. This allows to reload it on next start. Reload download queue on start, if it exists yes, no. Reload url-queue on start, if it exists yes, no. Reload Post-processor-queue on start, if it exists yes, no. Reuse articles saved in temp-directory from previous program start yes, no.
This allows to continue download of file, if program was exited before. Useful for debugging to. Write decoded articles directly into destination output file yes, no. Files are posted to Usenet within artilce bodies. Each file typically. With this option enabled the program at first creates the output. This may improve performance but depends on OS and file system ability to.
0コメント