Plex Media Server

Media streaming service.

Ansible Role: plex

You can copy your existing library from /var/lib/plexmediaserver/* to plex_library to auto-import your existing plex library.

  • The UID/GID should be set to a user/group that have access to your media. All media clients should run under the same user to run correctly.

  • Map your media directly to where it was before to prevent needing to modify any libraries. This should be read-only.

  • plex_transcode_memory maps a portion of RAM to tmpfs for transcoding, ensure there is enough memory in the system.

  • plex_online_token token is used to identify the server for your account. See Defaults for detailed information on obtaining token.

# Plex
Plex Media Server supporting plexpass entitlements.

## Requirements
No additional requirements. See [Clean Setup](#clean-setup) for new plex
installs.

## Role Variables
Settings have been throughly documented for usage.

[defaults/main.yml](https://github.com/r-pufky/ansible_plex/blob/main/defaults/main/main.yml).

### Plex Preferences
If you do **not** have a pre-existing configuration: install without preferences
set and set those values after plex is configured.

Reasonable defaults have been provided but must be updated for your setup before
use.

Location: `/var/lib/plexmediaserver/Library/Application Support/Plex Media Server`

Pull configured values from `Preferences.xml`.

### Ports
All ports and protocols have been defined for the role.

Hosts should only define firewall rules for ports they need.

[defaults/ports.yml](https://github.com/r-pufky/ansible_plex/blob/main/defaults/main/ports.yml).

## Dependencies
N/A

## Example Playbook
host_vars/plex.example.com/vars/plex.yml
``` yaml
plex_library: '/data/media'

ports:
  - {proto: 'tcp', from_ip: 'any', to_port: 32400, direction: 'in', comment: 'plex media server access'}

plex_machine_identifier:                '{{ vault_plex_machine_identifier }}'
plex_processed_machine_identifier:      '{{ vault_plex_processed_machine_identifier }}'
plex_accepted_eula:                     '1'
plex_online_mail:                       'example@example.com'
plex_online_token:                      '{{ vault_plex_online_token }}'
plex_online_username:                   'example'
plex_publish_server_on_plex_online_key: '1'
```

site.yml
``` yaml
- name:   'plex media server'
  hosts:  'plex.example.com'
  become: true
  roles:
     - 'r_pufky.plex'
```

## Clean Setup
A new plex install (or one requiring a new access token after revocation)
requires the initial manual setup process to be run locally. Use a SSH tunnel
to access the server-side configuration page.

``` bash
ssh -L 32400:localhost:32400 {plex_host}
```

Then connect to http://localhost:32400/web and run through the configuration
steps.

1. Select media libraries to use.
1. Sign-in on server (upper right --> sign-in)
1. Select server and claim (claim now --> claim server)
1. Once claimed, the access token and configured preferences are located in
   `Preferences.xml` per [Plex Preferences](#plex-preferences).

## Issues
Create a bug and provide as much information as possible.

Associate pull requests with a submitted bug.

## License
[AGPL-3.0 License](https://github.com/r-pufky/ansible_plex/blob/main/LICENSE)

## Author Information
https://keybase.io/rpufky

None

Role Details: Updated: 2022-10-08 galaxy source service docs

Ports

---
###############################################################################
# Ports Configuration
###############################################################################
# Ports should be managed externally.
#
# Reference:
# * https://support.plex.tv/articles/201543147-what-network-ports-do-i-need-to-allow-through-my-firewall/
# * https://docs.ansible.com/ansible/latest/collections/community/general/ufw_module.html

ports:
  - {proto: 'udp', from_ip: 'any', to_port: 1900,  direction: 'in', comment: 'plex DLNA server'}
  - {proto: 'udp', from_ip: 'any', to_port: 5353,  direction: 'in', comment: 'bonjour/avahi discovery'}
  - {proto: 'udp', from_ip: 'any', to_port: 32410, direction: 'in', comment: 'GDM network discovery'}
  - {proto: 'udp', from_ip: 'any', to_port: 32412, direction: 'in', comment: 'GDM network discovery'}
  - {proto: 'udp', from_ip: 'any', to_port: 32413, direction: 'in', comment: 'GDM network discovery'}
  - {proto: 'udp', from_ip: 'any', to_port: 32414, direction: 'in', comment: 'GDM network discovery'}
  - {proto: 'tcp', from_ip: 'any', to_port: 32400, direction: 'in', comment: 'plex media server access'}
  - {proto: 'tcp', from_ip: 'any', to_port: 3005,  direction: 'in', comment: 'control plex home theater w/ plex companion'}
  - {proto: 'tcp', from_ip: 'any', to_port: 8324,  direction: 'in', comment: 'control plex for roku w/ plex companion'}
  - {proto: 'tcp', from_ip: 'any', to_port: 32469, direction: 'in', comment: 'plex DLNA server'}

Defaults

---
###############################################################################
# Plex Role Configuration
###############################################################################
# User that plex will run under. Assumes externally managed.
plex_user:  'media'
plex_group: 'media'

# Create 'media' user if not detected? See: vars/main.yml.
plex_create_user: false

# Sepcific architecture for platform: i686, i386
plex_arch: 'amd64'

# Generic architecture for platform: x86_32
plex_arch_generic: 'x86_64'

# Amount of memory to use for transcoding (mounted as /tmp via tmpfs).
# Ensure enough memory on system.
plex_transcode_memory: '4G'

# Locally mounted location of plex library. Default:
#   /var/lib/plexmediaserver/Library/Application Support/Plex Media Server
# If specified, the role will create a symlink from plex_library to the default
# location.
plex_library: ''

###############################################################################
# Plex preferences.xml configuration
###############################################################################
# Be sure to use vault to encrypt sensitive tokens & identifiers.
#
# Some values are automatically generated on a initial Plex install and must be
# included after first launch using the `Preferences.xml` file located here:
#
#   /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/
#

###############################################################################
# Miscellaneous Section
###############################################################################
# Configuration options here are not found directly in the server UI. These are
# generally updated automatically during Plex usage, but may be set after the
# initial Plex configuration if desired (e.g. for UUID's this will persist your
# instance without re-authentication across reinstalls, or for user auth
# tokens).
#
# Connect to http://localhost:32400/web and run through the configuration
# steps to obtain plex_online_token.
#
# 1. Select media libraries to use.
# 1. Sign-in on server (upper right --> sign-in)
# 1. Select server and claim (claim now --> claim server)
# 1. Once claimed the access token and configured preferences settings are
#    located in Preferences.xml.
#
# Previously installed plex version set on first installation.
# Values:
#   legacy    - legacy plex install (1st gen plex >10 years ago)
#   {version} - last installed plex version (e.g. '1.28.2.6106-44a5bbd28')
# Default: ''.
plex_oldest_previous_version: ''

# Machine UUID. Uniquely identifies server. Default: ''.
plex_machine_identifier: ''

# Plex Client ID used to claim the server. Default: ''.
plex_processed_machine_identifier: ''

# Anonymous UUID (Randomly Generated) to identify plex server. Default: ''.
plex_anonymous_machine_identifier: ''

# Use year 2038+ safe epochs for timestamps. Default: true.
plex_metrics_epoch: true

# User accepted EULA? Default: true.
plex_accepted_eula: true

# Global music video paths migrated from legacy config? Default: true.
plex_global_music_video_path_migrated: true

# Plex username. Default: ''.
plex_online_username: ''

# Plex user email. Default: ''.
plex_online_mail: ''

# Plex user access token (see above). Default: ''.
plex_online_token: ''

# Use this server as user home (default) server. Default: true.
plex_online_home: true

# Enable incremental DVR electronic program guides loader. Default: false.
plex_dvr_incremental_epg_loader: false

# Plex letsencrypt certificates.
# Plex automatically creates and distributes certificates to support it's own
# HTTPS by default scheme. These are automatically issued on first install.
#
# Do **NOT** use your own letsencrypt material.

# Letsencrypt certificate UUID. Default: ''.
plex_certificate_uuid: ''

# Letsencrypt certificate version. Values: 1, 2, 3. Default: 3.
plex_certificate_version: 3

# Latest plex pubsub server ping. Automatically updated periodically when
# running. Setting will only set the initial 'last known' value. Default: 65.
plex_pubsub_server_ping: 65

# Last port automatically mapped when plex_publish_server_on_plex_online_key is
# true. Default: 0
plex_last_automatic_mapped_port: 0

# Collect usage data (deprecated). Send usage data to plex. This has been
# deprecated in lieu of other mechanisms now, however this is kept in case any
# edge cases still use this variable. Default: false.
plex_collect_usage_data: false

# Use plex cloud settings for language options. This overrides local settings
# in the Langauge secton. Now force enabled by plex. Default: true.
plex_language_in_cloud: true

###############################################################################
# General Section
###############################################################################

# Server Friendly name. This name will be used to identify this media server to
# other computers on your network. If you leave it blank, your computer's name
# will be used instead. Default: ''.
plex_friendly_name: ''

# Send crash reports to Plex. Default: false.
plex_send_crash_reports: false

# Push Notifications. Allow this server to send push notifications to mobile
# devices. Note: Push notifications are delivered using Plex services. They're
# associated with your account, and some of them may contain information about
# the contents of your library. Default: false.
plex_push_notifications_enabled: false

# Enable Plex Media Server debug logging. Debug logging enables additional
# detail in the log files and is helpful in diagnosing problems.
# Default: false.
plex_log_debug: false

# Enable Plex Media Server verbose logging. Verbose logging is only useful to
# debug specific issues and should only be enabled if requested by support
# staff. Default: false.
plex_log_verbose: false

# Plex update channel. Does not circumvent plexpass entitlements.
# Values:
#   0 - stable (public)
#   8 - beta
# Default: 0.
plex_butler_update_channel: 0

###############################################################################
# Remote Access Section
###############################################################################
# Remote access configuration. See reference for more information.
#
# Reference: https://support.plex.tv/articles/200931138-troubleshooting-remote-access

# Publish server on Plex Online. Publishing a server makes it automatically
# available on your client devices without any configuration of your router.
# Default: false.
plex_publish_server_on_plex_online_key: false

# Enable Manually specifying a public port. You may need to enable this to
# establish a direct connection from outside your network. You may also need to
# configure your router. See reference for details.
# Default: false.
plex_manual_port_mapping_mode: false

# Manul Port to Use. See reference for details.
# Default: 32400.
plex_manual_port_mapping_port: 32400


# Internet upload speed (Kbps). You can use speedtest.net to determine your
# internet upload capacity. Default: 0 (no limit).
plex_wan_total_max_upload_rate: 0

# Limit remote stream bitrate (Kbps). Set the maximum bitrate of a remote
# stream from this server.
# Values:
#   0     - original (no limit)
#   40000 - 40 Mbps (4k)
#   30000 - 30 Mbps (4k)
#   25000 - 25 Mbps (4k)
#   20000 - 20 Mbps (1080p)
#   15000 - 15 Mbps (1080p)
#   12000 - 12 Mbps (1080p)
#   10000 - 10 Mbps (1080p)
#   8000  - 8 Mbps (1080p)
#   4000  - 4 Mbps (720p)
#   3000  - 3 Mbps (720p)
#   2000  - 2 Mbps (480p)
#   1500  - 1.5 Mbps (480p)
#   720   - 720 Kbps
#   320   - 320 Kbps
plex_wan_per_stream_max_upload_rate: 0

###############################################################################
# Library Section
###############################################################################
# Library and metadata management.

# Scan my library automatically. Your library will be updated automatically
# when changes to library folders are detected. Default: .
plex_fs_event_library_updates_enabled: false

# Run a partial scan when changes are detected. When changes to library folders
# are detected, only scan the folder that changed. Default: false.
plex_fs_event_library_partial_scan_enabled: false

# Include music libraries in automatic updates. Linux systems limit the maximum
# number of watched directories; this may cause problems with large music
# libraries. Default: false.
plex_watch_music_sections: false

# Scan my library periodically (period in seconds).
# Values:
#   900   - every 15 minutes
#   1800  - every 30 minutes
#   3600  - hourly
#   7200  - every 2 hours
#   21600 - every 6 hours
#   43200 - every 12 hours
#   86400 - daily
# Default: 3600
plex_scheduled_library_update_interval: 86400

# Empty trash automatically after every scan. Default: true.
plex_auto_empty_trash: true

# Allow media deletion. The owner of the server will be allowed to delete media
# files from disk. Default: true.
plex_allow_media_deletion: true

# Weeks to consider for Continue Watching. Media that has not been watched in
# this many weeks will not appear in Continue Watching. Default: 16.
plex_on_deck_window: 16

# Maximum number of Continue Watching items which will appear. Limits the
# number of shows which will appear Continue Watching. Setting it too high can
# affect performance. Default: 40.
plex_on_deck_limit: 40

# Include season premieres in Continue Watching. New season premieres will
# always appear no matter how many weeks have passed since watching.
plex_on_deck_include_premieres: true

# Enable smart shuffling on artists and smart music playlists. Smart shuffling
# prefers highly rated, popular and less recently heard tracks. Default: true.
plex_smart_shuffle_music: true

# Group albums by type. Group into LPs, EPs & Singles, Compilations, Live
# Albums, Demos and Remixes. Default: true.
plex_music_separate_album_types: true

# Run scanner tasks at a lower priority. Default: false.
plex_scanner_low_priority: false

# Generate video preview thumbnails. Video preview thumbnails provide live
# updates in Now Playing and while seeking on supported apps. Thumbnail
# generation may take a long time, cause high CPU usage, and consume additional
# disk space. You can turn off thumbnail generation for individual libraries in
# the library's advanced settings.
# Values:
#   never     - 'never'
#   scheduled - 'as a scheduled task'
#   asap      - 'as a scheduled task and when media is added'
# Default: 'never'.
plex_generate_bif_behavior: 'never'

# Generate intro video markers. Detects show intros, exposing the 'Skip Intro'
# button in clients.
# Values:
#   never     - 'never'
#   scheduled - 'as a scheduled task'
#   asap      - 'as a scheduled task and when media is added'
# Default: 'asap'.
plex_generate_intro_marker_behavior: 'asap'

# Generate chapter thumbnails. Chapter thumbnails provide images in the chapter
# view on supported apps. They can take a long time to generate and consume
# additional disk space.
# Values:
#   never     - 'never'
#   scheduled - 'as a scheduled task'
#   asap      - 'as a scheduled task and when media is added'
# Default: 'scheduled'.
plex_generate_chapter_thumb_behavior: 'scheduled'

# Analyze audio tracks for loudness. Loudness analysis allows various features,
# such as loudness leveling and smart transitions. It can take a long time to
# complete when analyzing many tracks, and cause high CPU usage.
# Values:
#   never     - 'never'
#   scheduled - 'as a scheduled task'
#   asap      - 'as a scheduled task and when media is added'
# Default: 'scheduled'.
plex_loudness_analysis_behavior: 'scheduled'

# Analyze audio tracks for sonic features. Sonic analysis allows various
# features, such as track radio. It can take a long time to complete when
# analyzing many tracks, and cause high CPU usage.
# Values:
#   never     - 'never'
#   scheduled - 'as a scheduled task'
#   asap      - 'as a scheduled task and when media is added'
# Default: 'scheduled'.
plex_music_analysis_behavior: 'scheduled'

# Location visibility. Server owners may wish to restrict who can see location
# names for items which contain geolocation metadata. By default only the
# server owner will have visibility of these.
# Values:
#   1 - admin only
#   2 - everyone
# Default: 1.
plex_location_visibility: 1

###############################################################################
# Plugins Section
###############################################################################
# iTuns plugins configuration.

# Region. These are now stored online in your Plex account and force
# enabled/set automatically from the cloud. This is set via
# plex_language_in_cloud: true; toggling does not re-enable.

# Enable iTunes plugin (requires server restart). Default: false.
plex_itunes_sharing_enabled: false

# iTunes library XML path (full path). Default: ''.
plex_itunes_library_xml_path: ''

# Disable capability checking (ensures incompatible plugins are hidden).
# Default: false.
plex_disable_capability_checking: false

###############################################################################
# Network Section
###############################################################################
# Network configuration.

# Enable server support for IPv6. Default: true.
plex_enable_ipv6: true

# Secure connections. When set to "Required", some unencrypted connections
# (originating from the Media Server computer) will still be allowed and apps
# that don't support secure connections will not be able to connect at all.
# Values:
#   true  - Required
#   false - Preferred
# Default: false.
plex_secure_connections: false

# Custom certificate location. Fullpath to a PKCS #12 file containing a
# certificate and private key to enable TLS support on a custom domain.
# Defautl: ''.
plex_custom_certificate_path: ''

# Custom certificate encryption key. Default: ''.
plex_custom_certificate_key: ''

# Custom certificate domain. Domain name to be published to plex.tv using your
# mapped port; must match a name from the custom certificate file.
# Default: ''.
plex_custom_certificate_domain: ''

# Preferred network interface. The network interface local clients will use to
# connect.
# Values:
#   ''          - Any network connection
#   '{adapter}' - Use specified location interface (e.g. enp4s0, etc)
plex_preferred_network_interface: ''

# Strict TLS configuration. Disables legacy weak ciphers, increases DH group
# size, and switches to ECDSA certificates when renewing. May prevent older
# clients from connecting. Default: false.
plex_disable_tlsv1_0: false

# Enable local network discovery (GDM). This enables the media server to
# discover other servers and players on the local network. Default: true.
plex_gdm_enabled: true

# Remote streams allowed per user. Maximum number of simultaneous streams each
# user is allowed when not on the local network.
# Values:
#   0    - Unlimited connections
#   1-20 - max number of connections
# Default: 0.
plex_wan_per_user_stream_count: 0

# LAN Networks (plexpass). List of IP addresses or IP/netmask entries for
# networks that will be considered to be on the local network when enforcing
# bandwidth restrictions. If set, all other IP addresses will be considered to
# be on the external network and will be subject to external network bandwidth
# restrictions. If left blank, only the server's subnet is considered to be on
# the local network.
#
# plex_lan_networks_bandwidth:
#   - '10.2.2.0/24'              # CIDR notation
#   - '10.2.2.80'                # Single host
#   - 'fe80::1ff:fe23:4567:890a' # IPv6
#
# Default: []
plex_lan_networks_bandwidth: []

# Terminate Sessions Paused for Longer Than X. Value is in minutes. Terminate
# any sessions which have been paused for a longer time than specified amount
# of time. Audio-only sessions and live sessions are excluded. 0 indefinite.
# Default: 0.
plex_minutes_allowed_paused: 0

# Treat WAN IP As LAN Bandwidth. Treat incoming requests from this network's
# WAN IP address as LAN requests in terms of bandwidth. This often occurs when
# DNS rebinding protection is in place and clients on the LAN cannot contact
# the server directly but instead have to go through the WAN IP address.
# Default: true.
plex_treat_wan_ip_as_local: true

# Enable Relay. The Relay allows connections to the server through a proxy
# relay when the server is not accessible otherwise. Note: this proxy relay is
# bandwidth limited. Default: true.
plex_relay_enabled: true

# Custom server access URLs. List of URLs (http or https) which are published
# up to plex.tv for server discovery. Default: [].
plex_custom_connections: []

# List of IP addresses and networks that are allowed without auth. List of IP
# addresses or IP/netmask entries for networks that are allowed to access Plex
# Media Server without logging in. When the server is signed out and this value
# is set, only localhost and addresses on this list will be allowed.
#
# Private/LAN addresses can be specified either as a range or as an individual
# IP address. Public addresses can only be specified as an individual IP
# address (using ranges/netmasks with public addresses will fail/be ignored).
# Do not include spaces or tabs.
#
# Any app connecting to the server this way without being signed in will be
# treated as the admin/owner. That means access to all libraries as well as the
# ability to change server settings. We strongly encourage using Plex apps that
# allow signing in to accounts to ensure the highest security for your computer
# and network.
#
# plex_allowed_networks:
#   - '10.2.2.0/24'              # CIDR notation
#   - '10.2.2.80'                # Single host
#   - '10.4.4.0-10.4.4.100'      # Range of hosts (internal only)
#   - 'fe80::1ff:fe23:4567:890a' # IPv6
#
# Default: [].
plex_allowed_networks: []

# Webhooks. Allow this server to send events to external services.
# Default: true.
plex_webhooks_enabled: true

###############################################################################
# Transcoding Section
###############################################################################
# Network configuration.

# Transcoder quality. Quality profile used by the transcoder.
# Values:
#   0 - Automatic
#   1 - Prefer higher speed encoding
#   2 - Prefer higher quality encoding
#   3 - Make my CPU hurt
# Default: 0.
plex_transcoder_quality: 0

# Transcoder temporary directory. Directory to use when transcoding for
# temporary files. Default: '/tmp'.
plex_transcoder_temp_directory: '/tmp'

# Transcoder default throttle buffer. Amount in seconds to buffer before
# throttling the transcoder. Default: 60.
plex_transcoder_throttle_buffer: 60

# Background transcoding x264 preset. The x264 preset value used for background
# transcoding (Sync and Media Optimizer). Slower values will result in better
# video quality and smaller file sizes, but will take significantly longer to
# complete processing.
# Values:
#   ultrafast - ultra fast
#   superfast - super fast
#   veryfast  - very fast
#   faster    - faster
#   fast      - fast
#   medium    - medium
#   slow      - slow
#   slower    - slower
#   veryslow  - very slow
# Default: 'ultrafast'
plex_transcoder_h264_background_preset: 'ultrafast'

# Enable HDR tone mapping. Transcoded HDR content will appear highly dimmed and
# desaturated with this disabled. Additional driver components may be needed to
# support hardware transcoding with this feature enabled; see our support
# articles for further details. Default: true.
plex_transcoder_tone_mapping: true

# Disable video stream transcoding. Disable transcoding of the video stream in
# transcoder operations. With this set, the transcoder may still transcode
# audio as well as remux video. Default: false.
plex_transcoder_can_only_remux_video: false

# Use hardware acceleration when available. Plex Media Server will attempt to
# use hardware-accelerated video codecs when encoding and decoding video.
# Hardware acceleration can make transcoding faster and allow more simultaneous
# video transcodes, but it can also reduce video quality and compatibility.
# Default: false.
plex_hardware_accelerated_codecs: false

# Use hardware-accelerated video encoding. If hardware acceleration is enabled,
# this controls whether it's used for encoding, in addition to decoding.
# Default: true.
plex_hardware_accelerated_encoders: true

# Maximum simultaneous video transcodes. Limit the number of simultaneous video
# transcode streams your server can utilize.
# Values:
#   0    - Unlimited connections
#   1-20 - max number of connections
# Default: 0.
plex_transcode_count_limit: 0

###############################################################################
# Languages Section (Deprecated)
###############################################################################
# Legacy options to store languages. These are now stored online in your Plex
# account and force enabled/set automatically from the cloud. This is set via
# plex_language_in_cloud: true; toggling does not re-enable.

# Automatically select audio and subtitle tracks. Default: false.
# Prefer audio tracks in. Default: 'English'.
# Subtitle mode. Default: 'Manually selected'.
# Prefer subtitles in. Default: 'English'.

###############################################################################
# DLNA Section
###############################################################################
# DLNA Media server configuration.

# Enable DLNA server. Default: false.
plex_dlna_enabled: false

# DLNA client preferences. Default: ''.
plex_dlna_client_preferences: ''

# DLNA server timeline reporting. Default: true.
plex_dlna_report_timeline: true

# DLNA default protocol info.
# Default:
#   - 'http-get:*:video/mpeg:*'
#   - 'http-get:*:video/mp4:*'
#   - 'http-get:*:video/vnd.dlna.mpeg-tts:*'
#   - 'http-get:*:video/avi:*'
#   - 'http-get:*:video/x-matroska:*'
#   - 'http-get:*:video/x-ms-wmv:*'
#   - 'http-get:*:video/wtv:*'
#   - 'http-get:*:audio/mpeg:*'
#   - 'http-get:*:audio/mp3:*'
#   - 'http-get:*:audio/mp4:*'
#   - 'http-get:*:audio/x-ms-wma*'
#   - 'http-get:*:audio/wav:*'
#   - 'http-get:*:audio/L16:*'
#   - 'http-get:*image/jpeg:*'
#   - 'http-get:*image/png:*'
#   - 'http-get:*image/gif:*'
#   - 'http-get:*image/tiff:*'
#
plex_dlna_default_protocol_info:
  - 'http-get:*:video/mpeg:*'
  - 'http-get:*:video/mp4:*'
  - 'http-get:*:video/vnd.dlna.mpeg-tts:*'
  - 'http-get:*:video/avi:*'
  - 'http-get:*:video/x-matroska:*'
  - 'http-get:*:video/x-ms-wmv:*'
  - 'http-get:*:video/wtv:*'
  - 'http-get:*:audio/mpeg:*'
  - 'http-get:*:audio/mp3:*'
  - 'http-get:*:audio/mp4:*'
  - 'http-get:*:audio/x-ms-wma*'
  - 'http-get:*:audio/wav:*'
  - 'http-get:*:audio/L16:*'
  - 'http-get:*image/jpeg:*'
  - 'http-get:*image/png:*'
  - 'http-get:*image/gif:*'
  - 'http-get:*image/tiff:*'

# DLNA media renderer discovery interval. Defualt: 60.
plex_dlna_device_discovery_interval: 60

# DLNA server announcement lease time. Default: 1800.
plex_dlna_announcement_lease_time: 1800

# DLNA server description icons.
# Default:
#   formats: ['png', 'jpeg']
#   sizes:   ['260x260', '120x120', '48x48']
plex_dlna_description_icons:
  formats: ['png', 'jpeg']
  sizes:   ['260x260', '120x120', '48x48']

###############################################################################
# Scheduled Tasks Section
###############################################################################
# Scheduled task configuration.

# Time at which tasks start to run. The time at which the server starts running
# background maintenance tasks. Values: 24-hour clock, 0 is midnight.
# Default: 2.
plex_bulter_start_hour: 2

# Time at which tasks stop running. The time at which the background
# maintenance tasks stop running. Values: 24-hour clock, 0 is midnight.
# Default: 5.
plex_bulter_end_hour: 5

# Backup database every three days. Default: true.
plex_butler_task_backup_database: true

# Backup directory. The directory in which database backups are stored.
# Default: '/var/lib/plex/Plex Media Server/Plug-in Support/Databases'.
plex_butler_database_backup_path: '/var/lib/plex/Plex Media Server/Plug-in Support/Databases'

# Optimize database every week. Default: true.
plex_butler_task_optimize_database: true

# Remove old bundles every week. Default: true.
plex_butler_task_clean_old_bundles: true

# Remove old cache files every week. Default: true.
plex_butler_task_clean_old_cache_files: true

# Refresh local metadata every three days. Default: true.
plex_butler_task_refresh_local_media: true

# Update all libraries during maintenance. Default: false.
plex_butler_task_refresh_libraries: false

# Upgrade media analysis during maintenance. Default: true.
plex_butler_task_upgrade_media_analysis: true

# Refresh library metadata periodically. Default: true.
plex_butler_task_refresh_periodic_metadata: true

# Perform extensive media analysis during maintenance. Default: true.
plex_butler_task_deep_media_analysis: true

# Fetch missing location names for items in photo sections. Default: true.
plex_butler_task_reverse_geocode: true

# Analyze and tag photos. Default: true.
plex_butler_task_generate_auto_tags: true

###############################################################################
# Extras Section
###############################################################################
# Media playback extras.

# Include Cinema Trailers from movies in my library.
# Values:
#   0 - all movies
#   1 - only unwatched movies
# Default: 1.
plex_cinema_trailers_type: 1

# Include Cinema Trailers from movies in my library. Default: true.
plex_cinema_trailers_from_library: true

# Include Cinema Trailers from new and upcoming movies in theaters (plexpass).
# Default: false.
plex_cinema_trailers_from_theater: false

# Include Cinema Trailers from new and upcoming movies on Blu-ray (plexpass).
# Default: false.
plex_cinema_trailers_from_bluray: false

# Movie pre-roll video list. List of videos (str: fullpath) to preroll before
# playing a movie.
#
# plex_cinema_trailers_preroll_id:
#   - '/media/preroll/advert1.mp4'
#   - '/media/preroll/advert2.mkv'
#
# Default: [].
plex_cinema_trailers_preroll_id: []

# Play all preroll videos? (otherwise only one randomly played from list).
# Default: true.
plex_cinema_trailers_preroll_play_all: true

# Global music videos path. Default: ''.
plex_global_music_video_path: ''

###############################################################################
# Extensions Section
###############################################################################
# Manually specify additional XML preferences that are not explicitly defined
# in this config. Use to add additional options from future plex updates. If
# you are using this section, please submit a bug with the specific key that
# needs to be added to the config.
#
# Deprecated options may be specified here.
#
# https://github.com/r-pufky/ansible_plex/issues
#
# plex_preference_extensions:
#   {XML Key}: {XML Value (will automatically be qouted)}
#   SomeNewPlexPreferenceOption: '1'
#
# Default: {}.
plex_preference_extensions: {}

# Deprecated options are no longer used in plex preferences but are included in
# case an older version is used.
#
# First time running plex?
#   FirstRun="0"
# Plex pubsub server IP.
#   PubSubServer="184.105.148.115"
# Does plex cloud sync need to push an update?
#   CloudSyncNeedsUpdate="0"
# Plex pubsub server region.
#   PubSubServerRegion="sjc"
# Enable scheduled library updates (superceeded: FSEventLibraryUpdatesEnabled)
#   ScheduledLibraryUpdatesEnabled="1"
# Share aperature photos (Aperature killed in 2014: https://skylum.com/blog/aperture-replacement-photos-for-mac)
#   ApertureSharingEnabled="0"
# Share iPhoto library.
#   iPhotoSharingEnabled="0"
# Share iTunes library.
#   iTunesSharingEnabled="0"
# Enabled media DTS downmixing
#   enableMediaLinkDtsDownmixing="1"
# Gracenote user ID for plex
#   GracenoteUser="{token}"
# Agent last.fm artists vevo
#   agentAutoEnabled.com.plexapp.agents.lastfm.Artists.com.plexapp.agents.vevo="1"
# Agent last.fm albums lyricfind
#   agentAutoEnabled.com.plexapp.agents.lastfm.Albums.com.plexapp.agents.lyricfind="1"
# Agent plexmusic albums lyricfind
#   agentAutoEnabled.com.plexapp.agents.plexmusic.Albums.com.plexapp.agents.lyricfind="1"