Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Commit 8a5810f

Browse files
committed
Plex: Reorganized tasks. [ansible]
1 parent 5cbe585 commit 8a5810f

File tree

3 files changed

+18
-12
lines changed

3 files changed

+18
-12
lines changed

roles/plex/tasks/main.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@
176176
wait_for:
177177
timeout: 15
178178

179-
# we need this here because sometimes after a restore, docker will set this transcodes folder to root, dont ask why, but it does...
179+
# Sometimes docker will set transcodes folder to root after a restore.
180180
- name: "Ensure transcodes folder has the correct permissions"
181181
file:
182182
path: "{{ plex.transcodes }}"
@@ -194,11 +194,11 @@
194194
name: sub-zero
195195

196196
- name: "Forced Automatic Quality Settings"
197-
import_tasks: "subtasks/forced_quality_settings.yml"
198-
tags: plex_forced_quality_settings
197+
import_tasks: "subtasks/settings/forced_quality.yml"
198+
tags: plex_forced_quality
199199
when: (not continuous_integration)
200200

201201
- name: "DB Cache Size Settings"
202-
import_tasks: "subtasks/db_cache_size_settings.yml"
203-
tags: plex_db_cache_size_settings
202+
import_tasks: "subtasks/settings/db_cache_size.yml"
203+
tags: plex_db_cache_size
204204
when: (not continuous_integration)

roles/plex/tasks/subtasks/db_cache_size_settings.yml renamed to roles/plex/tasks/subtasks/settings/db_cache_size.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
##########################################################################
2-
# Title: Plex - DB Cache Size Settings #
2+
# Title: Plex: DB Cache Size Settings #
33
# Author(s): desimaniac #
44
# URL: https://github.com/cloudbox/cloudbox #
55
# -- #
@@ -15,7 +15,9 @@
1515
timeout: 600
1616

1717
- name: Get Current Plex DB Cache Size
18-
shell: sqlite3 "/opt/plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db" "PRAGMA default_cache_size;"
18+
shell: |
19+
sqlite3 "/opt/plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db" \
20+
"PRAGMA default_cache_size;"
1921
args:
2022
executable: /bin/bash
2123
register: current_db_cache_size

roles/plex/tasks/subtasks/forced_quality_settings.yml renamed to roles/plex/tasks/subtasks/settings/forced_quality.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
##########################################################################
2-
# Title: Plex - Forced Automatic Quality Settings #
2+
# Title: Plex: Forced Automatic Quality Settings #
33
# Author(s): desimaniac #
44
# URL: https://github.com/cloudbox/cloudbox #
55
# -- #
@@ -18,9 +18,11 @@
1818
path: "/opt/plex/Library/Application Support/Plex Media Server/Preferences.xml"
1919
state: present
2020

21-
# 'forceAutoAdjustQuality' in Preferences.xml - Forces clients to use automatic quality for media unless the quality is set higher than the quality of the video.
21+
# 'forceAutoAdjustQuality' in Preferences.xml
22+
# Forces clients to use automatic quality for media unless the quality is set higher than the quality of the video.
2223

23-
- name: "Set 'forceAutoAdjustQuality' in 'Preferences.xml' to '{{ (plex.force_auto_adjust_quality|default(false,true)) | ternary('Enabled','Disabled') }}'."
24+
- name: "Set 'forceAutoAdjustQuality' in 'Preferences.xml' to
25+
'{{ (plex.force_auto_adjust_quality|default(false,true)) | ternary('Enabled','Disabled') }}'."
2426
xml:
2527
path: "/opt/plex/Library/Application Support/Plex Media Server/Preferences.xml"
2628
xpath: /Preferences
@@ -30,9 +32,11 @@
3032
register: x
3133
ignore_errors: yes
3234

33-
# 'AllowHighOutputBitrates' in Preferences.xml - Forces transcode quality to upscale. But can cause high bandwidth usage for clients.
35+
# 'AllowHighOutputBitrates' in Preferences.xml
36+
# Forces transcode quality to upscale. But can cause high bandwidth usage for clients.
3437

35-
- name: "Set 'AllowHighOutputBitrates' in 'Preferences.xml' to '{{ (plex.force_high_output_bitrates|default(false,true)) | ternary('Enabled','Disabled') }}'."
38+
- name: "Set 'AllowHighOutputBitrates' in 'Preferences.xml' to
39+
'{{ (plex.force_high_output_bitrates|default(false,true)) | ternary('Enabled','Disabled') }}'."
3640
xml:
3741
path: "/opt/plex/Library/Application Support/Plex Media Server/Preferences.xml"
3842
xpath: /Preferences

0 commit comments

Comments
 (0)