89 Commits

Author SHA1 Message Date
Andrey Prygunkov
9e2d8544da #126: full use of class BString
1) replaced characters arrays with class BString through the whole
program. The string formatting code has become much cleaner.
2) class Util returns error message via CString instead of character
buffers.
3) few more places to use CString.
2015-12-19 18:43:52 +01:00
Andrey Prygunkov
558fce9b47 #126: replaced C-style strings with class "CString"
: replaced all data members.
2015-12-12 16:36:25 +01:00
Andrey Prygunkov
4e4816c3c8 #116: use size specific integer types 2015-11-21 00:02:22 +01:00
Andrey Prygunkov
ec17d119a1 #115: put all external headers together
into “nzbget.h”
2015-11-19 23:51:02 +01:00
Andrey Prygunkov
70ccfd9802 normalized whitespace formatting
1) removed trailing spaces and tabs;
2) replaced occasional leading spaces with tabs.
2015-11-05 23:45:19 +01:00
Andrey Prygunkov
a9a6f1e2d4 #103: manual corrections of variable names 2015-11-03 23:33:21 +01:00
Andrey Prygunkov
bf49f16d7c #103: renamed global variables 2015-11-01 21:42:35 +01:00
Andrey Prygunkov
1fb21b330e #103: normalized (renamed) acronyms 2015-10-30 23:54:37 +01:00
Andrey Prygunkov
5adb50274e #103: renamed local, member variables and function parameters 2015-10-27 22:37:23 +01:00
Andrey Prygunkov
87f9cc68a0 compatibility with Visual Studio 2015 2015-09-28 21:35:41 +02:00
Andrey Prygunkov
c6656cffbf #64: indication of par-repair using dupe sources
in history details dialog:
- status “REPAIR: RECIPIENT” or “STATUS:DONOR” with hint details;
- in statistics details (via click on “Total downloaded ->”);
- new field “ExtraParBlocks” returned by API-method “history”: positive
numbers for recipient, negative numbers for donor.
2015-08-13 19:38:28 +02:00
Andrey Prygunkov
24fd4e8c15 #26, #60, #64, #70: corrected file permissions 2015-08-11 22:31:59 +02:00
Andrey Prygunkov
f8c1df1856 fixed #70: incorrect reading of UrlStatus from diskstate 2015-08-11 18:43:15 +02:00
Andrey Prygunkov
659ed48652 #26: ignored nzbs are now added to history
When an nzb-file isn’t added to queue for some reason, the file is now
also added to history (in addition to messages printed to log):
- for malformed nzb-files which cannot be parsed the status in history
“DELETE: SCAN”;
- for duplicate files with exactly same content status “DELETE: COPY”;
- for duplicate files having history items with status “GOOD” - status
“DELETE: GOOD”;
- for duplicate files having history items with status “SUCCESS” -
status “DELETE: SUCCESS”;
- history items have log-entries with explanation;
- new values for field “DeleteStatus” of RPC-Method “history”: GOOD,
SUCCESS, COPY, SCAN;
- new values for field “Status” of RPC-Method “history”:
"FAILURE/SCAN”, ”DELETED/COPY”, "DELETED/GOOD”, "DELETED/SUCCESS”;
- one exception: for files added from RSS-feeds no history items are
created, the files are ignored as if they were filtered.
2015-07-23 23:47:59 +02:00
Andrey Prygunkov
fc484ba0dd #28: fixed: files were deleted during flush (Windows only) 2015-07-21 18:22:34 +02:00
Andrey Prygunkov
36d1378881 #28: implemented disk flush on POSIX
with extra specifics for Linux and OS X.
2015-07-16 23:56:37 +02:00
Andrey Prygunkov
d7ab37ad31 #28: disk state handling for disk flush
Reworked disk state handling to use disk flush function. The function
itself is not implemented yet.
2015-07-15 23:17:17 +02:00
Andrey Prygunkov
5d24697b0c refactor: reworked declaration of global objects (singletones) 2015-05-22 20:28:05 +00:00
Andrey Prygunkov
2de44bfd99 new action "Mark as success" on history page and in history details dialog; items marked as success are considered successfully downloaded and processed, which is important for duplicate check; new action "HistoryMarkSuccess" in RPC-method "editqueue"; new subcommand "S" of command "-E H" (command line interface); new status "SUCCESS/MARK" can be returned by RPC-method "history" 2015-03-26 22:28:30 +00:00
Andrey Prygunkov
7e6f8f19eb each nzb now has its own individual log, where messages printed during download or post-processing are saved; the messages can be retrieved later at any time; new button "Log" in the history details dialog; button "Log" in the download details dialog is now active during download too (not only during post-processing); the log contains all nzb-related messages except detail-messages and errors printed during retrieving of articles (they would produce way too many messages and are not that useful anyway); new option "NzbLog" to deactivate per-nzb logging if necessary; per-nzb logs are saved in the queue-directory (option "QueueDir"); new RPC-method "loadlog" returns the previously saved messages for a given nzb-file; new field "MessageCount" is returned by RPC-methods "listgroups" and "history" and indicates if there are any messages saved for the item; parameter "NumberOfLogEntries" of RPC-method "listgroups" and the field "Log" returned by the method are now deprecated, use method "loadlag" instead; field "PostInfoText" returned by RPC-method "listgroups" is now automatically filled with the latest message printed by a pp-script eliminating the need to access deprecated field "Log" 2015-02-26 20:57:38 +00:00
Andrey Prygunkov
9269f69a38 improvement in quick par-verification: if unpack fails (excluding invalid password errors) and quick par-check does not find any errors or quick par-check was already performed the full par-check is performed; this helps in rare situations when files were correctly downloaded (and therefore assumed correct by quick par-check) but incorrectly written into disk due to abnormal program termination (caused by bugs or hardware crashes) 2014-10-09 21:11:42 +00:00
Andrey Prygunkov
0f98c72f1e fixed: cancelling of post-processing could delete the nzb-item completely (bug introduced in v14) 2014-08-28 19:15:42 +00:00
Andrey Prygunkov
c9981472a8 refactor: disk state now holds info about failed files: their IDs, CRCs of download articles and full intitial article information; these data can be used later to retry download of failed articles and for quick par-verification of damaged files 2014-08-05 23:45:28 +00:00
Andrey Prygunkov
a62966227a added quick file verification during par-check/repair; if par-repair is required for download the files downloaded without errors are verified quickly by comparing their checksums against the checksums stored in the par2-file; this makes the verification of undamaged files almost instant; damaged files are verified as usual; new option "ParQuick" (active by default); added support for block-by-block scan of files during verification, which improves scan speed of damaged files; the quick par-verification requires a patch for libpar2 (see http://nzbget.net/libpar2 for details) 2014-07-27 21:59:00 +00:00
Andrey Prygunkov
3074ea62dc added per-nzb time and size statistics: total time, download, verify, repair and unpack times, downloaded size and average speed, shown in history details dialog via click on the row with total size in statistics block; RPC-methods "listgroups" and "history" return new fields: "DownloadedSizeLo", "DownloadedSizeHi", "DownloadedSizeMB", "DownloadTimeSec", "PostTotalTimeSec", "ParTimeSec", "RepairTimeSec", "UnpackTimeSec" 2014-07-19 00:06:28 +00:00
Andrey Prygunkov
ba9efe43be added article cache: new option "ArticleCache" defines memory limit to use for cache; when cache is active the articles are written into cache first and then all flushed to disk into the destination file; article cache reduces disk IO and may reduce file fragmentation improving post-processing speed (unpack); it works with both writing modes (direct write on and off); when option "DirectWrite" is disabled the cache should be big enough (for best performance) to accommodate all articles of one file (sometimes up to 500 MB) in order to avoid writing articles into temporary files, otherwise temporary files are used for articles which do not fill into cache; when used in combination with DirectWrite there is no such limitation and even a small cache (100 MB or even less) can be used effectively; when the cache becomes full it is flushed automatically (directly into destination file) providing room for new articles; new row in the "statistics and status dialog" in web-interface indicates the amount of memory used for cache; new fields "ArticleCacheLo", "ArticleCacheHi" and "ArticleCacheMB" returned by RPC-method "status"; refactor: parts of unit "ArticleDownloader" responsible for writing into disk were moved into new unit "ArticleWriter" 2014-07-18 22:48:35 +00:00
Andrey Prygunkov
702b635826 improved RPC-API: history items now preserve "NZBID" from queue items; that makes the tracking of items across queue and history easier for third-party apps; field "NZBID" returned by RPC-method "history" is now available for history items of all kinds (NZB, URL, DUP); field "ID" is deprecated and should not be used 2014-07-04 19:07:51 +00:00
Andrey Prygunkov
990c5f67e4 fixed: current download could be damaged if the program was restarted during download and the option "ContinuePartial" was active (bug introduced in v13) 2014-07-03 20:45:53 +00:00
Andrey Prygunkov
f85533d608 fixed: some nzb-file data were not calculated for history items loaded from disk state; this may cause problems for commands "Post-process again" and "Download remaining files" (bug introduced in v13) 2014-05-28 21:37:44 +00:00
Andrey Prygunkov
8c36a4d4c6 fixed: renaming or deleting of temporary files could fail, especially when options "UnpackPauseQueue" and "ScriptPauseQueue" were not active (windows only) 2014-05-22 16:58:16 +00:00
Andrey Prygunkov
4712c6a372 fixed: errors during loading of queue from disk state may render the already loaded parts useless too; now at least these parts of queue are used 2014-04-25 22:51:22 +00:00
Andrey Prygunkov
bdcb8864fb fixed: history status "SKIPPED" and "SCAN" for URL-items were not properly read from disk state 2014-04-14 20:55:04 +00:00
Andrey Prygunkov
e151691711 fixed: files state were not fully reloaded when option "ContinuePartial" was used (bug introduced in r982) 2014-04-12 08:14:01 +00:00
Andrey Prygunkov
a83dbccc6c changed the way option "ContinuePartial" works: now the information about completed articles is stored in a special file in QueueDir; when option "DirectWrite" is active no separate flag-files per article are created in TempDir; the file contains additional information, which were not stored/available before; fixed: per-server/per-nzb article completion statistics could be inaccurate for nzb-files whose download were interrupted by reload/restart; per-server/per-nzb article completion statistics are now available via RPC-method "listgroups" for active downloads (not only for "history") 2014-04-10 20:06:55 +00:00
Andrey Prygunkov
3cd126f08d fixed: after deleting servers from config file the program could crash on start when loading server volume statistics data from disk 2014-04-09 20:09:08 +00:00
Andrey Prygunkov
160d098510 extended data volume statistics dialog with numbers for current day, month, all-time total and custom counter; the custom counter can be manually reset; new fields in the result of RPC-method "servervolumes"; new RPC-method "resetservervolume" 2014-04-04 20:44:46 +00:00
Andrey Prygunkov
47fbe6423e added collecting of download volume statistics data per news server; in web-interface the data is shown as chart in "Statistics and Status" dialog; new RPC-method "servervolumes" returns the collected data 2014-04-01 21:06:31 +00:00
Andrey Prygunkov
bf66500aac reworking queue (continued): merged url queue into main download queue: urls added to queue are now immediately shown in web-interface; urls can be reordered and deleted; when urls are fetched the downloaded nzb-files are put into queue at the positions of their urls; this solves the problem with fetched nzb-files ordered differently than the urls if the fetching of upper (position wise) urls were completed after of the lower urls; removed options "ReloadUrlQueue" and "ReloadPostQueue" since there are no separate url- and post-queues anymore; nzb-files added via urls have new field "URL" which can be accessed via RPC-methods "listgroups" and "history"; new env. var. "NZBNP_URL", "NZBNA_URL" and "NZBPP_URL" passed to NzbProcess, NzbAddedProcess and PostProcess-scripts; removed remote command "--list U", urls are now shown as groups by command "--list G"; RPC-method "urlqueue" is still supported for compatibility but should not be used since the urls are now returned by method "listgroups", the entries have new field "Kind" which can be "NZB" or "URL" 2014-03-18 22:35:58 +00:00
Andrey Prygunkov
8168804f05 reorganized source code directory structure: created directory 'daemon' with several subdirectories and put all source code files there 2014-02-24 22:11:14 +00:00