Commit Graph

131 Commits

Author SHA1 Message Date
Sude
f2e8dde934 Some initial Galaxy code
Add some code for initial Galaxy support.
Rewrite and move code around in preparation for GOG Galaxy API support.
2017-02-17 11:14:28 +02:00
Sude
dea82b7991 Some code restructuring
- Move some code from Downloader::init() to constructor
- Add function API::isLoggedIn()
- Add function Downloader::isLoggedIn()
- Don't call Downloader::getGameList() from Downloader::init(). Call it from other functions if/when needed

Also fix some login issues
2016-12-17 21:01:44 +02:00
Sude
34e3af3438 Ignore DLC count information for specific games
Ignore DLC count information for specific games by using a list of games that we know have DLC.
GOG reports wrong DLC count information for many games. By using a list of games that we know have DLC we can ignore DLC count info that GOG provides for those games.
User can use local list ($XDG_CONFIG_HOME/lgogdownloader/game_has_dlc.txt) or use remote list by using the new "--dlc-list" option.
The list uses same format as blacklist.
2016-11-05 14:51:52 +02:00
Sude
fb565f4493 Add "Message" class
Changed message queue to use the new "Message" class.
Simplifies status message printing by having the message class take care of formatting and keeping track of the message type.

Status messages are now timestamped and colored based on message type
2016-11-03 21:25:33 +02:00
Sude
0dfa610c28 Merge branch 'exit-status' of https://github.com/chewi/lgogdownloader 2016-11-03 20:54:04 +02:00
James Le Cuirot
1388c00a4e
Exit with non-zero status when --list or --list-details fails 2016-09-23 22:20:37 +01:00
James Le Cuirot
d8b8d6da96
Exit with non-zero status when at least one --download-file fails 2016-09-23 22:20:08 +01:00
James Le Cuirot
e36552c6ed
Add --respect-umask option to prevent adjusting permissions
I would like to use LGOGDownloader in conjunction with Gentoo's
package manager, which may execute it as root, portage, or some other
user in the portage group. A shared configuration under /etc will be
used to avoid sandboxing issues. This will not be world readable.
2016-09-21 23:49:32 +01:00
Sude
0b455ddedc Add option to set CA certificate path
Adds options to set path to CA certificate bundle in PEM format.
CURL_CA_BUNDLE environment variable is used if it is set and CA certificate path is not set with --cacert option.
2016-08-30 19:34:47 +03:00
Sude
442fad04db Add support for parallel downloads
New option "--threads" can be used to set how many parallel downloads to run. The default is 4 threads.

Changes to behavior:
- Serials and changelogs are saved and covers downloaded for all games that match the "--game" filter before any other files are downloaded.
- Automatic XML creation is run after all files are downloaded. Previously xml data was automatically created right after download finished.
- The "--limit-rate" option sets rate limit for thread not global rate limit.
2016-05-20 20:33:07 +03:00
Sude
a0650129f7 Don't print help text after login 2016-03-12 09:37:30 +02:00
Sude
987e053ad4 Add option to save changelogs 2016-03-06 15:45:22 +02:00
Thomas J. Moore
9520f3f3b7 Improvements to orphan detection:
- blacklist applies to installed files only; use ignorelist for orphans
  - blacklisted but present items are orphans, as they should be
  - use exact matching for file paths: files in wrong location are orphans
2016-02-20 14:59:52 -06:00
Thomas J. Moore
c0735d5993 Use cerr for password prompts, error messages, rolling status
messages, and other stuff that shouldn't clutter saved stdout.
Probably needs more work.
2016-02-20 14:56:44 -06:00
Sude
0de2a9f64b Add support for priority in game specific language and platform options 2016-02-20 15:34:51 +02:00
Sude
fc88679b12 Add option to set automatic XML creation in config file 2016-02-04 11:51:11 +02:00
Sandy Carter
a5cc950192 CMake: Convert Makefile build to CMake
Find libraries using cmake/Find*.cmake scripts
Replace Version String with CMake implementation based on CMake Version and
git ref-parse.
Compile manpages in man/CMakeLists.txt to build:
    cmake .
    make manpage
Set debug and release versions with
    cmake -DCMAKE_BUILD_TYPE=Debug
and
    cmake -DCMAKE_BUILD_TYPE=Release
Build and install process can be:
    cmake -DCMAKE_BUILD_TYPE=Release .
    make
    make install
More build options can be found with
    cmake .
    make help
Codeblocks project can be generated using
    cmake -G "CodeBlocks - Unix Makefiles" .
2016-01-03 16:50:29 -05:00
Sude
8780b9c53c Possible fix for crash after login 2015-11-18 15:21:22 +02:00
Sude
97d01b2de6 Version 2.26 2015-10-14 15:24:02 +03:00
Sude
3465384e0b Use include/exclude options to select what to download/list/repair
The default is "--include all --exclude covers"
2015-10-07 11:52:04 +03:00
Sude
211aa3a3e6 Combine priority handling with --platform and --language options
Use "+" as separator to combine values and "," to set priority
2015-10-03 19:09:50 +03:00
Sude
ba27e4fbcc Add version string and number to cached game details 2015-10-03 19:00:51 +03:00
Sude
d9587e4544 Version 2.25 2015-09-05 11:15:15 +03:00
Sude
0a7e3a217e Update help text of --download-file option 2015-09-05 11:11:12 +03:00
Sude
63145eef0d Simplify string parsing for downloading with file ids 2015-09-03 13:18:30 +03:00
Sude
b4fd9fcf5c Use regular expressions for getting language and platform option values
Selecting languages with --language and --language-priority
- Whatever code GOG happens to use in their API (mostly ISO 639-1)
- ISO 639-1
- ISO 639-2/T
- ISO 639-2/B
- English name

Selecting platforms with --platform and --platform-priority
- Windows: "w, win, windows"
- Linux: "l, lin, linux"
- Mac: "m, mac, osx"
2015-09-02 11:16:00 +03:00
Sude
2206e988a6 Initial support for using platform/language strings to set options 2015-09-01 14:45:34 +03:00
Sude
9b560d786e Some minor code cleanup 2015-09-01 13:59:54 +03:00
Sude
887ac52563 Some improvements to priority handling
Fixes issues with some strings that caused issues previously
For example: 4,,1 is now handled correctly
2015-08-29 16:18:20 +03:00
Sude
a8e09a7f48 Use same structure for language and platform structs 2015-08-29 15:03:20 +03:00
Sude
06d211f534 Simplify and remove duplicate code for getting config directory paths 2015-08-29 14:26:36 +03:00
Sude
f992466ddf Fix priority handling with duplicate values
Having duplicate values in priority string caused platform/language to be set to wrong value
For example --platform 1 --platform-priority 4,1,1 caused platform to be set to 6 instead of 5
2015-08-29 14:22:18 +03:00
Sude
f9c15dfaca Make automatic xml creation default for --create-xml 2015-08-29 14:18:10 +03:00
Sandy Carter
9c2f35bb27 Only return if --save-config is specified
Continue running commands if login was forced due to missing configuration
Allow downloading of files even if config is missing with only one prompt
for username and password
2015-08-17 19:27:23 -04:00
Sandy Carter
a066e99bad If no login method is defined default to api 2015-08-17 19:20:57 -04:00
Sandy Carter
5c9488fc13 Prevent the use of --output-file when downloading multiple files 2015-08-15 07:57:43 +03:00
Sude
b6d07f5343 Merge branch 'outname' of https://github.com/bwrsandman/lgogdownloader 2015-08-15 07:56:53 +03:00
Sandy Carter
bc92655702 Add output filename option
Add -o option to specify path and downloaded file name when using
--download-file
Overrides --directory
2015-08-14 23:15:15 -04:00
Sandy Carter
b19314af78 Enable multiple file download with protocol address
Implement download of gog addresses containing commas of the form:
    gogdownloader://GAME_NAME_1/FILE_ID1,GAME_NAME_2/FILE_ID2,...
2015-08-14 21:48:58 -04:00
Sandy Carter
04251776d3 Interpret protocol-prefixed argument as download argument 2015-08-14 21:48:58 -04:00
Sandy Carter
1eb2e8deaa Strip out protocol substring for file download 2015-08-14 21:48:55 -04:00
Sude
6132b7a96c Add .sh to orphan check regex 2015-08-14 20:36:23 +03:00
Sude
b65084dd65 Remove --no-deb and --no-targz options
GOG no longer provides deb and tarball archives
2015-08-12 17:15:14 +03:00
Sude
f51cca5dff Add options to login separately to website and API 2015-08-12 16:42:54 +03:00
Sude
4c6ac86619 Version 2.24 2015-07-11 14:51:11 +03:00
Sude
64690d0368 Add status code for file size mismatch 2015-07-02 03:01:21 +03:00
Sude
0f2268cb67 Use ".*" as default for --ignore-dlc-count 2015-06-21 17:25:45 +03:00
Sude
9c80ed1d39 Implicitly set the default value for ignore-dlc-count option 2015-06-21 05:57:30 +03:00
Sude
834e6baa7a Add options to ignore DLC count information
Ignoring DLC count information helps in situations where the account page doesn't provide accurate information about DLCs.
--ignore-dlc-count sets regular expression filter for games to ignore DLC count information.
Game specific option "ignore-dlc-count" can be used to ignore DLC count for specific game.
2015-06-01 10:45:30 +03:00
Sude
8caaf30f16 Version 2.23 2015-05-17 19:04:59 +03:00