MalloyDelacroix / DownloaderForReddit

The Downloader for Reddit is a GUI application with some advanced features to extract and download submitted content from reddit.
GNU General Public License v3.0
496 stars 47 forks source link

Use config.toml for all lists and not just default #377

Open T-prog3 opened 9 months ago

T-prog3 commented 9 months ago

Is your feature request related to a problem? Please describe. Many times i have encountered bugs and crashes where the only solution is to remove the Database file. Some bugs appears to be related to lists settings that are being saved in the db file. https://github.com/MalloyDelacroix/DownloaderForReddit/issues/313 https://github.com/MalloyDelacroix/DownloaderForReddit/issues/291 https://github.com/MalloyDelacroix/DownloaderForReddit/issues/364

Other bugs appear after a while and seam to be related to something that is being saved or not removed correctly. https://github.com/MalloyDelacroix/DownloaderForReddit/issues/375

I also have encountered times where the DB has been corrupted.

Starting with a fresh DB sometimes can solve the issues but this come at a cost that you lose all your lists and their individual settings in the process and have to set it all up over and over again.

Describe the solution you'd like I would want to have all the lists settings to use config.toml to keep them safe and more easily transferable without getting all users personal data that comes with the db file. We already have the default list settings in config.toml so why cant we have all these settings in the same file?

[download_defaults.user_download_defaults]
lock_settings = false
post_limit = 25
post_score_limit = 1000
post_score_limit_operator = "<LimitOperator.NO_LIMIT: 0>"
post_sort_method = "<PostSortMethod.NEW: 1>"
avoid_duplicates = true
extract_self_post_links = false
download_self_post_text = false
self_post_file_format = "txt"
download_videos = true
download_images = true
download_gifs = true
download_nsfw = "<NsfwFilter.INCLUDE: 0>"
extract_comments = "<CommentDownload.DO_NOT_DOWNLOAD: 2>"
download_comments = "<CommentDownload.DO_NOT_DOWNLOAD: 2>"
download_comment_content = "<CommentDownload.DO_NOT_DOWNLOAD: 2>"
comment_file_format = "txt"
comment_limit = 100
comment_depth = 100
comment_reply_limit = 100
comment_score_limit = 1000
comment_score_limit_operator = "<LimitOperator.NO_LIMIT: 0>"
comment_sort_method = "<CommentSortMethod.NEW: 1>"
post_download_naming_method = "%[title]"
post_save_structure = "%[author_name]"
comment_naming_method = "%[author_name]-comment"
comment_save_structure = "%[post_author_name]/Comments/%[post_title]"

[download_defaults.subreddit_download_defaults]
lock_settings = false
post_limit = 25
post_score_limit = 1000
post_score_limit_operator = "<LimitOperator.NO_LIMIT: 0>"
post_sort_method = "<PostSortMethod.NEW: 1>"
avoid_duplicates = true
extract_self_post_links = false
download_self_post_text = false
self_post_file_format = "txt"
download_videos = true
download_images = true
download_gifs = true
download_nsfw = "<NsfwFilter.INCLUDE: 0>"
extract_comments = "<CommentDownload.DO_NOT_DOWNLOAD: 2>"
download_comments = "<CommentDownload.DO_NOT_DOWNLOAD: 2>"
download_comment_content = "<CommentDownload.DO_NOT_DOWNLOAD: 2>"
comment_file_format = "txt"
comment_limit = 100
comment_depth = 100
comment_reply_limit = 100
comment_score_limit = 1000
comment_score_limit_operator = "<LimitOperator.NO_LIMIT: 0>"
comment_sort_method = "<CommentSortMethod.NEW: 1>"
post_download_naming_method = "%[title]"
post_save_structure = "%[subreddit_name]"
comment_naming_method = "%[author_name]-comment"
comment_save_structure = "%[post_subreddit_name]/Comments/%[post_title]"

The users personal created lists should use config.toml and also have their own separate settings options to modify as above. So if i delete dfr.db i will only lose content data and no settings in the process. All my custom lists names and their settings should be kept so i don't have to create them again until i remove the config file.