diff --git a/.project b/.project
new file mode 100644
index 0000000..e198c64
--- /dev/null
+++ b/.project
@@ -0,0 +1,11 @@
+
+
+ UMS_ynh
+
+
+
+
+
+
+
+
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..38846e2
--- /dev/null
+++ b/README.md
@@ -0,0 +1,80 @@
+# Universal Media Server (UMS) YunoHost
+
+**WORK IN PROGRESS: This app does not work yet and does not install or remove properly : Use with caution!!**
+
+[](https://dash.yunohost.org/appci/app/UMS)  
+[](https://install-app.yunohost.org/?app=UMS)
+
+*[Lire ce readme en français.](./README_fr.md)*
+
+> *This package allows you to install UMS quickly and simply on a YunoHost server.
+If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
+
+## Overview
+Quick description of this app.
+
+**Shipped version:** 10.4.1
+
+## Screenshots
+
+
+
+## Demo
+
+* [Official demo](Link to a demo site for this app.)
+
+## Configuration
+
+How to configure this app: From an admin panel, a plain file with SSH, or any other way.
+
+## Documentation
+
+ * Official documentation: Link to the official documentation of this app
+ * YunoHost documentation: If specific documentation is needed, feel free to contribute.
+
+## YunoHost specific features
+
+#### Multi-user support
+
+Are LDAP and HTTP auth supported?
+Can the app be used by multiple users?
+
+#### Supported architectures
+
+**Only x_86_64 has been tested so far**
+* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/UMS/)
+* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/UMS/)
+
+## Limitations
+
+* Any known limitations : a lot :)
+
+## Additional information
+
+* Must have its own domain (no subdir like mydomain.tld/ums)
+* No multiinstance
+* has been tested only on x86_64 so far
+
+**More info on the documentation page:**
+https://yunohost.org/packaging_apps
+
+## Links
+
+ * Report a bug: https://github.com/YunoHost-Apps/UMS_ynh/issues
+ * App website: Link to the official website of this app.
+ * Upstream app repository: Link to the official repository of the upstream app.
+ * YunoHost website: https://yunohost.org/
+
+---
+
+## Developer info
+
+**Only if you want to use a testing branch for coding, instead of merging directly into master.**
+Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/UMS_ynh/tree/testing).
+
+To try the testing branch, please proceed like that.
+```
+sudo yunohost app install https://github.com/YunoHost-Apps/UMS_ynh/tree/testing --debug
+or
+sudo yunohost app upgrade UMS -u https://github.com/YunoHost-Apps/UMS_ynh/tree/testing --debug
+```
diff --git a/README_fr.md b/README_fr.md
new file mode 100644
index 0000000..90de1cd
--- /dev/null
+++ b/README_fr.md
@@ -0,0 +1,84 @@
+# Universal Media Server (UMS) pour YunoHost
+
+**WORK IN PROGRESS : Le package n'est pas stable ni fonctionnel actuellement, aucune garantie de fonctionnement, d'installation sans souci ni d'ailleurs de désinstallation sans soucis**
+
+[](https://dash.yunohost.org/appci/app/UMS)  
+[](https://install-app.yunohost.org/?app=UMS)
+
+*[Read this readme in english.](./README.md)*
+
+> *Ce package vous permet d'installer UMS rapidement et simplement sur un serveur YunoHost.
+Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install) pour apprendre comment l'installer.*
+
+## Vue d'ensemble
+Description rapide de cette application.
+
+**Version incluse :** 10.4.1
+
+## Captures d'écran
+
+
+
+## Démo
+
+* [Démo officielle](Lien vers un site de démonstration de cette application.)
+
+## Configuration
+
+Comment configurer cette application : via le panneau d'administration, un fichier brut en SSH ou tout autre moyen.
+
+## Documentation
+
+ * Documentation officielle : Lien vers la documentation officielle de cette application.
+ * Documentation YunoHost : Si une documentation spécifique est nécessaire, n'hésitez pas à contribuer.
+
+## Caractéristiques spécifiques YunoHost
+
+#### Support multi-utilisateur
+
+* L'authentification LDAP et HTTP est-elle prise en charge ?
+* L'application peut-elle être utilisée par plusieurs utilisateurs ?
+
+#### Architectures supportées
+
+**Développement en cours sur x86_64. Aucun tests effectués encore sur d'autres architectures**
+
+* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/UMS/)
+* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/UMS/)
+
+## Limitations
+
+* Limitations connues: Ne fonctionne pas
+
+## Informations additionnelles
+
+* Autres informations que vous souhaitez ajouter sur cette application.
+doit etre sur un domaine root
+pas de multiinstance
+regarder les logs => debug log
+Tester uniquement sur x86_64 pour l'instant
+
+
+**Plus d'informations sur la page de documentation :**
+https://yunohost.org/packaging_apps
+
+## Liens
+
+ * Signaler un bug : https://github.com/YunoHost-Apps/UMS_ynh/issues
+ * Site de l'application : Lien vers le site officiel de cette application.
+ * Dépôt de l'application principale : Lien vers le dépôt officiel de l'application principale.
+ * Site web YunoHost : https://yunohost.org/
+
+---
+
+## Informations pour les développeurs
+
+**Seulement si vous voulez utiliser une branche de test pour le codage, au lieu de fusionner directement dans la banche principale.**
+Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/UMS_ynh/tree/testing).
+
+Pour essayer la branche testing, procédez comme suit.
+```
+sudo yunohost app install https://github.com/YunoHost-Apps/UMS_ynh/tree/testing --debug
+ou
+sudo yunohost app upgrade UMS -u https://github.com/YunoHost-Apps/UMS_ynh/tree/testing --debug
+```
diff --git a/check_process.default b/check_process.default
new file mode 100644
index 0000000..7a3ccdd
--- /dev/null
+++ b/check_process.default
@@ -0,0 +1,32 @@
+# See here for more information
+# https://github.com/YunoHost/package_check#syntax-check_process-file
+
+# Move this file from check_process.default to check_process when you have filled it.
+
+;; Test complet
+ ; Manifest
+ domain="domain.tld" (DOMAIN)
+ is_public=1 (PUBLIC|public=1|private=0)
+ port="666" (PORT)
+ ; Checks
+ pkg_linter=1
+#Only work w/ root domain
+ setup_sub_dir=0
+ setup_root=1
+ setup_nourl=0
+ setup_private=1
+ setup_public=1
+ upgrade=1
+ upgrade=1 from_commit=CommitHash
+ backup_restore=1
+ multi_instance=0
+ port_already_use=1
+ change_url=1
+;;; Options
+Email=
+Notification=none
+;;; Upgrade options
+ ; commit=CommitHash
+ name=Name and date of the commit.
+ manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666&
+
diff --git a/conf/UMS.conf b/conf/UMS.conf
new file mode 100644
index 0000000..fde13ea
--- /dev/null
+++ b/conf/UMS.conf
@@ -0,0 +1,1758 @@
+# ============================================================================
+# Configuration file for UMS
+# ============================================================================
+# Introduction:
+#
+# This "UMS.conf" file holds the configuration settings for UMS. These
+# settings are usually set using the UMS graphical user interface. If you are
+# running UMS on a headless system, you may not be able to kick off the GUI;
+# instead, you can edit the UMS.conf file to control the operation of UMS. A
+# restart of UMS is required after editing this file.
+#
+# Commenting out an option or leaving it empty forces the UMS default
+# that is indicated.
+#
+# Key value pairs
+# ---------------
+# The configuration file contains key/value pairs separated by an equals (=)
+# sign; the key on the left and the value on the right. The value is edited in
+# this file or set using the UMS GUI and saved. The value can take a number of
+# different forms:
+#
+# - toggle: a checkbox or boolean; either "true" or "false"
+# - selector: a dropdown menu in the GUI, generating a string or numeric
+# value. Available options will usually be stated below
+# - string: a short text or a number
+# - text: a longer text with embedded line breaks
+# - list: a comma-separated list of strings or numbers
+#
+# In the file below the value type is shown after the Default label; strings
+# have quotation marks, toggles are true or false, the others are explained.
+#
+# ----------------------------------------------------------------------------
+# General Configuration Tab
+# ----------------------------------------------------------------------------
+# ---< General Settings >-----------------------------------------------------
+
+# Server name
+# -----------
+# The server name is displayed in the renderer before the profile name.
+# Default: "Universal Media Server"
+server_name =
+
+# Append profile name
+# -------------------
+# Whether the profile name should be appended to the server name when
+# displayed on the renderer.
+# Default: false
+append_profile_name =
+
+# Language
+# --------
+# The language to use for the GUI and other dialogues.
+# The following translations are available:
+# af = Afrikaans
+# ar = Arabic
+# bn = Bengali (Bangladesh)
+# pt-BR = Brazilian Portuguese
+# bg = Bulgarian
+# ca = Catalan
+# zh-Hans = Chinese (Simplified)
+# zh-Hant = Chinese (Traditional)
+# hr = Croatian
+# cs = Czech
+# da = Danish
+# nl = Dutch
+# en-US = English (US)
+# en-GB = English (UK)
+# fi = Finish
+# fr = French
+# de = German
+# el = Greek
+# iw = Hebrew
+# hu = Hungarian
+# is = Icelandic
+# it = Italian
+# ja = Japanese
+# ko = Korean
+# no = Norwegian
+# fa = Persian
+# pl = Polish
+# pt = Portuguese
+# ro = Romanian
+# ru = Russian
+# sr = Serbian (Cyrillic)
+# sk = Slovak
+# sl = Slovenian
+# es = Spanish
+# sv = Swedish
+# th = Thai
+# tr = Turkish
+# uk = Ukrainian
+# vi = Vietnamese
+
+# An IETF language tag is used to set the language, see
+# http://en.wikipedia.org/wiki/IETF_language_tag
+# Default: "", which means UMS will follow the locale.
+language =
+
+# Start minimized to system tray
+# ------------------------------
+# Sets whether the GUI should start when the program is launched.
+# On headless systems, this should be set to true.
+# On macOS this is overridden to false.
+# Default: false
+minimized = true
+
+# Check for updates on program start
+# ----------------------------------
+# Default: false.
+auto_update =
+
+# Hide advanced options
+# ---------------------
+# Default: false.
+hide_advanced_options =
+
+# Run wizard on startup
+# ---------------------
+# When true, this offers to run a wizard with the most frequently-changed
+# settings to allow users to quickly customize UMS without digging through
+# all of our advanced settings
+# Default: true until it has run once
+run_wizard =
+
+# Only run a single instance of UMS
+# ---------------------------------
+# When true, UMS will allow only one instance by shutting down the first one
+# when a second one is launched.
+# Note: UMS must be run with administrator rights for this to work.
+# Default: true
+single_instance =
+
+# ---< Network Settings >-----------------------------------------------------
+# Generally these settings should not need to be changed from their defaults
+# or settings determined automatically by the system. Changing them may make
+# your UMS server disappear from your other devices.
+
+# Force networking on interface
+# -----------------------------
+# Specifies the network interface to attach to, should only be
+# relevant when the server has more than one network interface and UMS picks
+# the wrong one. The selector displays all available network interfaces.
+# E.g. network_interface = Intel(R) Dual Band Wireless-AC 3160
+# NOTE: Do not change it directly here but use the selector in the UMS GUI.
+# Default: "", which means UMS will automatically select a network interface.
+network_interface =
+
+# Force IP of the server
+# ----------------------
+# A network interface can have multiple IP addresses associated with it.
+# This sets which one should be used.
+# Default: "", which means UMS will automatically select an IP address.
+hostname =
+
+# Force port of the server
+# ------------------------
+# Sets the port UMS will listen on; usually should not need to be set unless
+# another service has already grabbed the port.
+# Default: "", which means UMS will automatically use port 5001.
+port =
+
+# Use an IP filter (whitelist)
+# ----------------------------
+# Set the IP address(es) and/or IP address range(s) of the clients permitted
+# to connect. When no filter is specified, UMS will allow any IP address to
+# connect to the service.
+# Multiple IP addresses and/or IP address ranges can be separated with a comma
+# or semicolon e.g.: 127.0.0.1,192.168.0-1.*
+# Default: ""
+ip_filter =
+
+# Maximum bandwidth in Mb/s
+# -------------------------
+# Set the maximum bandwidth to be consumed by the server.
+# Leaving the setting blank or zero switches off bandwidth throttling.
+# Note that this is a general setting for all renderers connected to the UMS
+# wired and wireless and each renderer can have some limitation.
+# Using the automatic maximum bandwidth is highly recommended.
+# Default: 90
+maximum_bitrate =
+
+# Use automatic maximum bandwidth
+# -------------------------------
+# When this setting is enabled, we estimate the speed of the connection to the
+# renderer and limit the bandwidth accordingly. User can set it false and try
+# to set the maximum_bitrate manually.
+# Default: true
+automatic_maximum_bitrate =
+
+# ALIVE delay
+# -----------
+# Customize the delay between broadcasting ALIVE messages.
+# The value should be between 30000 to 180000 (30 to 180 seconds).
+# Default: 0 (automatic)
+ALIVE_delay =
+
+# ---< Advanced HTTP and system settings >------------------------------------
+
+# HTTP Engine V2
+# --------------
+# Default: true
+http_engine_v2 =
+
+# Prevent system idle sleep
+# -------------------------
+# If your UMS host has a power-saving mode, use this option to prevent the
+# system from hibernating or sleeping. Currently only Windows and macOS are
+# supported. There are three modes:
+#
+# - Never: UMS doesn't interfere with system idle sleep.
+# - Playback: UMS prevents the system from going to sleep while playback from
+# UMS is active.
+# - Running: UMS prevents the system from going to sleep while UMS is running.
+#
+# Default: Playback
+prevent_sleep =
+
+# Selected renderers
+# ------------------
+# A comma-separated list of renderer configurations to load by renderer name as
+# defined in the configuration file. Two special values exist, "All renderers"
+# and "None". Group names made of the first word in the renderer name can be
+# used to specify all renderers in that group, e.g. "Panasonic".
+# Example: Yamaha RX-A1010, Panasonic
+# Default: "All renderers"
+selected_renderers =
+
+# Default renderer when automatic detection fails
+# -----------------------------------------------
+# UMS can recognize many renderers automatically. Sometimes a renderer will
+# connect which UMS does not recognize. This option defines which renderer UMS
+# should assume.
+# Default: "", which means UMS will assume the "Unknown renderer".
+renderer_default =
+
+# Force default renderer (disable automatic detection)
+# ----------------------------------------------------
+# By default UMS tries to automatically detect what renderers try to connect
+# to it. When this is true, UMS will assume any renderer that connects is the
+# default renderer.
+# Default: false
+renderer_force_default =
+
+# ChromeCast Extension (non-GUI)
+# ------------------------------
+# Whether to load Chromecast extension API or not.
+# Default: false
+chromecast_extension =
+
+# Chromecast Debug (non-GUI)
+# --------------------------
+# Whether to enable ChromeCast debugging.
+# Default: false
+chromecast_debug =
+
+# Enable external network
+# -----------------------
+# Whether to enable functionality that uses external networks like the
+# Internet. It should be disabled if the computer has no Internet access.
+# Default: true
+external_network =
+
+# ----------------------------------------------------------------------------
+# Navigation/Share Settings Tab
+# ----------------------------------------------------------------------------
+
+# ---< Thumbnails >-----------------------------------------------------------
+
+# Generate thumbnails
+# -------------------
+# Whether to generate thumbnails of media files.
+# Default: true
+generate_thumbnails =
+
+# Thumbnail seeking position (in seconds)
+# ---------------------------------------
+# The amount of time (in seconds) to skip in videos before generating
+# thumbnails, designed to avoid the usual black screen before videos start.
+# Default: "4"
+thumbnail_seek_position =
+
+# Image thumbnails
+# ----------------
+# Choose whether or not to show thumbnails of images.
+# Default: true
+image_thumbnails =
+
+# Use MPlayer for video thumbnails
+# --------------------------------
+# 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 =
+
+# DVD ISO thumbnails
+# ------------------
+# Whether or not to generate DVD video track thumbnails.
+# Default: true
+dvd_isos_thumbnails =
+
+# Audio thumbnails import
+# -----------------------
+# Choose how to get thumbnails for audio files (cover art), value is a number
+# from the following list (equivalent to GUI dropdown order):
+# 0: None
+# 1: Download from Cover Art Archive
+# Default: 1
+audio_thumbnails_method =
+
+# Alternate video cover art folder
+# --------------------------------
+# Specify a folder below which appropriate cover art for videos might be
+# located. Providing no value (default) effectively disables video thumbnails.
+# The GUI offers a file-system navigator which generates an absolute path.
+# Default: ""
+alternate_thumb_folder =
+
+# ---< File sorting / naming >------------------------------------------------
+
+# File order
+# ----------
+# Determines the order of listed content when a client browses a folder; the
+# GUI selector generates a numeric indicator according to the following.
+# 0: Alphabetical A-Z
+# 1: By date (newest first)
+# 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")
+# 5: Random
+# 6: No Sorting
+# Default: 4
+sort_method =
+
+# Ignore the word "the" while sorting
+# -----------------------------------
+# Controls whether or not to ignore the word "a" and "the" while sorting files.
+# Default: true
+ignore_the_word_the =
+
+# Prettify filenames (does not rename the actual files)
+# -----------------------------------------------------
+# Controls whether or not to automatically rename filenames to be more
+# readable by removing superfluous information from them such as release
+# group, quality, source, etc.
+# Default: false
+prettify_filenames =
+
+# Use info from www.OpenSubtitles.org
+# -----------------------------------
+# This appends episode titles and movie years from IMDb to the file name.
+# For example, the file "Show.Name.S01E01.HDTV-GroupName" will show up as
+# "Show Name - 101 - Episode Title".
+# Default: true if filename prettifying is enabled
+use_imdb_info =
+
+# ---< Virtual folders >------------------------------------------------------
+# Instructs the system on how to find media and various controls on giving
+# clients access to transcoding facilities and features.
+
+# Hide file extensions
+# --------------------
+# Choose whether or not to show file extensions when showing file name in
+# client listings.
+# Default: true
+hide_extensions =
+
+# Do not add engine names to filenames
+# ------------------------------------
+# Choose whether or not to show transcoding engine names for video; see also
+# "Hide Transcode Folder" setting.
+# Default: true
+hide_enginenames =
+
+# Add subtitles information to video names
+# ----------------------------------------
+# Choose what level of subtitles information that should be added to video
+# names. The following options are available:
+#
+# none = Don't show subtitles information
+# basic = Show only basic subtitles information
+# full = Show full subtitles information
+#
+# Default: basic
+subs_info_level =
+
+# Hide empty folders
+# ------------------
+# Choose whether or not to show folders which contain no viewable content.
+# Switching this on slows 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 =
+
+# Show iTunes library
+# -------------------
+# Choose whether or not to show the iTunes library as a folder in UMS.
+# Default: false
+show_itunes_library =
+
+# Show iPhoto library
+# -------------------
+# Choose whether or not to show the iPhoto library as a folder in UMS.
+# Default: false
+show_iphoto_library =
+
+# Show Aperture library
+# ---------------------
+# Choose whether or not to show the Aperture library as a folder in UMS.
+# Default: false
+show_aperture_library =
+
+# Enable the cache
+# ----------------
+# Without a cache, when the client browses a folder, content is listed in
+# real-time. With a cache, additional information becomes available and the
+# cache can be browsed directly.
+# Default: true
+use_cache =
+
+# Show the "Media Library" folder
+# -------------------------------
+# Whether the Media Library folder is shown on clients.
+# Default: true
+show_media_library_folder = false=
+
+# Browse compressed archives (zip, rar, etc.)
+# -------------------------------------------
+# Should the system browse compressed files looking for media? Files are
+# extracted only when selected for viewing.
+# Supported formats: cbr, cbz, rar and zip.
+# Default: false
+enable_archive_browsing =
+
+# Show the "Server Settings" folder
+# ---------------------------------
+# Whether the Server Settings folder is shown on clients; contents of the folder
+# allow direct editing of some UMS settings.
+# Default: false
+show_server_settings_folder =
+
+# Show the "Transcode" folder
+# ---------------------------
+# Whether the Transcode folder is shown on clients; contents of the folder
+# provide control over transcoding of video.
+# Default: true
+show_transcode_folder =
+
+# Show the "Live Subtitles" folder
+# --------------------------------
+# Whether to show the Live Subtitles folder on clients; contents of the folder
+# provide access to stream subtitles from the Internet via www.opensubtitles.org
+# Default: false
+show_live_subtitles_folder = true
+
+# Minimum item limit before using A-Z folders
+# -------------------------------------------
+# Specifies how many items must be in a folder before we create virtual
+# subfolders for each letter.
+# Default: 10000
+atz_limit =
+
+# Show the "New Media" folder
+# ---------------------------
+# Whether the New Media folder is shown on clients.
+# Contents of the folder provide access to all unplayed (new) media.
+# Default: false
+show_new_media_folder =
+
+# Enable video resuming
+# ---------------------
+# Whether to show virtual "Resume:" files to allow resuming videos.
+# Default: true
+resume =
+
+# Show the "Recently Played" folder
+# ---------------------------------
+# Whether the Recently Played folder is shown on clients.
+# Contents of the folder provide access to the most recently played media.
+# Default: true
+show_recently_played_folder =
+
+# Fully played action
+# -------------------
+# What to do with a file after it has been fully played.
+# The following options are available:
+#
+# 0 = Do nothing
+# 1 = Mark media (Add a thumbnail overlay or prefix the media name)
+# 2 = Hide media
+# 3 = Move file to a different folder
+# 4 = Move file to recycle/trash bin. It will not do anything if this isn't
+# possible
+#
+# Default: 1
+fully_played_action =
+
+# Fully played output directory
+# -----------------------------
+# The directory to move fully played files to if "Fully played action" is 3.
+#
+# Default: ""
+fully_played_output_directory =
+
+# Minimum watched play time (non-GUI)
+# -----------------------------------
+# The minimum time in milliseconds to wait after playback is started before
+# marking a file as watched and before creating a resumable file.
+# Default: 30000 (30 seconds)
+minimum_watched_play_time =
+
+# Scan shared folders on startup
+# ----------------------------------------
+# Whether to scan shared folders on startup.
+# Default: true
+scan_shared_folders_on_startup =
+
+# ---< Shared folders >-------------------------------------------------------
+
+# Shared folders
+# --------------
+# A comma-separated list of absolute path names.
+# If empty, the default media folders on your computer will be chosen. That is:
+# On macOS:
+# - /user/Movies
+# - /user/Music
+# - /user/Pictures
+# On Windows:
+# - /user/Music
+# - /user/Pictures
+# - /user/Videos
+# On Linux:
+# - /user
+# Default: ""
+folders = /home/yunohost.multimedia/share
+
+# Monitor played status of files
+# ------------------------------
+# List of folders to be monitored for changes. Folders that aren't monitored
+# won't register new media with the New Media folder.
+# Default: ""
+folders_monitored = /home/yunohost.multimedia/share
+
+# ----------------------------------------------------------------------------
+# Transcoding Settings Tab
+# ----------------------------------------------------------------------------
+
+# List of enabled transcoding engines
+# -----------------------------------
+# The list is in no particular order, and can be set to "None" to disable all
+# transcoding engines.
+# Default: "FFmpegVideo,MEncoderVideo,tsMuxeRVideo,FFmpegAudio,tsMuxeRAudio,FFmpegWebVideo,VLCWebVideo,VLCVideoStreaming,MEncoderWebVideo,VLCAudioStreaming,DCRaw"
+engines =
+
+# Ordered list of transcoding engines priority
+# --------------------------------------------
+# All engines should be included regardless of their enabled status. Set blank
+# to have the default list generated upon next start.
+# Default: "FFmpegVideo,MEncoderVideo,tsMuxeRVideo,AviSynthFFmpeg,AviSynthMEncoder,FFmpegAudio,tsMuxeRAudio,FFmpegWebVideo,VLCWebVideo,VLCVideoStreaming,MEncoderWebVideo,VLCAudioStreaming,VLCVideo,DCRaw"
+engines_priority =
+
+# ----------------------------------------------------------------------------
+# Transcoding Settings Tab: Common Transcode Settings Page
+# ----------------------------------------------------------------------------
+
+# ---< General settings >-----------------------------------------------------
+
+# Maximum transcode buffer size in MB (recommended: 200)
+# ------------------------------------------------------
+# Size of buffer in MB before transmitting to client. The maximum value is 400
+# if the program memory is set to its default value (768).
+# Default: 200
+maximum_video_buffer_size =
+
+# CPU threads to use when enabled for engine
+# ------------------------------------------
+# Choose the number of processor cores that should be used for transcoding.
+# Default: "", which will use automatic-detection.
+number_of_cpu_cores =
+
+# Chapters support in the #--TRANSCODE--# folder
+# ----------------------------------------------
+# Makes UMS create virtual chapter markers in a video file. These let
+# you jump to a specific point in a video.
+# Default: false
+chapter_support =
+
+# Chapters support in the #--TRANSCODE--# folder interval
+# -------------------------------------------------------
+# Determines the interval time in minutes for virtual chapter markers.
+# Default: 5
+chapter_interval =
+
+# Disable subtitles
+# -----------------
+# Default: false
+disable_subtitles =
+
+# ---< Video Settings Tab >---------------------------------------------------
+
+# Enable GPU acceleration
+# -----------------------
+# Use GPU (video card) acceleration for FFmpeg, AviSynth and VLC engines
+# Note: Works only on video cards with GPU acceleration supported.
+# Default: false
+gpu_acceleration =
+
+# Lossless DVD video playback
+# ---------------------------
+# Default: true
+mencoder_remux_mpeg2 =
+
+# ---< Misc settings >--------------------------------------------------------
+
+# Transcoding quality (MPEG-2)
+# ----------------------------
+# Sets the quality for MPEG-2 conversion; MPEG-2 is the fallback format if the
+# client does not support a video format natively.
+# Automatic options are highly recommended since they will adapt based on the
+# video being played to ensure the highest quality for your network.
+# Note: This is also used by FFmpeg and AviSynth/FFmpeg engines, not just
+# MEncoder. Should probably be renamed to something like mpeg2_settings in the
+# future.
+# Default: "Automatic (Wired)"
+mpeg2_main_settings =
+
+# Transcoding quality (H.264)
+# ---------------------------
+# Sets the quality for H.264 conversion.
+# Possible values are either "Automatic (Wired)", "Automatic (Wireless)", or a
+# CRF (Constant Rate Factor) value.
+# Automatic options are highly recommended since they will adapt based on the
+# video being played to ensure the highest quality for your network.
+# Default: "Automatic (Wired)"
+x264_constant_rate_factor =
+
+# Skip transcoding for the following extensions (comma-separated)
+# ---------------------------------------------------------------
+# Do not transcode files with an extension in the list.
+# Asterisk (*) means do not transcode anything.
+# Note: This overrides the renderer configuration. It should only be used for
+# troubleshooting when you are not able to edit the renderer configuration.
+# Default: ""
+disable_transcode_for_extensions =
+
+# Force transcoding for the following extensions (comma-separated)
+# ----------------------------------------------------------------
+# Always transcode files with an extension in the list.
+# Asterisk (*) means transcode everything.
+# Note: This overrides the renderer configuration. It should only be used for
+# troubleshooting when you are not able to edit the renderer configuration.
+# Default: ""
+force_transcode_for_extensions =
+
+# Disable all transcoding
+# -----------------------
+# Do not transcode under any circumstances.
+# Warning: This will probably mean that your renderer will fail to play many
+# files or fail to show subtitles, but there are cases where this is still
+# preferable.
+# Default: false
+disable_transcoding =
+
+# ---< Audio settings tab >---------------------------------------------------
+
+# Universal Media Server decides what to do with the audio track by checking
+# options in the following order:
+# 1. (AC-3 and DTS tracks) Keep DTS track / Keep AC-3 track => remuxes track
+# as-is
+# 2. (all tracks) Use LPCM transcoding => transcodes track with LPCM transport
+# (lossless)
+# 3. (all tracks) Use AC-3 transcoding => transcodes track with AC-3 transport
+# (lossy)
+
+# Maximum number of audio channels to output for AC-3 re-encoding
+# ---------------------------------------------------------------
+# The maximum number of channels used for AC-3 transcoding. Do not change this
+# value even if you use 2.0 speakers because of a MEncoder downmixing bug!
+# Any value different of 2 or 6 will be deemed as having 6 channels.
+# Default: 6
+audio_channels =
+
+# Use LPCM for audio
+# ------------------
+# Choose whether or not the Pulse Code Modulation (PCM) audio format should be
+# used instead of AC-3 with the MEncoder transcoding engine. Offers lossless
+# transcoding quality but higher bitrate. Bandwidth requirements are around 1.5
+# Mbit/s for 2.0 and 4.6 Mbit/s for 5.1 audio. Not suitable for Wi-Fi
+# streaming.
+# Default: false
+audio_use_pcm =
+
+# Automatic audio resampling
+# --------------------------
+# Enable automatic audio resampling function used by FFmpegAudio for LPCM.
+# Default: true
+audio_resample =
+
+# Keep AC-3 tracks
+# ----------------
+# Remux AC-3 instead of transcoding it.
+# Default: true
+audio_remux_ac3 =
+
+# Keep DTS tracks
+# ---------------
+# Remux DTS instead of transcoding it.
+# Default: false
+audio_embed_dts_in_pcm =
+
+# Encoded audio passthrough for AC-3 and DTS
+# ------------------------------------------
+# Encoded audio passthrough is used to embed HD Audio data like AC-3 and DTS
+# into a LPCM stream, according to IEC-61937, used by S/PDIF.
+# Default: false
+encoded_audio_passthrough =
+
+# AC-3 (Dolby Digital) re-encoding audio bitrate (in Kbps) (e.g. 192, 384, 448)
+# -----------------------------------------------------------------------------
+# The bitrate for AC-3 audio transcoding.
+# Do not exceed the quality supported by the AV receiver or amplifier.
+# Default: 448
+audio_bitrate =
+
+# Audio language priority
+# -----------------------
+# A comma-separated list of language codes that defines the priority for
+# MEncoder when choosing audio languages, where "und" stands for "undefined".
+# XXX Can be empty, which overrides the default value.
+# Default: a localized list (e.g. "eng,fre,jpn,ger,und").
+# audio_languages =
+
+# ---< Subtitles settings tab >-----------------------------------------------
+
+# Subtitles language priority
+# ---------------------------
+# A comma-separated list of language codes that defines the priority for
+# MEncoder when choosing subtitles languages, where "und" stands for
+# "undefined". XXX Can be empty, which overrides the default value.
+# Default: a localized list (e.g. "eng,fre,jpn,ger,und").
+# subtitles_languages =
+
+# Forced language
+# ---------------
+# Default: "", which will let UMS pick the subtitles language.
+# XXX Can be empty, which overrides the default value.
+# forced_subtitle_language =
+
+# Forced tags
+# -----------
+# The tag string that identifies the subtitles language that will be forced
+# upon MEncoder.
+# Default: "forced"
+forced_subtitle_tags =
+
+# Audio/subtitle language priority
+# --------------------------------
+# Determine the string of audio language and subtitles language pairs ordered
+# by priority for MEncoder to try to match. Audio language and subtitles
+# language should be comma separated as a pair; individual pairs should be
+# semicolon separated. "*" can be used to match any language. Subtitles
+# language can be defined as "off" (e.g. "jpn,off;*,*").
+# Default: a localized list (e.g. "eng,off;*,eng;*,und").
+# audio_subtitles_languages =
+
+# Alternate subtitles folder
+# --------------------------
+# GUI offers a navigator to a folder generating an absolute path.
+# Default: ""
+alternate_subtitles_folder =
+
+# Codepage for non-Unicode subtitles
+# ----------------------------------
+# The character encoding (or code page) that MEncoder should use for
+# non-Unicode external subtitles.
+# Default: "" (auto detect, do not force encoding with -subcp key).
+subtitles_codepage =
+
+# FriBiDi mode
+# ------------
+# Determine whether or not MEncoder should use FriBiDi mode, which is needed
+# to display subtitles in languages that read from right to left, like Arabic,
+# Farsi, Hebrew, Urdu, etc.
+# Default: false
+mencoder_subfribidi =
+
+# Specify TrueType font
+# ---------------------
+# GUI offers a navigator to a folder generating an absolute path.
+# To use it the font must be registered in the OS. In the Win OS the font file
+# should be either put into the "\Windows\Fonts" folder or Win 10 users
+# can click the right mouse button on the font file and choose "Install".
+# For other operational systems the font file must be also put into the font folder
+# or used the specific technique to register it to the OS.
+# If not properly specified or not registered in the OS the default font is used.
+#
+# Default: ""
+subtitles_font =
+
+# Styled subtitles: Font scale
+# ----------------------------
+# The font scale used for ASS subtitling.
+# Default: 1.4
+subtitles_ass_scale =
+
+# Styled subtitles: Font outline
+# ------------------------------
+# The outline parameter used for ASS subtitling.
+# Default: 1
+subtitles_ass_outline =
+
+# Styled subtitles: Font shadow
+# -----------------------------
+# The shadow parameter used for ASS subtitling.
+# Default: 1
+subtitles_ass_shadow =
+
+# Styled subtitles: Margin
+# ------------------------
+# The margin used for ASS subtitling.
+# Default: 10
+subtitles_ass_margin =
+
+# Load subtitles
+# --------------
+# Choose whether UMS should check for external subtitles files with the same
+# name as the media (*.srt, *.sub, *.ass, etc.).
+# Default: true
+autoload_external_subtitles =
+
+# Color
+# -----
+# The 0xRRGGBBAA or 0xRRGGBB value for the subtitles text colour. The value is
+# specified in hexadecimal starting with 0x. The value must consist of either
+# 6 or 8 hexadecimal digits (0-9, A-F). For the alpha value, 0 is fully
+# transparent and 0xFF is opaque.
+#
+# The GUI offers a palette to
+# choose from that will generate a value. The default is white.
+# Default: "0xFFFFFFFF"
+subtitles_color =
+
+# Force external subtitles
+# ------------------------
+# Whether we should force external subtitles with the same name as the media
+# (*.srt, *.sub, *.ass, etc.) to display, regardless of whether language
+# preferences disable them.
+# Default: true
+force_external_subtitles =
+
+# Use embedded style
+# ------------------
+# Whether the style rules defined by styled subtitles (ASS/SSA) should be
+# followed (true) or overridden by our style rules (false).
+# Default: true
+use_embedded_subtitles_style =
+
+# 3D subtitles depth (%)
+# ----------------------
+# The depth of the 3D subtitles.
+# Note: This should be between "-2" and "+2".
+# Default: "0"
+3d_subtitles_depth =
+
+# ----------------------------------------------------------------------------
+# Transcoding Settings Tab: FFmpeg Page
+# ----------------------------------------------------------------------------
+
+# ---< General settings >-----------------------------------------------------
+
+# Disable connection to external entities
+# ---------------------------------------
+# Whether to disable connection to external entities to prevent the XML External
+# Entity vulnerability.
+# Default: true
+disable_external_entities =
+
+# Enable multithreading
+# ---------------------
+# Whether FFmpeg should use multithreading
+# Default: "", which will use automatic-detection.
+ffmpeg_multithreading =
+
+# Remux videos with tsMuxeR when possible instead of transcoding
+# --------------------------------------------------------------
+# Whether FFmpeg should remux videos with tsMuxeR when possible instead of
+# transcoding
+# Default: false
+ffmpeg_mux_tsmuxer_compatible =
+
+# Fontconfig/Embedded fonts
+# -------------------------
+# Whether FFmpeg should use fontconfig for its subtitles.
+# When fontconfig is enabled, FFmpeg will force the UMS font style settings
+# on internal / embedded subtitles.
+# The font style is not used with 3D videos and ASS subtitles, and do not
+# apply to FlowPlayer subtitles (Flash in the Web interface).
+# Default: false
+ffmpeg_fontconfig =
+
+# Defer to MEncoder when transcoding subtitles
+# --------------------------------------------
+# Whether FFmpeg should defer to MEncoder when there are subtitles that need
+# to be transcoded.
+# Both engines can handle subtitles, but MEncoder is more stable right now.
+# Default: true
+ffmpeg_mencoder_problematic_subtitles =
+
+# Use SoX for higher quality audio resampling
+# -------------------------------------------
+# Whether FFmpeg should use a higher quality resampler, SoX, when resampling.
+# This may increase the audio quality when resampling is done.
+# Default: false
+fmpeg_sox =
+
+# GPU acceleration method
+# -----------------------
+# Recommendation is "auto" because other methods don't fallback to software
+# decoding when errors appear.
+# Also accepts custom options, e.g.
+# -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi
+# for not only GPU decoding but also GPU encoding.
+# -init_hw_device vaapi=amd:/dev/dri/renderD129 -hwaccel vaapi -hwaccel vaapi -hwaccel_device amd
+# for using a AMD device when a PC has Intel and AMD GPUs.
+# See https://trac.ffmpeg.org/wiki/HWAccelIntro.
+# Default: "auto"
+ffmpeg_gpu_decoding_acceleration_method =
+
+# GPU thread count
+# ----------------
+# The number of GPU threads to use when decoding video.
+# Values other than "1" may be unstable or FFmpeg may stop due to errors.
+# 0 will let FFmpeg automatically choose.
+# Default: 1
+ffmpeg_gpu_decoding_acceleration_thread_number =
+
+# ----------------------------------------------------------------------------
+# Transcoding Settings Tab: MEncoder Page
+# ----------------------------------------------------------------------------
+
+# ---< General settings >-----------------------------------------------------
+
+# Enable multithreading
+# ---------------------
+# Whether MEncoder should use multithreading
+# Default: "", which will use automatic-detection.
+mencoder_mt =
+
+# Skip loop filter deblocking for H.264
+# -------------------------------------
+# Default: false
+mencoder_skip_loop_filter =
+
+# A/V sync alternative method
+# ---------------------------
+# This disables MEncoder's unreliable, automatic A/V sync
+# Default: true
+mencoder_nooutofsync =
+
+# Change video resolution
+# -----------------------
+# Default: false
+mencoder_scaler =
+
+# Change video resolution width
+# -----------------------------
+# Default: "0"
+mencoder_scalex =
+
+# Change video resolution height
+# ------------------------------
+# Default: "0"
+mencoder_scaley =
+
+# Force framerate parsed from FFmpeg
+# ----------------------------------
+# Default: false
+mencoder_forcefps =
+
+# Deinterlace filter
+# ------------------
+# Default: false
+mencoder_yadif =
+
+# Remux videos with tsMuxeR when possible instead of transcoding
+# --------------------------------------------------------------
+# Default: false
+mencoder_mux_compatible =
+
+# Expert Settings: Codec-specific parameters: Use application defaults
+# --------------------------------------------------------------------
+# Disabling this means UMS will defer to your custom parameters below.
+# Default: true
+mencoder_intelligent_sync =
+
+# Expert Settings: Codec-specific parameters: Custom parameters
+# -------------------------------------------------------------
+# Sets additional codec-specific configuration options for MEncoder.
+# Default: ""
+mencoder_codec_specific_script =
+
+# Custom options (e.g. -vf hqdn3d)
+# --------------------------------
+# Default: ""
+mencoder_custom_options =
+
+# Add borders for overscan compensation: Width (%)
+# ------------------------------------------------
+# Default: 0
+mencoder_overscan_compensation_width =
+
+# Add borders for overscan compensation: Height (%)
+# -------------------------------------------------
+# Default: 0
+mencoder_overscan_compensation_height =
+
+# ---< Subtitles settings >---------------------------------------------------
+
+# Use ASS/SSA subtitles styling
+# -----------------------------
+# Whether MEncoder should use ASS/SSA subtitles styling.
+# Default: true
+mencoder_ass =
+
+# Fontconfig/Embedded fonts
+# -------------------------
+# Default: true
+mencoder_fontconfig =
+
+# Plaintext subtitles settings: Font scale
+# ----------------------------------------
+# The subfont text scale parameter used for subtitling without ASS.
+# Default: 3
+mencoder_noass_scale =
+
+# Plaintext subtitles settings: Font outline
+# ------------------------------------------
+# The subfont outline parameter used for subtitling without ASS.
+# Default: 1
+mencoder_noass_outline =
+
+# Plaintext subtitles settings: Font blur
+# ---------------------------------------
+# The subfont blur parameter used for subtitling without ASS.
+# Default: 1
+mencoder_noass_blur =
+
+# Plaintext subtitles settings: Margin (%)
+# ----------------------------------------
+# The subpos parameter used for subtitling without ASS.
+# Default: 2
+mencoder_noass_subpos =
+
+# DVD/VOBsub subtitles quality (0-4) (higher is better)
+# -----------------------------------------------------
+# Default: 3
+mencoder_vobsub_subtitle_quality =
+
+# ----------------------------------------------------------------------------
+# Transcoding Settings Tab: tsMuxeR Page
+# ----------------------------------------------------------------------------
+
+# Force FPS parsed from FFmpeg in the meta file
+# ---------------------------------------------
+# Default: true
+tsmuxer_forcefps =
+
+# Mux all audio tracks
+# --------------------
+# Default: false
+tsmuxer_mux_all_audiotracks =
+
+# ----------------------------------------------------------------------------
+# Transcoding Settings Tab: AviSynth/FFmpeg Page
+# ----------------------------------------------------------------------------
+
+# Enable multithreading
+# ---------------------
+# Whether AviSynth/FFmpeg should use multithreading
+# Default: "", which will use automatic-detection.
+ffmpeg_avisynth_multithreading =
+
+# Enable True Motion motion interpolation via InterFrame
+# ------------------------------------------------------
+# Uses motion interpolation to give videos higher framerates.
+# 25FPS becomes 50FPS, others become 60FPS.
+# Default: false
+ffmpeg_avisynth_interframe =
+
+# Enable GPU use with True Motion. Recommended if you have a video card
+# ---------------------------------------------------------------------
+# Whether InterFrame should use the video card for some of the work
+# Default: false
+ffmpeg_avisynth_interframegpu =
+
+# Enable AviSynth variable framerate change into a constant framerate
+# -------------------------------------------------------------------
+# Pass the flag "convertfps=true" to AviSynth.
+# Default: true
+ffmpeg_avisynth_convertfps =
+
+# ----------------------------------------------------------------------------
+# Transcoding Settings Tab: AviSynth/MEncoder Page
+# ----------------------------------------------------------------------------
+
+# Enable multithreading
+# ---------------------
+# Whether AviSynth should use multithreading
+# Default: false
+avisynth_multithreading =
+
+# Enable True Motion motion interpolation via InterFrame
+# ------------------------------------------------------
+# Uses motion interpolation to give videos higher framerates.
+# 25FPS becomes 50FPS, others become 60FPS.
+# Default: false
+avisynth_interframe =
+
+# Enable GPU use with True Motion. Recommended if you have a video card
+# ---------------------------------------------------------------------
+# Whether InterFrame should use the video card for some of the work
+# Default: false
+avisynth_interframegpu =
+
+# Enable AviSynth variable framerate change into a constant framerate
+# -------------------------------------------------------------------
+# Pass the flag "convertfps=true" to AviSynth.
+# Default: true
+avisynth_convert_fps =
+
+# AviSynth script
+# ---------------
+# The template for the AviSynth script. The script string may contain the
+# character "\u0001", which will be treated as newline character.
+# Default: "\u0001" (\u0001 is a new line)
+avisynth_script =
+
+# ----------------------------------------------------------------------------
+# Transcoder Settings: VLC
+# ----------------------------------------------------------------------------
+
+# Enable experimental codecs
+# --------------------------
+# Default: false
+# vlc_use_experimental_codecs =
+
+# A/V sync alternative method
+# ---------------------------
+# Default: false
+# vlc_audio_sync_enabled =
+
+# ----------------------------------------------------------------------------
+# Non-GUI Options
+# ----------------------------------------------------------------------------
+
+# ---< Binary tools paths >---------------------------------------------------
+# Path to mencoder (absolute or relative from project.binaries.dir)
+# Example: /usr/bin/mencoder
+# Default:
+# Win: win32/mencoder.exe
+# Mac: osx/mencoder
+# Linux: mencoder + system PATH
+mencoder_path =
+
+# Path to ffmpeg (absolute or relative from project.binaries.dir)
+# Example: /usr/bin/ffmpeg
+# Default:
+# Win: win32/ffmpeg.exe
+# Mac: osx/ffmpeg
+# Linux: ffmpeg + system PATH
+ffmpeg_path =
+
+# Path to mplayer (absolute or relative from project.binaries.dir)
+# Example: /usr/bin/mplayer
+# Default:
+# Win: win32/mplayer.exe
+# Mac: osx/mplayer
+# Linux: mplayer + system PATH
+mplayer_path =
+
+# Path to tsMuxeR (absolute or relative from project.binaries.dir)
+# Example: /usr/ums/linux/tsMuxeR
+# Default:
+# Win: win32/tsMuxeR.exe
+# Mac: osx/tsMuxeR
+# Linux: tsMuxeR + system PATH
+tsmuxer_path =
+
+# Path to tsMuxeR-new (absolute or relative from project.binaries.dir)
+# This version of tsMuxeR is used on PS3.
+# Example: /usr/ums/linux/tsMuxeR-new
+# Default:
+# Win: win32/tsMuxeR-new.exe
+# Mac: osx/tsMuxeR-new
+# Linux: tsMuxeR-new + system PATH
+tsmuxer_new_path =
+
+# Path to dcraw (absolute or relative from project.binaries.dir)
+# Example: /usr/bin/dcraw
+# Default:
+# Win: win32/dcrawMS.exe
+# Mac: osx/dcraw
+# Linux: dcraw + system PATH
+dcraw_path =
+
+# Path to FLAC (absolute or relative from project.binaries.dir)
+# Example: /usr/bin/flac
+# Default:
+# Win: win32/flac.exe
+# Mac: osx/flac
+# Linux: flac + system PATH
+flac_path =
+
+# Path to VideoLAN (absolute or relative from project.binaries.dir)
+# Example: /usr/bin/vlc
+# Default:
+# Win: videolan/vlc.exe
+# Mac: /Applications/VLC.app/Contents/MacOS/VLC
+# Linux: vlc + system PATH
+vlc_path =
+
+# Scripts folder
+# --------------
+# Specifies the the folder in which to look for scripts that can be run using a
+# renderer from the "Server Settings/Scripts" virtual folder. This allows any
+# custom action to be initialized from the renderer, like shutting down down
+# the computer.
+#
+# The "hide_video_settings" setting must be set to "false" for the "Server
+# Settings" virtual folder to be visible. By "playing" a script inside the
+# "Scripts" subfolder, the script will be run on the server.
+# Default: ""
+script_dir =
+
+############################################
+## Buffer settings
+############################################
+
+# Transcode keep first connection
+# -------------------------------
+# The first connection will be used. If set to "false" the second connection
+# will prevail and allow the BufferOutputFile.java to be activated.
+# Default: true
+transcode_keep_first_connection =
+
+# Transcode block multiple connections
+# ------------------------------------
+# When set to "true" activate the BufferOutputFile.java.
+# Have a Boolean value opposite to that of transcode_keep_first_connection.
+# Default: false
+transcode_block_multiple_connections =
+
+# Maximum audo buffer size
+# ------------------------
+# The maximum size (in MB) that UMS should use for buffering audio.
+# Default: 100
+maximum_audio_buffer_size =
+
+# Minimum web buffer size
+# -----------------------
+# The minimum size (in MB) that UMS should use for the streaming media buffer.
+# Default: 1
+minimum_web_buffer_size =
+
+# ---< Virtual folders >------------------------------------------------------
+
+# Virtual folders
+# ---------------
+# Virtual folders allow you to combine real folders into virtual ones and
+# give them custom names. Will be ignored if 'virtual_folders_file' is used.
+# Example: VFolderName1|Folder1Path,Folder2Path;VFolderName2|Folder1Path
+# Note: Backslashes must be doubled. For example, if you have a folder named
+# SubFolder inside ParentFolder, write it like ParentFolder\\SubFolder
+# If you add a folder here, it will be scanned and its content added to
+# the Media Library. If you want to have control over this behavior, please
+# check 'virtual_folders_file' variable.
+# Default: ""
+virtual_folders =
+
+# Virtual folders configuration file
+# ----------------------------------
+# The location of your virtual folders configuration file, which contains a
+# json-formatted list of virtual folders.
+# For each virtual folder you can decide whether you want its content scanned
+# and added to the Media Library.
+# The file will be loaded from your profile directory.
+# See VirtualFolders.conf in your profile directory for an example of syntax.
+# JSON-validators can be useful for making sure the code of your file is
+# valid, an example of which is jsonlint.com.
+# When this file is used, the string above (virtual_folders) will be ignored.
+# Example: VirtualFolders.conf
+# Default: ""
+virtual_folders_file =
+
+# iTunes library path
+# -------------------
+# The absolute location of your iTunes library file. When this is blank, UMS
+# uses different methods for either Windows or OS X to find the default
+# location of the file. Setting this to a string overrides that automatic
+# process.
+# Example: C:\\iTunes\\iTunes Music Library.xml
+# Default: ""
+itunes_library_path =
+
+# Ignored folders
+# ---------------
+# A comma-separated list of folders to ignore.
+# Example: C:\\IgnoredFolder1,C:\\IgnoredFolder2
+# Default: ""
+folders_ignored =
+
+# Ignored folder names
+# --------------------
+# A comma-separated list of folder names (regardless of their location) to ignore.
+# Example: IgnoredFolder1,IgnoredFolder2
+# Default: ".unwanted"
+folder_names_ignored =
+
+# Ping path
+# ---------
+# The path to PsPing on Windows.
+# If this is set, PsPing is used to more accurately calculate network speed.
+# Default: ""
+ping_path =
+
+# UPnP enable
+# ----------
+# Whether to start the upnp service.
+# This allows detailed monitoring and remote-control of devices that support it.
+# Default: true
+upnp_enable =
+
+###########################################
+## Web settings (non-GUI)
+###########################################
+
+# Web port
+# --------
+# The port that the web interface can be accessed by.
+# Note: Users can try to use port 80 in case that port is not being used by
+# another program. Port 80 has the benefit that it's not necessary to explicitly
+# define the port and only localhost (e.g. http://192.168.0.100) is needed to
+# open the web interface.
+# Also the web interface can be opened only by http://[pc name] which is useful
+# in case the DHCP is used in the network and the address for the PC running UMS
+# is assigned dynamically.
+# Example: 7000, which means the web interface is at localhost:7000
+# Default: 9001
+web_port =__PORT_WEB__
+
+# Web enable
+# ----------
+# Whether the web interface will be loaded and accessible
+# Default: true
+web_enable =
+
+# Use HTTPS (SSL) for web connection
+# ----------------------------------
+# Whether the web interface should use HTTPS.
+# To enable HTTPS, a self-signed keystore file called \"UMS.jks\" with password
+# \"umsums\" must be generated using the Java 'keytool' commandline utility.
+# The file must be placed in the profile folder (where this file resides).
+# Default: false
+web_https =
+
+# Web path
+# --------
+# Path to where the UMS web files (like javascripts etc) are to be found.
+# Default: web
+web_path =
+
+# Web authentication
+# ------------------
+# Whether to force authentication or not over the web interface.
+# Default: true
+web_authenticate =
+
+# Web width and height
+# --------------------
+# Width and height of the player in the web browser.
+# Default: 720 and 404
+web_width =
+web_height =
+
+# Web size
+# --------
+# Set the size of the player as a wxh string.
+# Default: use web_height and web_width defaults
+web_size =
+
+# Web continue
+# ------------
+# Continue automatically.
+# One setting per media type
+# Default: true for audio, false for others
+web_continue_audio =
+web_continue_image =
+web_continue_video =
+
+# Web loop
+# --------
+# Loop at the beginning and end of a folder.
+# If set, pressing "next" on the last media in a folder will play the first in
+# the folder, and vice versa.
+# One setting per media type.
+# Default: true for audio, false for others
+web_loop_audio =
+web_loop_image =
+web_loop_video =
+
+# Web Image slide show delay
+# --------------------------
+# Number of milliseconds to wait before showing the next image automatically.
+# Requires web_continue_image to be true.
+# Default: 0 meaning you have to manually go to the next image.
+web_image_show_delay =
+
+# Web Threads
+# -----------
+# How many threads/connections/user requests the web server can have at the same
+# time.
+# Maximum: 100
+# Default: 30
+web_threads =
+
+# Web flash
+# ---------
+# Use flash player by default.
+# Default: false
+web_flash =
+
+# Web subtitles
+# -------------
+# Force subtitles to be transcoded on top of the video.
+# Default: false
+web_subtitles_transcoded =
+
+# When Firefox is used on Linux, send videos with a spoofed MP4 MIME type.
+# Default: false
+web_firefox_linux_mp4 =
+
+# Undocumented
+# ------------
+# Default: false
+web_use_browser_lang =
+# Default: false
+web_use_browser_sub_lang =
+# Default: true
+web_control =
+# Default: 0
+web_low_speed =
+# Default: false
+web_mp4_trans =
+# Default: null
+web_transcode =
+
+# ----------------------------------------------------------------------------
+# PinCode folder settings
+# ----------------------------------------------------------------------------
+
+# PinCode charset
+# ---------------
+# Which charset to choose PinCodes from.
+# 0 = Digits (0-9)
+# 1 = Letters (A-Z)
+# 2 = Both
+# Default: 0
+code_charset =
+
+# PinCode don't show thumbnails
+# -----------------------------
+# Whether to show thumbnails of media that is hidden by Pincode folders.
+# If true a generic thumbnail will be shown.
+# Default: true
+code_show_thumbs_no_code =
+
+# PinCode valid timeout
+# ---------------------
+# Determine for how long in hours an entered pincode is valid, and thus unlocks
+# the media.
+# Default: 4
+code_valid_timeout =
+
+# PinCode enabled
+# ---------------
+# Whether to use Pincodes at all.
+# Default: true
+code_enable =
+
+# Normalize audio volume with MEncoder
+# ------------------------------------
+# Makes quiet things relatively louder so they are easier to distinguish.
+# Note: This is currently broken in MEncoder so do not use except for testing.
+# Default: false
+mencoder_normalize_volume =
+
+# Profile name
+# ------------
+# An optional identifier used to distinguish this profile (i.e. collection of
+# settings) from other profiles. The profile name is displayed in the renderer
+# in square brackets after the software name e.g.
+#
+# Universal Media Server [myprofile]
+#
+# See the FAQ for details on how to create and use multiple profiles:
+# http://www.universalmediaserver.com/faq/#Setup2
+# Default: the server's hostname.
+name =
+
+# Skip network interfaces
+# -----------------------
+# Specifies a comma separated list of network interfaces to ignore when
+# scanning for a suitable network interface to attach to. This is typically
+# used to ignore virtual interfaces created by other applications.
+# Default: "tap,vmnet,vnic", which ignores interfaces named "tap0", "tap1" and
+# "tap2", but it allows an interface named "eth0".
+skip_network_interfaces =
+
+# WEB.conf path
+# -------------
+# The path to the WEB.conf file to use with this profile. This can be a
+# relative or absolute path to a file or directory as per the rules for
+# PMS_PROFILE described in the FAQ:
+# http://www.ps3mediaserver.org/forum/viewtopic.php?f=6&t=3507&p=41214#p49895
+# Default is $PROFILE_DIRECTORY/WEB.conf
+web_conf =
+
+# Plugins directory
+# -----------------
+# The directory where UMS can find the plugins.
+# Default: "plugins"
+plugins =
+
+# Transcode Folder Name
+# ---------------------
+# Assign a different name to the #--TRANSCODE--# folder e.g. "Subtitles" or
+# "Languages".
+# Default: The localized version of "#--TRANSCODE--#".
+transcode_folder_name =
+
+############################################
+## Resume function settings (non GUI)
+############################################
+
+# Resume back
+# -----------
+# Percentage of a file that has to be played to count as "completed".
+# This value is a number between 10 and 97.
+# When this threshold is reached the resume file is deleted.
+# Default: 92
+resume_back =
+
+# Resume rewind
+# -------------
+# Since timers of stop/start are not 100% correct UMS will "rewind" the stop
+# time a little bit to make sure you don't miss anything.
+# This will be a time value in milliseconds.
+# Default: 17000
+resume_rewind =
+
+# Resume keep time
+# ----------------
+# Represents the number of days you want to keep your resume file.
+# Default: 0
+resume_keep_time =
+
+############################################
+## Live subtitles settings (non-GUI)
+############################################
+
+# Live subtitles keep
+# -------------------
+# Lets you choose to keep live subtitles or not.
+# Default: false
+live_subtitles_keep =
+
+# Live subtitles limit
+# --------------------
+# Maximum number of subtitles that could be downloaded from opensubtitles.org
+# Default: 20
+live_subtitles_limit =
+
+# Live subtitles timeout
+# ----------------------
+# Number of days that live subtitles need to be keep.
+# If live_subtitles_keep is true this setting is ignored.
+# Default: 0 (meaning keep indefinitely)
+live_subtitles_timeout =
+
+################################################
+## Server side search in web interface (non-GUI)
+################################################
+
+# Search folder
+#--------------
+# Allows you to send a search string when requesting a folder. If enabled you
+# should see a folder called "Search Disc Folders" in your root folder which
+# accept search strings and searches your shared folder.
+# Default: false
+search_folder=
+
+# Search in folder
+# ----------------
+# Allows you to search in folders.
+# Default: false
+search_in_folder=
+
+# Recursive search
+# ----------------
+# Allows recursive folder search.
+# Default: true
+search_recurse=
+
+# Recursive search depth
+# ----------------------
+# Defined the depth of recursive folder search.
+# Default: 100 if 'search_recurse' is true, 2 if it's false.
+search_recurse_depth=
+
+############################################
+## Logging settings
+############################################
+
+# Log Level
+# ---------------------
+# The root logging level, a root filter applied to all logging, which can be:
+# ALL, TRACE, DEBUG, INFO, WARN, ERROR or OFF
+# This property can also be set from the 'Logs' tab in the gui.
+# Default: "DEBUG"
+log_level =
+
+# Logfile name
+# ------------
+# The name of the standard log file. This is just the file name,
+# no path information must be given here. The location of the log
+# file is decided by rules that varies by platform and some other
+# factors.
+# Default: "debug.log"
+logging_logfile_name =
+
+# Logging Buffered
+# ----------------
+# By default the log file(s) are flushed/written to disk after each new log
+# event. SSD drives can be written to a fixed number of times only, and logging
+# can be a great source of wear on such drives. Buffered logging makes UMS
+# buffer up to 8 kb between each write, significantly reducing the number of
+# writes. Buffered writes can also help performance if you write to regular a
+# HDD with a high workload. Operating systems and drives often has their own
+# buffering, so enabling buffered logging might not make any real difference.
+# Please be aware that if UMS crashes or is terminated, the buffer might not
+# get flushed/written. If you're debugging a specific problem concerning
+# crashing or hanging, buffering should probably be turned off.
+# Please note: If UMS is started in "forced" TRACE mode, buffering will
+# be disabled regardless of this setting.
+# Default: false
+logging_buffered =
+
+# Logging Filter Console
+# ----------------------
+# A separate filter for the console that filters after the root filter have
+# done it's filtering. It's not possible to get back things filtered out by
+# Log Level above, but you can further filter out more before it's written to
+# the console. Valid values are:
+# ALL, TRACE, DEBUG, INFO, WARN, ERROR or OFF
+# Default: "INFO"
+logging_filter_console =
+
+# Logging Filter Log Tab
+# ----------------------
+# A separate filter for the log window in the "Logs" tab in the GUI that
+# filters after the root filter have done it's filtering. It's not possible to
+# get back things filtered out by Log Level above, but you can further filter
+# out more before it's written to the log window. Valid values are:
+# ALL, TRACE, DEBUG, INFO, WARN, ERROR or OFF
+# Default: "INFO"
+logging_filter_logs_tab =
+
+# Logging Logs Tab Linebuffer
+# ---------------------------
+# Specifies how many lines the log windows on the "Logs" tab in the GUI will
+# store before deleting the oldest entries. This will decide the length of the
+# scrollable area.
+# Default: 1000
+logging_logs_tab_linebuffer =
+
+# Log System Information
+# ----------------------
+# Specifies if or when to log information about the OS, CPU and memory. This
+# is useful for diagnosing problems, but isn't stricly necessary during normal
+# use. On some platforms, acquiring the information can take some time,
+# although that doesn't mean that it uses a lot of resources. There are three
+# modes:
+#
+# - Never: Never log system information. This is useful it gathering of the
+# information leads to an error or other problem).
+# - Trace only: Only log system information if the log level is "TRACE". This
+# is the default which only triggers gathering of system information when
+# the log level commonly used for diagnostics is activated.
+# - Always: Always log system information.
+#
+# Default: Trace only
+log_system_info =
+
+#---< Syslog settings >----------------
+#
+# Please note: It is possible to customize UMS logging via LogBack
+# configuration files (logback.xml or logback.headless.xml). You can place
+# customized versions of these files in your profile folder, which will
+# override the default LogBack files. The syslog settings presented here
+# should NOT be used in conjunction with customized LogBack configuration
+# files, but are meant to give access to syslog logging for those that don't
+# want to acquire in-depth knowledge about LogBack configuration.
+
+# Logging Use Syslog
+# ------------------
+# Activates syslog logging and disables file logging. That enables you to
+# send all logging to a differnt computer running a syslog server completely
+# removing all local disk I/O from logging, or to collect logs in a centralized
+# way. Syslog Host must be specified if this is enabled.
+# Please note: If UMS is started in "forced" TRACE mode, file logging will
+# be enabled and syslog disabled regardless of this setting.
+# Default: false
+logging_use_syslog =
+
+# Logging Syslog Host
+# -------------------
+# Host name or IP address for the syslog server. Use "localhost" for logging
+# to a syslog server on the same computer. The name must be resolvable (via
+# DNS, WINS, HOSTS etc.) or be an IP address for syslog logging to be activated.
+# Default: ""
+logging_syslog_host =
+
+# Logging Syslog Port
+# -------------------
+# UDP port to use for syslog logging. This should normally be left at the
+# default value.
+# Default: 514
+logging_syslog_port =
+
+# Logging Syslog Facility
+# -----------------------
+# Syslog facility can be specified for filtering purposes, but is limited to
+# one of the following values: AUTH, AUTHPRIV, DAEMON, CRON, FTP, LPR, KERN,
+# MAIL, NEWS, SYSLOG, USER, UUCP, LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5,
+# LOCAL6 or LOCAL7. Invalid values will be replaced with the default.
+# Default: "USER"
+logging_syslog_facility =
+
+# Database Logging
+# ----------------
+# Enables database logging.
+# Default: false
+log_database =
+
+# ---< Other settings saved by UMS >------------------------------------------
+alternativeffmpegpath =
+gui_log_search_case_sensitive =
+gui_log_search_use_regex =
+gui_log_search_multiline =
diff --git a/conf/VirtualFolders.conf b/conf/VirtualFolders.conf
new file mode 100644
index 0000000..33bdd2c
--- /dev/null
+++ b/conf/VirtualFolders.conf
@@ -0,0 +1,12 @@
+[
+ {
+ "name":"Virtual Folder Name",
+ "addToMediaLibrary":"true",
+ "files":["D:\\Path\\To\\Folder","D:\\Path\\To\\Another\\Folder"]
+ },
+ {
+ "name":"Another Virtual Folder Name",
+ "addToMediaLibrary":"true",
+ "files":["D:\\Path\\To\\Folder","D:\\Path\\To\\Another\\Folder"]
+ }
+]
\ No newline at end of file
diff --git a/conf/WEB.conf b/conf/WEB.conf
new file mode 100644
index 0000000..88c3a61
--- /dev/null
+++ b/conf/WEB.conf
@@ -0,0 +1,57 @@
+##########################################################################################################
+# #
+# WEB.conf: configure support for web feeds and streams #
+# #
+# NOTE: This file must be placed in the profile directory to work: #
+# #
+# http://www.ps3mediaserver.org/forum/viewtopic.php?f=6&t=3507&p=32731#p32731 #
+# #
+# Supported types: #
+# #
+# imagefeed, audiofeed, videofeed, audiostream, videostream #
+# #
+# Format for feeds: #
+# #
+# type.folders,separated,by,commas=URL #
+# #
+# Format for streams: #
+# #
+# type.folders,separated,by,commas=name for audio/video stream,URL,optional thumbnail URL #
+# #
+# For more web feed/stream options, see: #
+# #
+# http://www.ps3mediaserver.org/forum/viewtopic.php?f=6&t=3507&p=37084#p37084 #
+# http://www.ps3mediaserver.org/forum/viewtopic.php?f=6&t=8776&p=46696#p46696 #
+# #
+##########################################################################################################
+
+# image feeds
+imagefeed.Web,Pictures=http://api.flickr.com/services/feeds/photos_public.gne?format=rss2
+imagefeed.Web,Pictures=http://api.flickr.com/services/feeds/photos_public.gne?id=39453068@N05&format=rss2
+imagefeed.Web,Pictures=http://api.flickr.com/services/feeds/photos_public.gne?id=14362684@N08&format=rss2
+imagefeed.Web,Pictures=http://picasaweb.google.fr/data/feed/base/user/nefuisalbum/albumid/5218433104757705489?alt=rss&kind=photo&hl=en_US
+imagefeed.Web,Pictures=http://picasaweb.google.com/data/feed/base/user/FenderStratRocker?alt=rss&kind=album&hl=en_US&access=public
+
+# audio feeds
+audiofeed.Web,Podcasts=https://rss.art19.com/caliphate
+audiofeed.Web,Podcasts=https://www.nasa.gov/rss/dyn/Gravity-Assist.rss
+audiofeed.Web,Podcasts=http://podcasts.joerogan.net/feed
+audiofeed.Web,Podcasts=http://wakingup.libsyn.com/rss
+audiofeed.Web,Podcasts=https://rss.art19.com/wolverine-the-long-night
+
+# video feeds
+videofeed.Web,Vodcasts=http://feeds.feedburner.com/tedtalks_video
+videofeed.Web,Vodcasts=https://www.nasa.gov/rss/dyn/nasax_vodcast.rss
+videofeed.Web,Vodcasts=https://www.unicef.org/rss/unicef_television_vodcast.xml
+videofeed.Web,YouTube Channels=https://www.youtube.com/feeds/videos.xml?channel_id=UC0PEAMcRK7Mnn2G1bCBXOWQ
+videofeed.Web,YouTube Channels=https://www.youtube.com/feeds/videos.xml?channel_id=UCccjdJEay2hpb5scz61zY6Q
+videofeed.Web,YouTube Channels=https://www.youtube.com/feeds/videos.xml?channel_id=UCOiUKJ6lMU3yHbVNtNXJyfw
+videofeed.Web,YouTube Channels=https://www.youtube.com/feeds/videos.xml?channel_id=UCqFzWxSCi39LnW1JKFR3efg
+videofeed.Web,YouTube Channels=https://www.youtube.com/feeds/videos.xml?channel_id=UCfAOh2t5DpxVrgS9NQKjC7A
+videofeed.Web,YouTube Channels=https://www.youtube.com/feeds/videos.xml?channel_id=UC8-Th83bH_thdKZDJCrn88g
+videofeed.Web,YouTube Channels=https://www.youtube.com/feeds/videos.xml?channel_id=UCzRBkt4a2hy6HObM3cl-x7g
+
+# video streams
+# videostream.Web,TV=France 24,mms://stream1.france24.yacast.net/f24_liveen,http://www.france24.com/en/sites/france24.com.en/themes/france24/logo-fr.png
+# videostream.Web,TV=BFM TV (French TV),mms://vipmms9.yacast.net/bfm_bfmtv,http://upload.wikimedia.org/wikipedia/en/6/62/BFMTV.png
+# videostream.Web,Webcams=View of Shanghai Harbour,mmst://www.onedir.com/cam3,http://media-cdn.tripadvisor.com/media/photo-s/00/1d/4b/d8/pudong-from-the-bund.jpg
diff --git a/conf/app.src.default b/conf/app.src.default
new file mode 100644
index 0000000..1ee9019
--- /dev/null
+++ b/conf/app.src.default
@@ -0,0 +1,5 @@
+SOURCE_URL=https://github.com/UniversalMediaServer/UniversalMediaServer/releases/download/10.4.1/UMS-10.4.1-__MACH__.tgz
+SOURCE_SUM=__SHA256_SUM__
+SOURCE_FORMAT=tgz
+SOURCE_SUM_PRG=sha256sum
+SOURCE_EXTRACT=false
diff --git a/conf/nginx.conf b/conf/nginx.conf
new file mode 100644
index 0000000..cb2aac2
--- /dev/null
+++ b/conf/nginx.conf
@@ -0,0 +1,24 @@
+#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
+location __PATH__/ {
+
+ proxy_http_version 1.1;
+ proxy_read_timeout 90;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded_Proto $scheme;
+ proxy_set_header X-Scheme $scheme;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection $connection_upgrade;
+ more_set_headers "X-Frame-Options: SAMEORIGIN";
+ proxy_pass http://localhost:__PORT__/;
+ proxy_set_header Host $host;
+
+ # Force usage of https
+ if ($scheme = http) {
+ rewrite ^ https://$server_name$request_uri? permanent;
+ }
+
+
+ # Include SSOWAT user panel.
+ include conf.d/yunohost_panel.conf.inc;
+}
diff --git a/conf/systemd.service b/conf/systemd.service
new file mode 100644
index 0000000..d2242a0
--- /dev/null
+++ b/conf/systemd.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=A DLNA UPnP and HTTP(S) Media Server
+After=network.target
+
+[Service]
+Type=simple
+User=__APP__
+Group=__APP__
+WorkingDirectory=__FINALPATH__/
+ExecStart=__FINALPATH__/UMS.sh headless
+StandardOutput=append:/var/log/__APP__/__APP__.log
+StandardError=inherit
+
+[Install]
+WantedBy=multi-user.target
diff --git a/issue_template.md b/issue_template.md
new file mode 100644
index 0000000..4a290c4
--- /dev/null
+++ b/issue_template.md
@@ -0,0 +1,55 @@
+---
+name: Bug report
+about: When creating a bug report, please use the following template to provide all the relevant information and help debugging efficiently.
+
+---
+
+**How to post a meaningful bug report**
+1. *Read this whole template first.*
+2. *Determine if you are on the right place:*
+ - *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!*
+ - *Otherwise, the issue may be due to REPLACEBYYOURAPP itself. Refer to its documentation or repository for help.*
+ - *When in doubt, post here and we will figure it out together.*
+3. *Delete the italic comments as you write over them below, and remove this guide.*
+---
+
+### Describe the bug
+
+*A clear and concise description of what the bug is.*
+
+### Context
+
+- Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...*
+- YunoHost version: x.x.x
+- I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...*
+- Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: *no / yes*
+ - If yes, please explain:
+- Using, or trying to install package version/branch:
+- If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`*
+
+### Steps to reproduce
+
+- *If you performed a command from the CLI, the command itself is enough. For example:*
+ ```sh
+ sudo yunohost app install REPLACEBYYOURAPP
+ ```
+- *If you used the webadmin, please perform the equivalent command from the CLI first.*
+- *If the error occurs in your browser, explain what you did:*
+ 1. *Go to '...'*
+ 2. *Click on '...'*
+ 3. *Scroll down to '...'*
+ 4. *See error*
+
+### Expected behavior
+
+*A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.*
+
+### Logs
+
+*When an operation fails, YunoHost provides a simple way to share the logs.*
+- *In the webadmin, the error message contains a link to the relevant log page. On that page, you will be able to 'Share with Yunopaste'. If you missed it, the logs of previous operations are also available under Tools > Logs.*
+- *In command line, the command to share the logs is displayed at the end of the operation and looks like `yunohost log display [log name] --share`. If you missed it, you can find the log ID of a previous operation using `yunohost log list`.*
+
+*After sharing the log, please copypaste directly the link provided by YunoHost (to help readability, no need to copypaste the entire content of the log here, just the link is enough...)*
+
+*If applicable and useful, add screenshots to help explain your problem.*
diff --git a/manifest.json b/manifest.json
new file mode 100644
index 0000000..c88c99f
--- /dev/null
+++ b/manifest.json
@@ -0,0 +1,49 @@
+{
+ "name": "Universal Media Server",
+ "id": "ums",
+ "packaging_format": 1,
+ "description": {
+ "en": "A DLNA, UPnP and HTTP(S) Media Server",
+ "fr": "Un Serveur Multimedia DLNA, UPnP et HTTP(S)"
+ },
+ "version": "10.4.1~ynh1",
+ "url": "www.universalmediaserver.com",
+ "license": "GPL-2.0-or-later",
+ "maintainer": {
+ "name": "Krakinou",
+ "email": "misterl56@hotmail.com"
+ },
+ "requirements": {
+ "yunohost": ">= 4.1.7"
+ },
+ "multi_instance": false,
+ "services": [
+ "nginx"
+ ],
+ "arguments": {
+ "install" : [
+ {
+ "name": "domain",
+ "type": "domain",
+ "example": "example.com"
+ },
+ {
+ "name": "is_public",
+ "type": "boolean",
+ "default": true
+ },
+ {
+ "name":"vlc",
+ "type": "boolean",
+ "ask": {
+ "en" : "Do you want to install vlc? It may be useful for web content streaming",
+ "fr" : "Voulez vous installer vlc? Cela peut etre utile pour streamer du contenu web"
+ },
+ "help": {
+ "en": "This will use approx 600GB more and will install a LOT of dependencies",
+ "fr": "Cela va utiliser environ 600GB supplémentaires et installera BEAUCOUP de dépendances"
+ }
+ }
+ ]
+ }
+}
diff --git a/pull_request_template.md b/pull_request_template.md
new file mode 100644
index 0000000..6c28fc5
--- /dev/null
+++ b/pull_request_template.md
@@ -0,0 +1,16 @@
+## Problem
+- *Description of why you made this PR*
+
+## Solution
+- *And how do you fix that problem*
+
+## PR Status
+- [ ] Code finished.
+- [ ] Tested with Package_check.
+- [ ] Fix or enhancement tested.
+- [ ] Upgrade from last version tested.
+- [ ] Can be reviewed and tested.
+
+## Package_check results
+---
+* An automatic package_check will be launch at https://ci-apps-dev.yunohost.org/, when you add a specific comment to your Pull Request: "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!"*
diff --git a/scripts/_common.sh b/scripts/_common.sh
new file mode 100644
index 0000000..5b10c0d
--- /dev/null
+++ b/scripts/_common.sh
@@ -0,0 +1,110 @@
+#!/bin/bash
+
+#=================================================
+# COMMON VARIABLES
+#=================================================
+
+# dependencies used by the app
+pkg_dependencies="mediainfo dcraw p7zip"
+
+MACH=`uname -m`
+case "$MACH" in
+ "armv6l" ) MACH="armel"
+ SHA256=1051fd725ff2c8da469fd9c0d1331e3c8ec031194303a8c79f7fad80c70e4a5e ;;
+ "armv7l" ) if [ $(dpkg --print-architecture) = "armhf" ]; then
+ MACH="armhf"
+ SHA256=194686fb5af695112485780b2cb89af2ec7cb675f166ff2717c7fc66eac958c0
+ else
+ MACH="armel"
+ SHA256=1051fd725ff2c8da469fd9c0d1331e3c8ec031194303a8c79f7fad80c70e4a5e
+ fi ;;
+ "armv8l" ) MACH="arm64"
+ SHA256=179ad2ff3800001b8e51d21776426d88c72c1ca1e4030363f3e9b4820d0919cc ;;
+ "x86_64" ) MACH="x86_64"
+ SHA256=7fbed13a5c5f8eb01f6f1b4815c73fb4b21b81b4affff29b5185715fa76f841b ;;
+ * ) MACH="x86"
+ SHA256=ec8e67e3b03300857116ebb9ddfe1bd938b506e9ba603df02f3c8d38bf9bb7be ;;
+esac
+
+#=================================================
+# FUTURE OFFICIAL HELPERS
+#=================================================
+# Need also the helper https://github.com/YunoHost-Apps/Experimental_helpers/blob/master/ynh_handle_getopts_args/ynh_handle_getopts_args
+
+# Install or update the main directory yunohost.multimedia
+#
+# usage: ynh_multimedia_build_main_dir
+ynh_multimedia_build_main_dir () {
+ local ynh_media_release="v1.2"
+ local checksum="806a827ba1902d6911095602a9221181"
+
+ # Download yunohost.multimedia scripts
+ wget -nv https://github.com/Yunohost-Apps/yunohost.multimedia/archive/${ynh_media_release}.tar.gz 2>&1
+
+ # Check the control sum
+ echo "${checksum} ${ynh_media_release}.tar.gz" | md5sum -c --status \
+ || ynh_die "Corrupt source"
+
+ # Check if the package acl is installed. Or install it.
+ ynh_package_is_installed 'acl' \
+ || ynh_package_install acl
+
+ # Extract
+ mkdir yunohost.multimedia-master
+ tar -xf ${ynh_media_release}.tar.gz -C yunohost.multimedia-master --strip-components 1
+ ./yunohost.multimedia-master/script/ynh_media_build.sh
+}
+
+# Add a directory in yunohost.multimedia
+# This "directory" will be a symbolic link to a existing directory.
+#
+# usage: ynh_multimedia_addfolder "Source directory" "Destination directory"
+#
+# | arg: -s, --source_dir= - Source directory - The real directory which contains your medias.
+# | arg: -d, --dest_dir= - Destination directory - The name and the place of the symbolic link, relative to "/home/yunohost.multimedia"
+ynh_multimedia_addfolder () {
+ # Declare an array to define the options of this helper.
+ declare -Ar args_array=( [s]=source_dir= [d]=dest_dir= )
+ local source_dir
+ local dest_dir
+ # Manage arguments with getopts
+ ynh_handle_getopts_args "$@"
+
+ ./yunohost.multimedia-master/script/ynh_media_addfolder.sh --source="$source_dir" --dest="$dest_dir"
+}
+
+# Move a directory in yunohost.multimedia, and replace by a symbolic link
+#
+# usage: ynh_multimedia_movefolder "Source directory" "Destination directory"
+#
+# | arg: -s, --source_dir= - Source directory - The real directory which contains your medias.
+# It will be moved to "Destination directory"
+# A symbolic link will replace it.
+# | arg: -d, --dest_dir= - Destination directory - The new name and place of the directory, relative to "/home/yunohost.multimedia"
+ynh_multimedia_movefolder () {
+ # Declare an array to define the options of this helper.
+ declare -Ar args_array=( [s]=source_dir= [d]=dest_dir= )
+ local source_dir
+ local dest_dir
+ # Manage arguments with getopts
+ ynh_handle_getopts_args "$@"
+
+ ./yunohost.multimedia-master/script/ynh_media_addfolder.sh --inv --source="$source_dir" --dest="$dest_dir"
+}
+
+# Allow an user to have an write authorisation in multimedia directories
+#
+# usage: ynh_multimedia_addaccess user_name
+#
+# | arg: -u, --user_name= - The name of the user which gain this access.
+ynh_multimedia_addaccess () {
+ # Declare an array to define the options of this helper.
+ declare -Ar args_array=( [u]=user_name=)
+ local user_name
+ # Manage arguments with getopts
+ ynh_handle_getopts_args "$@"
+
+ groupadd -f multimedia
+ usermod -a -G multimedia $user_name
+}
+
diff --git a/scripts/backup b/scripts/backup
new file mode 100755
index 0000000..6ea8892
--- /dev/null
+++ b/scripts/backup
@@ -0,0 +1,107 @@
+#!/bin/bash
+
+#=================================================
+# GENERIC START
+#=================================================
+# IMPORT GENERIC HELPERS
+#=================================================
+
+# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
+source ../settings/scripts/_common.sh
+source /usr/share/yunohost/helpers
+
+#=================================================
+# MANAGE SCRIPT FAILURE
+#=================================================
+
+ynh_clean_setup () {
+ ### Remove this function if there's nothing to clean before calling the remove script.
+ true
+}
+# Exit if an error occurs during the execution of the script
+ynh_abort_if_errors
+
+#=================================================
+# LOAD SETTINGS
+#=================================================
+ynh_print_info --message="Loading installation settings..."
+
+app=$YNH_APP_INSTANCE_NAME
+
+final_path=$(ynh_app_setting_get --app=$app --key=final_path)
+domain=$(ynh_app_setting_get --app=$app --key=domain)
+db_name=$(ynh_app_setting_get --app=$app --key=db_name)
+phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
+
+#=================================================
+# DECLARE DATA AND CONF FILES TO BACKUP
+#=================================================
+ynh_print_info --message="Declaring files to be backed up..."
+
+### N.B. : the following 'ynh_backup' calls are only a *declaration* of what needs
+### to be backuped and not an actual copy of any file. The actual backup that
+### creates and fill the archive with the files happens in the core after this
+### script is called. Hence ynh_backups calls takes basically 0 seconds to run.
+
+#=================================================
+# BACKUP THE APP MAIN DIR
+#=================================================
+
+ynh_backup --src_path="$final_path"
+
+#=================================================
+# BACKUP THE NGINX CONFIGURATION
+#=================================================
+
+ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
+
+#=================================================
+# BACKUP THE PHP-FPM CONFIGURATION
+#=================================================
+
+ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
+
+#=================================================
+# BACKUP FAIL2BAN CONFIGURATION
+#=================================================
+
+ynh_backup --src_path="/etc/fail2ban/jail.d/$app.conf"
+ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf"
+
+#=================================================
+# SPECIFIC BACKUP
+#=================================================
+# BACKUP LOGROTATE
+#=================================================
+
+ynh_backup --src_path="/etc/logrotate.d/$app"
+
+#=================================================
+# BACKUP SYSTEMD
+#=================================================
+
+ynh_backup --src_path="/etc/systemd/system/$app.service"
+
+#=================================================
+# BACKUP VARIOUS FILES
+#=================================================
+
+ynh_backup --src_path="/etc/cron.d/$app"
+
+ynh_backup --src_path="/etc/$app/"
+
+#=================================================
+# BACKUP THE MYSQL DATABASE
+#=================================================
+ynh_print_info --message="Backing up the MySQL database..."
+
+### (However, things like MySQL dumps *do* take some time to run, though the
+### copy of the generated dump to the archive still happens later)
+
+ynh_mysql_dump_db --database="$db_name" > db.sql
+
+#=================================================
+# END OF SCRIPT
+#=================================================
+
+ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
diff --git a/scripts/change_url b/scripts/change_url
new file mode 100644
index 0000000..126010e
--- /dev/null
+++ b/scripts/change_url
@@ -0,0 +1,134 @@
+#!/bin/bash
+
+#=================================================
+# GENERIC STARTING
+#=================================================
+# IMPORT GENERIC HELPERS
+#=================================================
+
+source _common.sh
+source /usr/share/yunohost/helpers
+
+#=================================================
+# RETRIEVE ARGUMENTS
+#=================================================
+
+old_domain=$YNH_APP_OLD_DOMAIN
+old_path=$YNH_APP_OLD_PATH
+
+new_domain=$YNH_APP_NEW_DOMAIN
+new_path=$YNH_APP_NEW_PATH
+
+app=$YNH_APP_INSTANCE_NAME
+
+#=================================================
+# LOAD SETTINGS
+#=================================================
+ynh_script_progression --message="Loading installation settings..." --time --weight=1
+
+# Needed for helper "ynh_add_nginx_config"
+final_path=$(ynh_app_setting_get --app=$app --key=final_path)
+
+# Add settings here as needed by your application
+#db_name=$(ynh_app_setting_get --app=$app --key=db_name)
+#db_user=$db_name
+#db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd)
+
+#=================================================
+# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
+#=================================================
+ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --time --weight=1
+
+# Backup the current version of the app
+ynh_backup_before_upgrade
+ynh_clean_setup () {
+ # Remove the new domain config file, the remove script won't do it as it doesn't know yet its location.
+ ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
+
+ # Restore it if the upgrade fails
+ ynh_restore_upgradebackup
+}
+# Exit if an error occurs during the execution of the script
+ynh_abort_if_errors
+
+#=================================================
+# CHECK WHICH PARTS SHOULD BE CHANGED
+#=================================================
+
+change_domain=0
+if [ "$old_domain" != "$new_domain" ]
+then
+ change_domain=1
+fi
+
+change_path=0
+if [ "$old_path" != "$new_path" ]
+then
+ change_path=1
+fi
+
+#=================================================
+# STANDARD MODIFICATIONS
+#=================================================
+# STOP SYSTEMD SERVICE
+#=================================================
+ynh_script_progression --message="Stopping a systemd service..." --time --weight=1
+
+ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log"
+
+#=================================================
+# MODIFY URL IN NGINX CONF
+#=================================================
+ynh_script_progression --message="Updating NGINX web server configuration..." --time --weight=1
+
+nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf
+
+# Change the path in the NGINX config file
+if [ $change_path -eq 1 ]
+then
+ # Make a backup of the original NGINX config file if modified
+ ynh_backup_if_checksum_is_different --file="$nginx_conf_path"
+ # Set global variables for NGINX helper
+ domain="$old_domain"
+ path_url="$new_path"
+ # Create a dedicated NGINX config
+ ynh_add_nginx_config
+fi
+
+# Change the domain for NGINX
+if [ $change_domain -eq 1 ]
+then
+ # Delete file checksum for the old conf file location
+ ynh_delete_file_checksum --file="$nginx_conf_path"
+ mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf
+ # Store file checksum for the new config file location
+ ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
+fi
+
+#=================================================
+# SPECIFIC MODIFICATIONS
+#=================================================
+# ...
+#=================================================
+
+#=================================================
+# GENERIC FINALISATION
+#=================================================
+# START SYSTEMD SERVICE
+#=================================================
+ynh_script_progression --message="Starting a systemd service..." --time --weight=1
+
+ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
+
+#=================================================
+# RELOAD NGINX
+#=================================================
+ynh_script_progression --message="Reloading NGINX web server..." --time --weight=1
+
+ynh_systemd_action --service_name=nginx --action=reload
+
+#=================================================
+# END OF SCRIPT
+#=================================================
+
+ynh_script_progression --message="Change of URL completed for $app" --time --last
diff --git a/scripts/install b/scripts/install
new file mode 100755
index 0000000..bc80067
--- /dev/null
+++ b/scripts/install
@@ -0,0 +1,338 @@
+#!/bin/bash
+
+#=================================================
+# GENERIC START
+#=================================================
+# IMPORT GENERIC HELPERS
+#=================================================
+
+source _common.sh
+source /usr/share/yunohost/helpers
+
+#=================================================
+# MANAGE SCRIPT FAILURE
+#=================================================
+
+ynh_clean_setup () {
+ ### Remove this function if there's nothing to clean before calling the remove script.
+ true
+}
+# Exit if an error occurs during the execution of the script
+ynh_abort_if_errors
+
+#=================================================
+# RETRIEVE ARGUMENTS FROM THE MANIFEST
+#=================================================
+
+domain=$YNH_APP_ARG_DOMAIN
+path_url=/
+is_public=$YNH_APP_ARG_IS_PUBLIC
+vlc_required=$YNH_APP_ARG_VLC
+
+### If it's a multi-instance app, meaning it can be installed several times independently
+### The id of the app as stated in the manifest is available as $YNH_APP_ID
+### The instance number is available as $YNH_APP_INSTANCE_NUMBER (equals "1", "2"...)
+### The app instance name is available as $YNH_APP_INSTANCE_NAME
+### - the first time the app is installed, YNH_APP_INSTANCE_NAME = ynhexample
+### - the second time the app is installed, YNH_APP_INSTANCE_NAME = ynhexample__2
+### - ynhexample__{N} for the subsequent installations, with N=3,4...
+### The app instance name is probably what interests you most, since this is
+### guaranteed to be unique. This is a good unique identifier to define installation path,
+### db names...
+app=$YNH_APP_INSTANCE_NAME
+
+if [ "$vlc_required" -eq 1 ] ; then
+ pkg_dependencies="$pkg_dependencies vlc"
+fi
+
+#=================================================
+# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
+#=================================================
+### About --weight and --time
+### ynh_script_progression will show to your final users the progression of each scripts.
+### In order to do that, --weight will represent the relative time of execution compared to the other steps in the script.
+### --time is a packager option, it will show you the execution time since the previous call.
+### This option should be removed before releasing your app.
+### Use the execution time, given by --time, to estimate the weight of a step.
+### A common way to do it is to set a weight equal to the execution time in second +1.
+### The execution time is given for the duration since the previous call. So the weight should be applied to this previous call.
+ynh_script_progression --message="Validating installation parameters..." --time --weight=1
+
+### If the app uses NGINX as web server (written in HTML/PHP in most cases), the final path should be "/var/www/$app".
+### If the app provides an internal web server (or uses another application server such as uWSGI), the final path should be "/opt/yunohost/$app"
+final_path=/opt/yunohost/$app
+test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
+
+# Register (book) web path
+ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
+
+#=================================================
+# STORE SETTINGS FROM MANIFEST
+#=================================================
+ynh_script_progression --message="Storing installation settings..." --time --weight=1
+
+ynh_app_setting_set --app=$app --key=domain --value=$domain
+ynh_app_setting_set --app=$app --key=path --value=$path_url
+
+#=================================================
+# STANDARD MODIFICATIONS
+#=================================================
+# FIND AND OPEN A PORT
+#=================================================
+ynh_script_progression --message="Finding an available port..." --time --weight=1
+
+### Use these lines if you have to open a port for the application
+### `ynh_find_port` will find the first available port starting from the given port.
+### If you're not using these lines:
+### - Remove the section "CLOSE A PORT" in the remove script
+
+# Find an available port
+#port_web is used for the web interface while port_rend is used by video renderer
+port_web=$(ynh_find_port --port=9001)
+ynh_app_setting_set --app=$app --key=port_web --value=$port_web
+port_rend=$(ynh_find_port --port=5001)
+ynh_app_setting_set --app=$app --key=port_rend --value=$port_rend
+# Optional: Expose this port publicly
+# (N.B.: you only need to do this if the app actually needs to expose the port publicly.
+# If you do this and the app doesn't actually need you are CREATING SECURITY HOLES IN THE SERVER !)
+
+# Open the port
+ynh_script_progression --message="Configuring firewall..." --time --weight=1
+ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $port_web
+ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $port_rend
+
+#=================================================
+# INSTALL DEPENDENCIES
+#=================================================
+ynh_script_progression --message="Installing dependencies..." --time --weight=1
+
+### `ynh_install_app_dependencies` allows you to add any "apt" dependencies to the package.
+### Those deb packages will be installed as dependencies of this package.
+### If you're not using this helper:
+### - Remove the section "REMOVE DEPENDENCIES" in the remove script
+### - Remove the variable "pkg_dependencies" in _common.sh
+### - As well as the section "REINSTALL DEPENDENCIES" in the restore script
+### - And the section "UPGRADE DEPENDENCIES" in the upgrade script
+
+ynh_install_app_dependencies $pkg_dependencies
+
+#=================================================
+# CREATE DEDICATED USER
+#=================================================
+ynh_script_progression --message="Configuring system user..." --time --weight=1
+
+# Create a system user
+ynh_system_user_create --username=$app --home_dir=/home/$app
+
+#=================================================
+#SETTING MULTIMEDIA DIRECTORY
+#=================================================
+
+ynh_multimedia_build_main_dir
+ynh_multimedia_addaccess $app
+
+
+#=================================================
+# DOWNLOAD, CHECK AND UNPACK SOURCE
+#=================================================
+ynh_script_progression --message="Setting up source files..." --time --weight=1
+
+# Download, check integrity, uncompress and patch the source from app.src
+# Create an app.src for the correct compiled version of UMS
+# match string are fulfilled in _common.sh
+cp ../conf/app.src.default ../conf/app.src
+ynh_replace_string --match_string="__MACH__" --replace_string="$MACH" --target_file="../conf/app.src"
+ynh_replace_string --match_string="__SHA256_SUM__" --replace_string="$SHA256" --target_file="../conf/app.src"
+
+ynh_app_setting_set --app=$app --key=final_path --value=$final_path
+# Download, check integrity, uncompress and patch the source from app.src
+ynh_setup_source --dest_dir="$final_path"
+tar xfvz $final_path/app.tgz --strip-component=1 --directory=$final_path/
+rm $final_path/app.tgz
+
+chmod 750 "$final_path"
+chmod -R o-rwx "$final_path"
+chown -R root:$app "$final_path"
+chown root:$app "$final_path/UMS.sh"
+
+
+#=================================================
+# NGINX CONFIGURATION
+#=================================================
+ynh_script_progression --message="Configuring NGINX web server..." --time --weight=1
+
+### `ynh_add_nginx_config` will use the file conf/nginx.conf
+
+# Create a dedicated NGINX config
+ynh_add_nginx_config
+
+
+#=================================================
+# SPECIFIC SETUP
+#=================================================
+# ...
+#=================================================
+
+#=================================================
+# SETUP SYSTEMD
+#=================================================
+ynh_script_progression --message="Configuring a systemd service..." --time --weight=1
+
+### `ynh_systemd_config` is used to configure a systemd script for an app.
+### It can be used for apps that use sysvinit (with adaptation) or systemd.
+### Have a look at the app to be sure this app needs a systemd script.
+### `ynh_systemd_config` will use the file conf/systemd.service
+### If you're not using these lines:
+### - You can remove those files in conf/.
+### - Remove the section "BACKUP SYSTEMD" in the backup script
+### - Remove also the section "STOP AND REMOVE SERVICE" in the remove script
+### - As well as the section "RESTORE SYSTEMD" in the restore script
+### - And the section "SETUP SYSTEMD" in the upgrade script
+
+# Create a dedicated systemd config
+ynh_add_systemd_config
+
+
+#=================================================
+# ADD A CONFIGURATION
+#=================================================
+
+### You can add specific configuration files.
+###
+### Typically, put your template conf file in ../conf/your_config_file
+### The template may contain strings such as __FOO__ or __FOO_BAR__,
+### which will automatically be replaced by the values of $foo and $foo_bar
+###
+### ynh_add_config will also keep track of the config file's checksum,
+### which later during upgrade may allow to automatically backup the config file
+### if it's found that the file was manually modified
+###
+### Check the documentation of `ynh_add_config` for more info.
+
+#ynh_add_config --template="some_config_file" --destination="$final_path/some_config_file"
+
+### For more complex cases where you want to replace stuff using regexes,
+### you shoud rely on ynh_replace_string (which is basically a wrapper for sed)
+### When doing so, you also need to manually call ynh_store_file_checksum
+###
+### ynh_replace_string --match_string="match_string" --replace_string="replace_string" --target_file="$final_path/some_config_file"
+### ynh_store_file_checksum --file="$final_path/some_config_file"
+mkdir -p "/home/$app/.config/UMS"
+ynh_add_config --template="UMS.conf" --destination="/home/$app/.config/UMS/"
+ynh_add_config --template="WEB.conf" --destination="/home/$app/.config/UMS/"
+ynh_add_config --template="VirtualFolders.conf" --destination="/home/$app/.config/UMS/"
+chown -R $app:$app "/home/$app/.config"
+chmod -R 700 "/home/$app/.config"
+#chmod 600 "/home/$app/.config/UMS/*"
+
+#=================================================
+# GENERIC FINALIZATION
+#=================================================
+# SECURE FILES AND DIRECTORIES
+#=================================================
+
+ynh_script_progression --message="Configuring log rotation..." --time --weight=1
+
+### `ynh_use_logrotate` is used to configure a logrotate configuration for the logs of this app.
+### Use this helper only if there is effectively a log file for this app.
+### If you're not using this helper:
+### - Remove the section "BACKUP LOGROTATE" in the backup script
+### - Remove also the section "REMOVE LOGROTATE CONFIGURATION" in the remove script
+### - As well as the section "RESTORE THE LOGROTATE CONFIGURATION" in the restore script
+### - And the section "SETUP LOGROTATE" in the upgrade script
+
+# Use logrotate to manage application logfile(s)
+ynh_use_logrotate
+
+#=================================================
+# INTEGRATE SERVICE IN YUNOHOST
+#=================================================
+ynh_script_progression --message="Integrating service in YunoHost..." --time --weight=1
+
+### `yunohost service add` integrates a service in YunoHost. It then gets
+### displayed in the admin interface and through the others `yunohost service` commands.
+### (N.B.: this line only makes sense if the app adds a service to the system!)
+### If you're not using these lines:
+### - You can remove these files in conf/.
+### - Remove the section "REMOVE SERVICE INTEGRATION IN YUNOHOST" in the remove script
+### - As well as the section "INTEGRATE SERVICE IN YUNOHOST" in the restore script
+### - And the section "INTEGRATE SERVICE IN YUNOHOST" in the upgrade script
+
+yunohost service add $app --description="A DLNA, UPnP and HTTP(S) Media Server." --log="/var/log/$app/$app.log"
+
+### Additional options starting with 3.8:
+###
+### --needs_exposed_ports "$port" a list of ports that needs to be publicly exposed
+### which will then be checked by YunoHost's diagnosis system
+### (N.B. DO NOT USE THIS is the port is only internal!!!)
+###
+### --test_status "some command" a custom command to check the status of the service
+### (only relevant if 'systemctl status' doesn't do a good job)
+###
+### --test_conf "some command" some command similar to "nginx -t" that validates the conf of the service
+###
+### Re-calling 'yunohost service add' during the upgrade script is the right way
+### to proceed if you later realize that you need to enable some flags that
+### weren't enabled on old installs (be careful it'll override the existing
+### service though so you should re-provide all relevant flags when doing so)
+
+#=================================================
+# START SYSTEMD SERVICE
+#=================================================
+ynh_script_progression --message="Starting a systemd service..." --time --weight=1
+
+### `ynh_systemd_action` is used to start a systemd service for an app.
+### Only needed if you have configure a systemd service
+### If you're not using these lines:
+### - Remove the section "STOP SYSTEMD SERVICE" and "START SYSTEMD SERVICE" in the backup script
+### - As well as the section "START SYSTEMD SERVICE" in the restore script
+### - As well as the section"STOP SYSTEMD SERVICE" and "START SYSTEMD SERVICE" in the upgrade script
+### - And the section "STOP SYSTEMD SERVICE" and "START SYSTEMD SERVICE" in the change_url script
+
+# Start a systemd service
+ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
+
+#=================================================
+# SETUP FAIL2BAN
+#=================================================
+#ynh_script_progression --message="Configuring Fail2Ban..." --time --weight=1
+
+# Create a dedicated Fail2Ban config
+#ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="Regex to match into the log for a failed login"
+
+#=================================================
+# SETUP SSOWAT
+#=================================================
+ynh_script_progression --message="Configuring permissions..." --time --weight=1
+
+# Make app public if necessary
+if [ $is_public -eq 1 ]
+then
+ # Everyone can access the app.
+ # The "main" permission is automatically created before the install script.
+ ynh_permission_update --permission="main" --add="visitors"
+fi
+
+### N.B. : the following extra permissions only make sense if your app
+### does have for example an admin interface or an api.
+
+# Only the admin can access the admin panel of the app (if the app has an admin panel)
+#ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin
+
+# Everyone can access to the api part
+# We don't want to display the tile in the sso so we put --show_tile="false"
+# And we don't want that the YunoHost Admin can remove visitors group to this permission, so we put --protected="true"
+#ynh_permission_create --permission="api" --url "/api" --allowed="visitors" --show_tile="false" --protected="true"
+
+#=================================================
+# RELOAD NGINX
+#=================================================
+ynh_script_progression --message="Reloading NGINX web server..." --time --weight=1
+
+ynh_systemd_action --service_name=nginx --action=reload
+
+#=================================================
+# END OF SCRIPT
+#=================================================
+
+ynh_script_progression --message="Installation of $app completed" --time --last
diff --git a/scripts/remove b/scripts/remove
new file mode 100755
index 0000000..5056b4f
--- /dev/null
+++ b/scripts/remove
@@ -0,0 +1,141 @@
+#!/bin/bash
+
+#=================================================
+# GENERIC START
+#=================================================
+# IMPORT GENERIC HELPERS
+#=================================================
+
+source _common.sh
+source /usr/share/yunohost/helpers
+
+#=================================================
+# LOAD SETTINGS
+#=================================================
+ynh_script_progression --message="Loading installation settings..." --time --weight=1
+
+app=$YNH_APP_INSTANCE_NAME
+
+domain=$(ynh_app_setting_get --app=$app --key=domain)
+port=$(ynh_app_setting_get --app=$app --key=port)
+db_name=$(ynh_app_setting_get --app=$app --key=db_name)
+db_user=$db_name
+final_path=$(ynh_app_setting_get --app=$app --key=final_path)
+
+#=================================================
+# STANDARD REMOVE
+#=================================================
+# REMOVE SERVICE INTEGRATION IN YUNOHOST
+#=================================================
+
+# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
+if ynh_exec_warn_less yunohost service status $app >/dev/null
+then
+ ynh_script_progression --message="Removing $app service integration..." --time --weight=1
+ yunohost service remove $app
+fi
+
+#=================================================
+# STOP AND REMOVE SERVICE
+#=================================================
+ynh_script_progression --message="Stopping and removing the systemd service..." --time --weight=1
+
+# Remove the dedicated systemd config
+ynh_remove_systemd_config
+
+#=================================================
+# REMOVE THE MYSQL DATABASE
+#=================================================
+ynh_script_progression --message="Removing the MySQL database..." --time --weight=1
+
+# Remove a database if it exists, along with the associated user
+ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name
+
+#=================================================
+# REMOVE DEPENDENCIES
+#=================================================
+ynh_script_progression --message="Removing dependencies..." --time --weight=1
+
+# Remove metapackage and its dependencies
+ynh_remove_app_dependencies
+
+#=================================================
+# REMOVE APP MAIN DIR
+#=================================================
+ynh_script_progression --message="Removing app main directory..." --time --weight=1
+
+# Remove the app directory securely
+ynh_secure_remove --file="$final_path"
+
+#=================================================
+# REMOVE NGINX CONFIGURATION
+#=================================================
+ynh_script_progression --message="Removing NGINX web server configuration..." --time --weight=1
+
+# Remove the dedicated NGINX config
+ynh_remove_nginx_config
+
+#=================================================
+# REMOVE PHP-FPM CONFIGURATION
+#=================================================
+ynh_script_progression --message="Removing PHP-FPM configuration..." --time --weight=1
+
+# Remove the dedicated PHP-FPM config
+ynh_remove_fpm_config
+
+#=================================================
+# REMOVE LOGROTATE CONFIGURATION
+#=================================================
+ynh_script_progression --message="Removing logrotate configuration..." --time --weight=1
+
+# Remove the app-specific logrotate config
+ynh_remove_logrotate
+
+#=================================================
+# CLOSE A PORT
+#=================================================
+
+if yunohost firewall list | grep -q "\- $port$"
+then
+ ynh_script_progression --message="Closing port $port..." --time --weight=1
+ ynh_exec_warn_less yunohost firewall disallow TCP $port
+fi
+
+#=================================================
+# REMOVE FAIL2BAN CONFIGURATION
+#=================================================
+ynh_script_progression --message="Removing Fail2ban configuration..." --time --weight=1
+
+# Remove the dedicated Fail2Ban config
+ynh_remove_fail2ban_config
+
+#=================================================
+# SPECIFIC REMOVE
+#=================================================
+# REMOVE VARIOUS FILES
+#=================================================
+
+# Remove a cron file
+ynh_secure_remove --file="/etc/cron.d/$app"
+
+# Remove a directory securely
+ynh_secure_remove --file="/etc/$app"
+
+# Remove the log files
+ynh_secure_remove --file="/var/log/$app"
+
+#=================================================
+# GENERIC FINALIZATION
+#=================================================
+# REMOVE DEDICATED USER
+#=================================================
+ynh_script_progression --message="Removing the dedicated system user..." --time --weight=1
+
+# Delete a system user
+ynh_system_user_delete --username=$app
+
+#=================================================
+# END OF SCRIPT
+#=================================================
+
+ynh_script_progression --message="Removal of $app completed" --time --last
diff --git a/scripts/restore b/scripts/restore
new file mode 100755
index 0000000..c334a77
--- /dev/null
+++ b/scripts/restore
@@ -0,0 +1,162 @@
+#!/bin/bash
+
+#=================================================
+# GENERIC START
+#=================================================
+# IMPORT GENERIC HELPERS
+#=================================================
+
+# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
+source ../settings/scripts/_common.sh
+source /usr/share/yunohost/helpers
+
+#=================================================
+# MANAGE SCRIPT FAILURE
+#=================================================
+
+ynh_clean_setup () {
+ #### Remove this function if there's nothing to clean before calling the remove script.
+ true
+}
+# Exit if an error occurs during the execution of the script
+ynh_abort_if_errors
+
+#=================================================
+# LOAD SETTINGS
+#=================================================
+ynh_script_progression --message="Loading installation settings..." --time --weight=1
+
+app=$YNH_APP_INSTANCE_NAME
+
+domain=$(ynh_app_setting_get --app=$app --key=domain)
+path_url=$(ynh_app_setting_get --app=$app --key=path)
+final_path=$(ynh_app_setting_get --app=$app --key=final_path)
+db_name=$(ynh_app_setting_get --app=$app --key=db_name)
+db_user=$db_name
+phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
+
+#=================================================
+# CHECK IF THE APP CAN BE RESTORED
+#=================================================
+ynh_script_progression --message="Validating restoration parameters..." --time --weight=1
+
+ynh_webpath_available --domain=$domain --path_url=$path_url \
+ || ynh_die --message="Path not available: ${domain}${path_url}"
+test ! -d $final_path \
+ || ynh_die --message="There is already a directory: $final_path "
+
+#=================================================
+# STANDARD RESTORATION STEPS
+#=================================================
+# RESTORE THE NGINX CONFIGURATION
+#=================================================
+
+ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
+
+#=================================================
+# RESTORE THE APP MAIN DIR
+#=================================================
+ynh_script_progression --message="Restoring the app main directory..." --time --weight=1
+
+ynh_restore_file --origin_path="$final_path"
+
+#=================================================
+# RECREATE THE DEDICATED USER
+#=================================================
+ynh_script_progression --message="Recreating the dedicated system user..." --time --weight=1
+
+# Create the dedicated user (if not existing)
+ynh_system_user_create --username=$app
+
+#=================================================
+# RESTORE USER RIGHTS
+#=================================================
+
+# Restore permissions on app files
+chown -R root: $final_path
+
+#=================================================
+# RESTORE THE PHP-FPM CONFIGURATION
+#=================================================
+
+ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
+
+#=================================================
+# RESTORE FAIL2BAN CONFIGURATION
+#=================================================
+ynh_script_progression --message="Restoring the Fail2Ban configuration..." --time --weight=1
+
+ynh_restore_file "/etc/fail2ban/jail.d/$app.conf"
+ynh_restore_file "/etc/fail2ban/filter.d/$app.conf"
+ynh_systemd_action --action=restart --service_name=fail2ban
+
+#=================================================
+# SPECIFIC RESTORATION
+#=================================================
+# REINSTALL DEPENDENCIES
+#=================================================
+ynh_script_progression --message="Reinstalling dependencies..." --time --weight=1
+
+# Define and install dependencies
+ynh_install_app_dependencies $pkg_dependencies
+
+#=================================================
+# RESTORE THE MYSQL DATABASE
+#=================================================
+ynh_script_progression --message="Restoring the MySQL database..." --time --weight=1
+
+db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
+ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
+ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
+
+#=================================================
+# RESTORE SYSTEMD
+#=================================================
+ynh_script_progression --message="Restoring the systemd configuration..." --time --weight=1
+
+ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
+systemctl enable $app.service --quiet
+
+#=================================================
+# INTEGRATE SERVICE IN YUNOHOST
+#=================================================
+ynh_script_progression --message="Integrating service in YunoHost..." --time --weight=1
+
+yunohost service add $app --description="A short description of the app" --log="/var/log/$app/$app.log"
+
+#=================================================
+# START SYSTEMD SERVICE
+#=================================================
+ynh_script_progression --message="Starting a systemd service..." --time --weight=1
+
+ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
+
+#=================================================
+# RESTORE VARIOUS FILES
+#=================================================
+
+ynh_restore_file --origin_path="/etc/cron.d/$app"
+
+ynh_restore_file --origin_path="/etc/$app/"
+
+#=================================================
+# RESTORE THE LOGROTATE CONFIGURATION
+#=================================================
+
+ynh_restore_file --origin_path="/etc/logrotate.d/$app"
+
+#=================================================
+# GENERIC FINALIZATION
+#=================================================
+# RELOAD NGINX AND PHP-FPM
+#=================================================
+ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --time --weight=1
+
+ynh_systemd_action --service_name=php$phpversion-fpm --action=reload
+ynh_systemd_action --service_name=nginx --action=reload
+
+#=================================================
+# END OF SCRIPT
+#=================================================
+
+ynh_script_progression --message="Restoration completed for $app" --time --last
diff --git a/scripts/upgrade b/scripts/upgrade
new file mode 100644
index 0000000..a749b70
--- /dev/null
+++ b/scripts/upgrade
@@ -0,0 +1,229 @@
+#!/bin/bash
+
+#=================================================
+# GENERIC START
+#=================================================
+# IMPORT GENERIC HELPERS
+#=================================================
+
+source _common.sh
+source /usr/share/yunohost/helpers
+
+#=================================================
+# LOAD SETTINGS
+#=================================================
+ynh_script_progression --message="Loading installation settings..." --time --weight=1
+
+app=$YNH_APP_INSTANCE_NAME
+
+domain=$(ynh_app_setting_get --app=$app --key=domain)
+path_url=$(ynh_app_setting_get --app=$app --key=path)
+admin=$(ynh_app_setting_get --app=$app --key=admin)
+final_path=$(ynh_app_setting_get --app=$app --key=final_path)
+language=$(ynh_app_setting_get --app=$app --key=language)
+db_name=$(ynh_app_setting_get --app=$app --key=db_name)
+
+#=================================================
+# CHECK VERSION
+#=================================================
+
+### This helper will compare the version of the currently installed app and the version of the upstream package.
+### $upgrade_type can have 2 different values
+### - UPGRADE_APP if the upstream app version has changed
+### - UPGRADE_PACKAGE if only the YunoHost package has changed
+### ynh_check_app_version_changed will stop the upgrade if the app is up to date.
+### UPGRADE_APP should be used to upgrade the core app only if there's an upgrade to do.
+upgrade_type=$(ynh_check_app_version_changed)
+
+#=================================================
+# ENSURE DOWNWARD COMPATIBILITY
+#=================================================
+ynh_script_progression --message="Ensuring downward compatibility..." --time --weight=1
+
+#
+# N.B. : the followings setting migrations snippets are provided as *EXAMPLES*
+# of what you may want to do in some cases (e.g. a setting was not defined on
+# some legacy installs and you therefore want to initiaze stuff during upgrade)
+#
+
+# If db_name doesn't exist, create it
+#if [ -z "$db_name" ]; then
+# db_name=$(ynh_sanitize_dbid --db_name=$app)
+# ynh_app_setting_set --app=$app --key=db_name --value=$db_name
+#fi
+
+# If final_path doesn't exist, create it
+#if [ -z "$final_path" ]; then
+# final_path=/var/www/$app
+# ynh_app_setting_set --app=$app --key=final_path --value=$final_path
+#fi
+
+### If nobody installed your app before 4.1,
+### then you may safely remove these lines
+
+# Cleaning legacy permissions
+if ynh_legacy_permissions_exists; then
+ ynh_legacy_permissions_delete_all
+
+ ynh_app_setting_delete --app=$app --key=is_public
+fi
+
+if ! ynh_permission_exists --permission="admin"; then
+ # Create the required permissions
+ ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin
+fi
+
+# Create a permission if needed
+if ! ynh_permission_exists --permission="api"; then
+ ynh_permission_create --permission="api" --url "/api" --allowed="visitors" --show_tile="false" --protected="true"
+fi
+
+#=================================================
+# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
+#=================================================
+ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --time --weight=1
+
+# Backup the current version of the app
+ynh_backup_before_upgrade
+ynh_clean_setup () {
+ # Restore it if the upgrade fails
+ ynh_restore_upgradebackup
+}
+# Exit if an error occurs during the execution of the script
+ynh_abort_if_errors
+
+#=================================================
+# STANDARD UPGRADE STEPS
+#=================================================
+# STOP SYSTEMD SERVICE
+#=================================================
+ynh_script_progression --message="Stopping a systemd service..." --time --weight=1
+
+ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log"
+
+#=================================================
+# DOWNLOAD, CHECK AND UNPACK SOURCE
+#=================================================
+
+if [ "$upgrade_type" == "UPGRADE_APP" ]
+then
+ ynh_script_progression --message="Upgrading source files..." --time --weight=1
+
+ # Download, check integrity, uncompress and patch the source from app.src
+ ynh_setup_source --dest_dir="$final_path"
+fi
+
+#=================================================
+# NGINX CONFIGURATION
+#=================================================
+ynh_script_progression --message="Upgrading NGINX web server configuration..." --time --weight=1
+
+# Create a dedicated NGINX config
+ynh_add_nginx_config
+
+#=================================================
+# UPGRADE DEPENDENCIES
+#=================================================
+ynh_script_progression --message="Upgrading dependencies..." --time --weight=1
+
+ynh_install_app_dependencies $pkg_dependencies
+
+#=================================================
+# CREATE DEDICATED USER
+#=================================================
+ynh_script_progression --message="Making sure dedicated system user exists..." --time --weight=1
+
+# Create a dedicated user (if not existing)
+ynh_system_user_create --username=$app
+
+#=================================================
+# PHP-FPM CONFIGURATION
+#=================================================
+ynh_script_progression --message="Upgrading PHP-FPM configuration..." --time --weight=1
+
+# Create a dedicated PHP-FPM config
+ynh_add_fpm_config
+
+#=================================================
+# SPECIFIC UPGRADE
+#=================================================
+# ...
+#=================================================
+
+#=================================================
+# SETUP SYSTEMD
+#=================================================
+ynh_script_progression --message="Upgrading systemd configuration..." --time --weight=1
+
+# Create a dedicated systemd config
+ynh_add_systemd_config
+
+#=================================================
+# UPDATE A CONFIG FILE
+#=================================================
+
+### Same as during install
+###
+### The file will automatically be backed-up if it's found to be manually modified (because
+### ynh_add_config keeps track of the file's checksum)
+
+ynh_add_config --template="some_config_file" --destination="$final_path/some_config_file"
+
+### For more complex cases where you want to replace stuff using regexes,
+### you shoud rely on ynh_replace_string (which is basically a wrapper for sed)
+### When doing so, you also need to manually call ynh_store_file_checksum
+###
+### ynh_replace_string --match_string="match_string" --replace_string="replace_string" --target_file="$final_path/some_config_file"
+### ynh_store_file_checksum --file="$final_path/some_config_file"
+
+#=================================================
+# GENERIC FINALIZATION
+#=================================================
+# SECURE FILES AND DIRECTORIES
+#=================================================
+
+# Set permissions on app files
+chown -R root: $final_path
+
+#=================================================
+# SETUP LOGROTATE
+#=================================================
+ynh_script_progression --message="Upgrading logrotate configuration..." --time --weight=1
+
+# Use logrotate to manage app-specific logfile(s)
+ynh_use_logrotate --non-append
+
+#=================================================
+# INTEGRATE SERVICE IN YUNOHOST
+#=================================================
+ynh_script_progression --message="Integrating service in YunoHost..." --time --weight=1
+
+yunohost service add $app --description="A short description of the app" --log="/var/log/$app/$app.log"
+
+#=================================================
+# START SYSTEMD SERVICE
+#=================================================
+ynh_script_progression --message="Starting a systemd service..." --time --weight=1
+
+ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
+
+#=================================================
+# UPGRADE FAIL2BAN
+#=================================================
+ynh_script_progression --message="Reconfiguring Fail2Ban..." --time --weight=1
+
+# Create a dedicated Fail2Ban config
+ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="Regex to match into the log for a failed login"
+
+#=================================================
+# RELOAD NGINX
+#=================================================
+ynh_script_progression --message="Reloading NGINX web server..." --time --weight=1
+
+ynh_systemd_action --service_name=nginx --action=reload
+
+#=================================================
+# END OF SCRIPT
+#=================================================
+
+ynh_script_progression --message="Upgrade of $app completed" --time --last
diff --git a/sources/extra_files/app/.gitignore b/sources/extra_files/app/.gitignore
new file mode 100644
index 0000000..783a4ae
--- /dev/null
+++ b/sources/extra_files/app/.gitignore
@@ -0,0 +1,2 @@
+*~
+*.sw[op]
diff --git a/sources/patches/.gitignore b/sources/patches/.gitignore
new file mode 100644
index 0000000..783a4ae
--- /dev/null
+++ b/sources/patches/.gitignore
@@ -0,0 +1,2 @@
+*~
+*.sw[op]