Skip to content

Commit

Permalink
qbittorrent: change default delete behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
saltydk committed Oct 5, 2024
1 parent a342020 commit ad8bcbb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions roles/qbittorrent/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ qbittorrent_webui_custom_headers_enabled: "{{ 'true' if qbittorrent_themepark_en
qbittorrent_webui_custom_headers_default: "{{ (qbittorrent_themepark_headers if qbittorrent_themepark_enabled and global_themepark_plugin_enabled else '') + qbittorrent_webui_custom_headers_custom }}"
qbittorrent_webui_custom_headers_custom: ""
qbittorrent_webui_custom_headers: "{{ (qbittorrent_webui_custom_headers_default | trim + ' ' + qbittorrent_webui_custom_headers_custom | trim) | trim }}"
# Options are: Delete or MoveToTrash
qbittorrent_torrent_content_remove_option: "Delete"

################################
# Host Install
Expand Down
12 changes: 12 additions & 0 deletions roles/qbittorrent/tasks/subtasks/pre-install/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@
group: "{{ user.name }}"
mode: "0664"

- name: Pre-Install | Settings | Update Session\TorrentContentRemoveOption in 'qBittorrent.conf' config settings
community.general.ini_file:
path: "{{ qbittorrent_paths_conf }}"
section: BitTorrent
option: Session\TorrentContentRemoveOption
value: "{{ lookup('vars', qbittorrent_name + '_torrent_content_remove_option', default=qbittorrent_torrent_content_remove_option) }}"
no_extra_spaces: true
state: present
owner: "{{ user.name }}"
group: "{{ user.name }}"
mode: "0664"

- name: Pre-Install | Settings | Update Connection\PortRangeMin in 'qBittorrent.conf' config settings (legacy)
community.general.ini_file:
path: "{{ qbittorrent_paths_conf }}"
Expand Down

0 comments on commit ad8bcbb

Please sign in to comment.