Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't hardwire defaults in example PMS.conf (i.e. don't saddle users …

…with possibly obsolete defaults)

    - Based on UniversalMediaServer/UniversalMediaServer@ac8b2b0
Replace direct config file property access with safe wrappers (e.g. don't throw a ConversionException if tsmuxer_forcefps &c. are blank).
Clarify PMS.conf options that are not defined (rather than blank) by default.
  • Loading branch information...
commit aa208381a0f5f891d0e9f18d0f1020a3d5048697 1 parent caa6f9f
@chocolateboy chocolateboy authored
View
161 src/main/external-resources/PMS.conf
@@ -89,13 +89,13 @@ language =
# Sets whether the GUI should start when the program is launched.
# On headless systems, this should be "true".
# Default: false.
-minimized = false
+minimized =
# Check for updates
# -----------------
# GUI Option: Check automatically (toggle)
# Default: false.
-auto_update = false
+auto_update =
# ---< Network Settings >-----------------------------------------------------
# Generally these settings should not need to be changed from their defaults or
@@ -154,7 +154,7 @@ ip_filter =
# Set the maximum bandwidth to be consumed by the server.
# Leaving the setting blank or zero switches off bandwidth throttling.
# Default: 0.
-maximumbitrate = 0
+maximumbitrate =
# ---< Advanced HTTP and system settings >------------------------------------
@@ -162,7 +162,7 @@ maximumbitrate = 0
# --------------
# GUI Option: HTTP Engine v2 (toggle)
# Default: true.
-http_engine_v2 = true
+http_engine_v2 =
# Do not sleep
# ------------
@@ -170,7 +170,7 @@ http_engine_v2 = true
# If your host server has a power-saving mode, use this option to prevent
# the server hibernating or sleeping while it is streaming data.
# Default: false.
-prevents_sleep_mode = false
+prevents_sleep_mode =
# GUI Option: Default renderer when automatic detection fails (selector)
# PMS can recognize many renderers automatically. Sometimes a renderer will
@@ -184,13 +184,13 @@ renderer_default =
# to it. By settings this option to true, PMS will assume any renderer that
# connects is the default renderer.
# Default: false
-renderer_force_default = false
+renderer_force_default =
# ---< Plugins >--------------------------------------------------------------
# The directory where PMS can find the plugins.
# Default: "plugins".
-plugins = plugins
+plugins =
# ----------------------------------------------------------------------------
# Navigation/Share Settings Screen
@@ -203,7 +203,7 @@ plugins = plugins
# GUI Option: Generate Thumbnails
# Set whether or not to generate thumbnails of media files for the client.
# Default: true.
-thumbnails = true
+thumbnails =
# Thumbnail seeking position
# --------------------------
@@ -212,7 +212,7 @@ thumbnails = true
# thumbnail data, designed to pass over usual black screen before movies
# start.
# Default: 60 seconds.
-thumbnail_seek_pos = 60
+thumbnail_seek_pos =
# Use MPlayer for Thumbnails
# --------------------------
@@ -220,21 +220,21 @@ thumbnail_seek_pos = 60
# Whether or not to use MPlayer to generate the thumbnails for video;
# can produce better results than built-in method.
# Default: false, which will use the built-in method.
-use_mplayer_for_video_thumbs = false
+use_mplayer_for_video_thumbs =
# DVD thumbnails
# --------------
# GUI Option: DVD ISO thumbnails (toggle)
# Choose whether or not to show thumbnails of ISO images.
# Default: false.
-dvd_isos_thumbnails = false
+dvd_isos_thumbnails =
# Image thumbnails
# --------------
# GUI Option: Image thumbnails (toggle)
# Choose whether or not to show thumbnails of images.
# Default: true.
-image_thumbnails = true
+image_thumbnails =
# Album cover art
# ---------------
@@ -245,7 +245,7 @@ image_thumbnails = true
# 1 - download from Amazon
# 2 - download from Discogs
# Default: 0.
-audio_thumbnails_method = 0
+audio_thumbnails_method =
# Source of video cover art
# -------------------------
@@ -267,7 +267,7 @@ alternate_thumb_folder =
# extracted only when selected for viewing.
# Archives supported include zip, rar, cbr and possibly others.
# Default: false.
-enable_archive_browsing = false
+enable_archive_browsing =
# Hide Video settings
# -------------------
@@ -275,7 +275,7 @@ enable_archive_browsing = false
# Control visibility of the Video Settings folder on clients; contents
# of the folder allow direct editing of PMS settings for video.
# Default: false.
-hidevideosettings = false
+hidevideosettings =
# Hide Transcode folder
# ---------------------
@@ -283,7 +283,7 @@ hidevideosettings = false
# Control visibility of the Transcode folder on clients; contents of the
# folder provide control over transcoding of video.
# Default: false.
-hide_transcode_folder = false
+hide_transcode_folder =
# Transcode Folder Name
# ---------------------
@@ -297,7 +297,7 @@ transcode_folder_name =
# Choose whether or not to show file extensions when showing file name in
# client listings.
# Default: false.
-hide_extensions = false
+hide_extensions =
# Hide engine names
# -----------------
@@ -305,7 +305,7 @@ hide_extensions = false
# Choose whether or not to show transcoding engine names for video; see
# also "Hide Transcode Folder" setting.
# Default: false.
-hide_enginenames = false
+hide_enginenames =
# Hide non-media folders
# ----------------------
@@ -314,28 +314,28 @@ hide_enginenames = false
# Switching this on can slow down browsing in the client (folders must be checked
# for content first before showing them); using a cache (see below) can help.
# Default: false.
-hide_empty_folders = false
+hide_empty_folders =
# Show iTunes library
# -------------------
# GUI Option: Show iTunes library (toggle)
# Choose whether or not to show the iTunes library as a folder in PMS.
# Default: false.
-itunes = false
+itunes =
# Show iPhoto library
# -------------------
# GUI Option: Show iPhoto library (toggle)
# Choose whether or not to show the iPhoto library as a folder in PMS.
# Default: false.
-iphoto = false
+iphoto =
# Show Aperture library
# ---------------------
# GUI Option: Show aperture library (toggle)
# Choose whether or not to show the Aperture library as a folder in PMS.
# Default: false.
-aperture = false
+aperture =
# Enable cache
# ------------
@@ -344,14 +344,14 @@ aperture = false
# real-time. With a cache, additional information becomes available and
# the cache can be browsed directly.
# Default: false.
-usecache = false
+usecache =
# Hide cache folder
# -----------------
# GUI Option: Hide cache folder (toggle)
# Controls whether or not the cache can be browsed directly by the client.
# Default: false.
-hide_media_library_folder = false
+hide_media_library_folder =
# File ordering
# -------------
@@ -363,8 +363,8 @@ hide_media_library_folder = false
# 2 - By reverse date (oldest first)
# 3 - ASCIIbetical (i.e. using ASCII code values)
# 4 - Alphanumeric (AKA natural sort e.g. "Season 2" before "Season 10")
-# Default: 0.
-key_sort_method = 0
+# Default: 4.
+key_sort_method =
# ---< Shared folders >-------------------------------------------------------
@@ -388,7 +388,7 @@ folders =
# GUI Option: Ordered list of engines (selector)
# System generates list of available engines, list depends on host.
# Default: "mencoder,avsmencoder,tsmuxer,ffmpegvideo,ffmpegaudio,mplayeraudio,tsmuxeraudio,ffmpegwebvideo,vlcvideo,mencoderwebvideo,mplayervideodump,mplayerwebaudio,vlcaudio,ffmpegdvrmsremux,rawthumbs"
-engines = mencoder,avsmencoder,tsmuxer,ffmpegvideo,ffmpegaudio,mplayeraudio,tsmuxeraudio,ffmpegwebvideo,vlcvideo,mencoderwebvideo,mplayervideodump,mplayerwebaudio,vlcaudio,ffmpegdvrmsremux,rawthumbs
+engines =
# ----------------------------------------------------------------------------
# Transcoding Settings: Common settings
@@ -399,7 +399,7 @@ engines = mencoder,avsmencoder,tsmuxer,ffmpegvideo,ffmpegaudio,mplayeraudio,tsmu
# GUI Option: Transcode buffer maximum size (string)
# Size of buffer in MB before transmitting to client. Maximum value is 400.
# Default: 400.
-maxvideobuffer = 400
+maxvideobuffer =
# Cores for Transcoding
# ---------------------
@@ -414,14 +414,14 @@ nbcores =
# Makes PMS create virtual chapter markers in a video file. These let
# you jump to a specific point in a video.
# Default: false.
-chapter_support = false
+chapter_support =
# Chapters #--TRANSCODE--# folder support interval
# --------------------------------------------
# GUI Option: Chapters #--TRANSCODE--# folder support interval (string)
# Determines the interval time in minutes for virtual chapter markers.
# Default: 5.
-chapter_interval = 5
+chapter_interval =
# ---< Audio settings >-------------------------------------------------------
@@ -437,7 +437,7 @@ chapter_interval = 5
# The maximum number of channels used for AC3 transcoding.
# Do not change this value even if you use 2.0 speakers because of an MEncoder downmixing bug!
# Default: 6.
-audiochannels = 6
+audiochannels =
# AC3 transcoding audio bitrate
# -----------------
@@ -445,19 +445,19 @@ audiochannels = 6
# Specify the bitrate for AC3 transcoding; do not exceed the quality supported by the
# AV receiver or amplifier.
# Default: 640.
-audiobitrate = 640
+audiobitrate =
# Keep AC3 track
# ---------------
# GUI Option: Keep AC3 track (no re-encode, may cause inaudible dialog and A/V sync issues) (toggle)
# Default: true.
-mencoder_remux_ac3 = true
+mencoder_remux_ac3 =
# Keep DTS track
# ------------------
# GUI Option: Keep DTS track (no re-encode, compatible with AV receiver through optical or HDMI output) (toggle)
# Default: false.
-embed_dts_in_pcm = false
+embed_dts_in_pcm =
# Use LPCM for audio
# ---------------------------
@@ -467,7 +467,7 @@ embed_dts_in_pcm = false
# Bandwidth requirements are about 1.5 Mbit/s for 2.0 and 4.6 Mbit/s for 5.1 audio.
# Not suitable for Wi-Fi streaming!
# Default: false.
-mencoder_usepcm = false
+mencoder_usepcm =
# Use LPCM only for HQ audio
# ---------------------------
@@ -475,13 +475,13 @@ mencoder_usepcm = false
# Limit LPCM audio transcoding to high quality audio tracks (DTS, TrueHD, etc) only. Use AC3
# transcoding for others.
# Default: false.
-mencoder_usepcm_for_hq_audio_only = false
+mencoder_usepcm_for_hq_audio_only =
# Remux DVD
# ---------
# GUI Option: Remux DVD ISO video track (toggle)
# Default: true.
-mencoder_remux_mpeg2 = true
+mencoder_remux_mpeg2 =
# ---< Video quality settings >-----------------------------------------------
@@ -491,7 +491,7 @@ mencoder_remux_mpeg2 = true
# Sets the quality for MPEG-2 conversion; MPEG-2 is the fallback format if the client
# does not support a video format natively.
# Default: "keyint=5:vqscale=1:vqmin=2"
-mencoder_encode = keyint=5:vqscale=1:vqmin=2
+mencoder_encode =
# ---< Misc options >---------------------------------------------------------
@@ -499,7 +499,7 @@ mencoder_encode = keyint=5:vqscale=1:vqmin=2
# ---------------------------
# GUI Option: Definitely disable subtitles (toggle)
# Default: false.
-mencoder_disablesubs = false
+mencoder_disablesubs =
# Skip transcode for extensions
# -----------------------------
@@ -533,49 +533,49 @@ mencoder_mt =
# ----------------
# GUI Option: Skip loop filter
# Default: false.
-skiploopfilter = false
+skiploopfilter =
# A/V sync alternative true
# -------------------------
# GUI Option: A/V sync alternative
# Default: true.
-mencoder_nooutofsync = true
+mencoder_nooutofsync =
# Use Video Scaler
# ----------------
# GUI Option: Use Video Scaler
# Default: false.
-mencoder_scaler = false
+mencoder_scaler =
# GUI Option: Video scaler width
# Default: 0.
-mencoder_scalex = 0
+mencoder_scalex =
# GUI Option: Video scaler height
# Default: 0.
-mencoder_scaley = 0
+mencoder_scaley =
# Force framerate
# ---------------
# GUI Option: Force framerate
# Default: false.
-mencoder_forcefps = false
+mencoder_forcefps =
# Deinterlace filter
# ------------------
# GUI Option: Deinterlace filter
# Default: false.
-mencoder_yadif = false
+mencoder_yadif =
# Remux videos
# ------------
# GUI Option: Remux videos
# Default: true.
-mencoder_mux_compatible = true
+mencoder_mux_compatible =
# Codec specific parameters
# -------------------------
# GUI Option : Use application default codec parms
# Default: true.
-mencoder_intelligent_sync = true
+mencoder_intelligent_sync =
# GUI Option: Codec specific parameters (text)
# Sets additional codec-specific configuration options for MEncoder.
@@ -595,7 +595,8 @@ mencoder_decode =
# GUI Option: Audio language priority (list)
# A comma-separated list of language codes that defines the priority for
# MEncoder when choosing audio languages, where "loc" stands for the
-# preferred local language and "und" stands for "undefined". Can be empty.
+# preferred local language and "und" stands for "undefined".
+# XXX Can be empty, which pre-empts the default value.
# Default: a localized list (e.g. "loc,eng,fre,jpn,ger,und").
# mencoder_audiolangs =
@@ -607,7 +608,8 @@ mencoder_decode =
# GUI Option: Subtitle language priority (list)
# A comma-separated list of language codes that defines the priority for
# MEncoder when choosing subtitle languages, where "loc" stands for the
-# preferred local language and "und" stands for "undefined". Can be empty.
+# preferred local language and "und" stands for "undefined".
+# XXX Can be empty, which pre-empts the default value.
# Default: a localized list (e.g. "loc,eng,fre,jpn,ger,und").
# mencoder_sublangs =
@@ -615,7 +617,7 @@ mencoder_decode =
# Force subtitle language
# -----------------------
# GUI Option: Force subtitle language (string)
-# Can be empty.
+# XXX Can be empty, which pre-empts the default value.
# Default: the value of the language option, or "en".
# forced_sub_lang =
@@ -626,7 +628,7 @@ mencoder_decode =
# The tag string that identifies the subtitle language that will be forced
# upon MEncoder.
# Default: "forced".
-forced_sub_tags = forced
+forced_sub_tags =
# Audio language priority
# -----------------------
@@ -636,7 +638,8 @@ forced_sub_tags = forced
# subtitle language should be comma separated as a pair; individual pairs
# should be semicolon separated. "*" can be used to match any language,
# "loc" to match the local language. Subtitle language can be defined as
-# "off". Can be empty.
+# "off".
+# XXX Can be empty, which pre-empts the default value.
# Default: a localized list (e.g. "loc,off;jpn,loc;*,loc;*,*").
# mencoder_audiosublangs =
@@ -656,7 +659,7 @@ mencoder_subcp =
# needed to display subtitles in languages that read from right to left,
# like Arabic, Farsi, Hebrew, Urdu, etc.
# Default: false.
-mencoder_subfribidi = false
+mencoder_subfribidi =
# Subtitle font blank
# -------------------
@@ -683,13 +686,13 @@ mencoder_ass =
# -------------
# GUI Option: Fontconfig/Embedded fonts (toggle)
# Default: true.
-mencoder_fontconfig = true
+mencoder_fontconfig =
# Use embedded style
# ------------------
# GUI Option: Use embedded style (toggle)
# Default: true.
-mencoder_ass_defaultstyle = true
+mencoder_ass_defaultstyle =
# Subtitle colour
# ---------------
@@ -705,44 +708,44 @@ subs_color =
# GUI Option: Style font scale
# The font scale used for ASS subtitling.
# Default: 1.0.
-mencoder_ass_scale = 1.0
+mencoder_ass_scale =
# GUI Option: Styled font outline
# The outline parameter used for ASS subtitling.
# Default: 1.
-mencoder_ass_outline = 1
+mencoder_ass_outline =
# GUI Option: Styled font shadow
# The shadow parameter used for ASS subtitling.
# Default: 1.
-mencoder_ass_shadow = 1
+mencoder_ass_shadow =
# GUI Option: Styled margin
# The margin used for ASS subtitling.
# Default: 10.
-mencoder_ass_margin = 10
+mencoder_ass_margin =
# Plain font scale
# ----------------
# GUI Option: Plain font scale
# The subfont text scale parameter used for subtitling without ASS.
# Default: 3.
-mencoder_noass_scale = 3
+mencoder_noass_scale =
# GUI Option: Plain font outline
# The subfont outline parameter used for subtitling without ASS.
# Default: 1.
-mencoder_noass_outline = 1
+mencoder_noass_outline =
# GUI Option: Plain font blur
# The subfont blur parameter used for subtitling without ASS.
# Default: 1.
-mencoder_noass_blur = 1
+mencoder_noass_blur =
# GUI Option: Plain margin
# The subpos parameter used for subtitling without ASS.
# Default: 2.
-mencoder_noass_subpos = 2
+mencoder_noass_subpos =
# Load subtitles
# --------------
@@ -750,23 +753,23 @@ mencoder_noass_subpos = 2
# Choose whether PMS should check for external subtitle files with the same
# name as the media (*.srt, *.sub, *.ass, etc.).
# Default: true.
-autoloadsrt = true
+autoloadsrt =
# DVD/VOB subtitle quality
# ------------------------
# GUI Option: DVD/VOB subtitle quality
# Default: 3.
-mencoder_vobsub_subtitle_quality = 3
+mencoder_vobsub_subtitle_quality =
# Add borders
# -----------
# GUI Option: width
# Default: 0.
-mencoder_overscan_compensation_width = 0
+mencoder_overscan_compensation_width =
# GUI Option: height
# Default: 0.
-mencoder_overscan_compensation_height = 0
+mencoder_overscan_compensation_height =
# ----------------------------------------------------------------------------
# Transcoder Settings: Video decoder for tsMuxeR
@@ -776,19 +779,19 @@ mencoder_overscan_compensation_height = 0
# ---------------------
# GUI Option: Force FPS pased from FFmpeg in the meta file
# Default: true.
-tsmuxer_forcefps = true
+tsmuxer_forcefps =
# Mux all audio
# -------------
# GUI Option: Mux all audio tracks
# Default: false.
-tsmuxer_mux_all_audiotracks = false
+tsmuxer_mux_all_audiotracks =
# Audio resampling
# ----------------
# GUI Option: Automatic audio resampling (toggle)
# Default: true.
-audio_resample = true
+audio_resample =
# ============================================================================
# Additional settings
@@ -796,32 +799,32 @@ audio_resample = true
# ---< Active - but not settable in GUI >-------------------------------------
# Default: 850.
-charsetencoding = 850
+charsetencoding =
# Set to "true" if PMS should pass the flag "convertfps=true" to AviSynth.
# Default: true.
-avisynth_convertfps = true
+avisynth_convertfps =
# The template for the AviSynth script. The script string may contain the
# character "\u0001", which will be treated as newline character.
-avisynth_script = #AviSynth script is now fully customisable !\u0001#You must use the following variables (\"clip\" being the avisynth variable of the movie):\u0001#<movie>: insert the complete DirectShowSource instruction [ clip=DirectShowSource(movie, convertfps) ]\u0001#<sub>: insert the complete TextSub/VobSub instruction if there's any detected srt/sub/idx/ass subtitle file\u0001#<moviefilename>: variable of the movie filename, if you want to do all this by yourself\u0001#Be careful, the custom script MUST return the clip object\u0001<movie>\u0001<sub>\u0001return clip
+avisynth_script =
# Default: false.
-transcode_block_multiple_connections = false
+transcode_block_multiple_connections =
# Default: true.
-transcode_keep_first_connection = true
+transcode_keep_first_connection =
# Default: "-threads 2 -g 1 -qscale 1 -qmin 2"
-ffmpeg = -threads 2 -g 1 -qscale 1 -qmin 2
+ffmpeg =
# The maximum size (in MB) that PMS should use for buffering audio.
# Default: 100.
-maxaudiobuffer = 100
+maxaudiobuffer =
# The minimum size (in MB) that PMS should use for the streaming media buffer.
# Default: 1.
-minwebbuffer = 1
+minwebbuffer =
# ---< Old deprecated options >-----------------------------------------------
#turbomode = false
View
10 src/main/java/net/pms/configuration/PmsConfiguration.java
@@ -481,7 +481,7 @@ public String getFlacPath() {
* @return True if tsMuxeR should parse fps from FFmpeg.
*/
public boolean isTsmuxerForceFps() {
- return configuration.getBoolean(KEY_TSMUXER_FORCEFPS, true);
+ return getBoolean(KEY_TSMUXER_FORCEFPS, true);
}
/**
@@ -710,7 +710,7 @@ public String getMencoderAssScale() {
* @return True if "ac3_fixed" should be used.
*/
public boolean isMencoderAc3Fixed() {
- return configuration.getBoolean(KEY_MENCODER_AC3_FIXED, false);
+ return getBoolean(KEY_MENCODER_AC3_FIXED, false);
}
/**
@@ -1648,7 +1648,7 @@ public void setMencoderNoOutOfSync(boolean value) {
}
public boolean getTrancodeBlocksMultipleConnections() {
- return configuration.getBoolean(KEY_TRANSCODE_BLOCKS_MULTIPLE_CONNECTIONS, false);
+ return getBoolean(KEY_TRANSCODE_BLOCKS_MULTIPLE_CONNECTIONS, false);
}
public void setTranscodeBlocksMultipleConnections(boolean value) {
@@ -1656,7 +1656,7 @@ public void setTranscodeBlocksMultipleConnections(boolean value) {
}
public boolean getTrancodeKeepFirstConnections() {
- return configuration.getBoolean(KEY_TRANSCODE_KEEP_FIRST_CONNECTION, true);
+ return getBoolean(KEY_TRANSCODE_KEEP_FIRST_CONNECTION, true);
}
public void setTrancodeKeepFirstConnections(boolean value) {
@@ -2215,7 +2215,7 @@ public String getProfileName() {
}
public boolean isAutoUpdate() {
- return Build.isUpdatable() && configuration.getBoolean(KEY_AUTO_UPDATE, false);
+ return Build.isUpdatable() && getBoolean(KEY_AUTO_UPDATE, false);
}
public void setAutoUpdate(boolean value) {
View
4 src/main/java/net/pms/configuration/RendererConfiguration.java
@@ -362,7 +362,7 @@ public RendererConfiguration(File f) throws ConfigurationException {
}
mimes = new HashMap<String, String>();
- String mimeTypes = configuration.getString(MIME_TYPES_CHANGES, null);
+ String mimeTypes = getString(MIME_TYPES_CHANGES, null);
if (StringUtils.isNotBlank(mimeTypes)) {
StringTokenizer st = new StringTokenizer(mimeTypes, "|");
@@ -380,7 +380,7 @@ public RendererConfiguration(File f) throws ConfigurationException {
}
DLNAPN = new HashMap<String, String>();
- String DLNAPNchanges = configuration.getString(DLNA_PN_CHANGES, null);
+ String DLNAPNchanges = getString(DLNA_PN_CHANGES, null);
if (DLNAPNchanges != null) {
logger.trace("Config DLNAPNchanges: " + DLNAPNchanges);
Please sign in to comment.
Something went wrong with that request. Please try again.