1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/UMS_ynh.git synced 2024-10-01 13:35:01 +02:00

Merge pull request #5 from YunoHost-Apps/testing

Clean up and new settings
This commit is contained in:
Krakinou 2021-05-06 23:05:27 +02:00 committed by GitHub
commit 2c4497b31f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 63 additions and 66 deletions

View file

@ -24,12 +24,16 @@ Upstream source code may be found [here](https://github.com/UniversalMediaServer
## Screenshots
![](Link to a screenshot of this app.)
![](https://www.universalmediaserver.com/assets/img/web-interface.gif)
## Configuration
Once installed, UMS will create config file in `/home/ums/.config/UMS/`
All settings are pretty well documented. You may change them from here.
All settings are pretty well documented directly in the files.
The default setting will use the shared multimedia directory by default (located into `/home/yunohost.multimedia/share`), you may change this setting in `/home/ums/.config/UMS/UMS.conf` with the setting "folders"
## Documentation
@ -44,9 +48,6 @@ All settings are pretty well documented. You may change them from here.
For now, the app support single instance only.
As there is no user management, LDAP is not requested.
The default setting will use the shared multimedia directory by default, you may change this setting in `/home/ums/.config/UMS/UMS.conf` with the setting "folders"
#### Supported architectures
@ -55,19 +56,20 @@ The default setting will use the shared multimedia directory by default, you may
## Limitations
* Known limitations :
- No multiinstance
- No multi-instance
- work only on its own subdomain (ums.mydomain.tld, not on mydomain.tld/ums)
- No user management
- Not tested that much
## Additional information
I added the possibility to install vlc on installation. Beware! I addn't tested it and I'm not sure it is of any use for a headless server.
Moreover, it will download a full graphical UI, so not very useful on a server...
##Other infos
**More info on the documentation page:**
https://yunohost.org/packaging_apps
If you can't find the server on a renderer, you may try the following trouble shooting :
- Wait a little bit : the first start up will intialized the database and if you have a lot of media, this may take a while
- Wait a little more : the server will broadcast an ALIVE message every 30 sec, so it may take this long for a renderer to find it
- check if the service ums is running in the yunohost admin
- check on which network interface the server is annoucing : You may find the network and address used in `/home/ums/.config/UMS/debug.log` or `/var/log/ums/ums.log`. Search for a line like `Using address /192.168.0.54 found on network interface: name:enp0s3 (enp0s3)`
The subnet to be used should be the same as your renderer (ie : if your TV is on 192.168.0.X and ums on 192.168.1.X, this will not work)
## Links

View file

@ -23,12 +23,13 @@ Le code du programme peut ^etre consulté [ici]](https://github.com/UniversalMed
## Captures d'écran
![](Lien vers une capture d'écran de cette application.)
![](https://www.universalmediaserver.com/assets/img/web-interface.gif)
## Configuration
Une fois installé, tous les réglages peuvent etre trouver dans `/ums/.config/UMS/`
Les réglages sont plutot bien documentés, vous pouvez les changer directement dans le fichier.
Le réglage par défaut utilisera le répertoire multimedia partagé (situé dans `/home/yunohost.multimedia/share`). Vous pouvez changer ce réglage dans le fichier `/home/ums/.config/UMS/UMS.conf` sur le réglage "folders".
## Documentation
@ -39,10 +40,10 @@ Les réglages sont plutot bien documentés, vous pouvez les changer directement
#### Support multi-utilisateur
Pour l'instant, l'application supporte uniuqment un mode mono-instance.
Pour l'instant, l'application supporte uniquement un mode mono-instance.
Et comme elle ne gère pas d'utilisateur, il n'y a bien entendu pas de LDAP.
Le réglage par défaut partagera le répertoire multimedia partagé. Vous pouvez changer ce réglage dans le fichier `/home/ums/.config/UMS/UMS.conf` sur le réglage "folders".
#### Architectures supportées
@ -51,19 +52,20 @@ Le réglage par défaut partagera le répertoire multimedia partagé. Vous pouve
## Limitations
* Limitations connues:
- pas de multiinstance
- fonctionne uniquement en sous-domaine (ums.mydomain.tld, et non mydomain.tld/ums)
- pas de gestion d'utilisateur
- Pas énormément testée
## Informations additionnelles
##Other infos
J'ai rajouté la possibilité d'installer vlc lors de l'installation. ATTENTION, je ne l'ai pas testé et je ne suis pas sur que cela serve à quelque chose sur un serveur headless...
De plus, vlc requiert l'installation d'un environnement graphique complet.
Si vous ne trouvez pas le serveur sur vos renderer, vous pouvez essayer les trucs suivants:
- Attendez un petit peu : lors du premier démarrage, UMS va indexer tous vos médias et ceci peut prendre un certain temps si vous en avez beaucoup
- Attendez encore un peu : le serveur s'annonce par un message ALIVE toutes les 30 sec, donc cela peut prendre tout ce temps avant qu'un renderer ne le trouve
- Vérifiez bien que le service ums tourne dans l'interface d'administration de yunohost
- Vérifiez sur quel interface réseau ums s'annonce. Vous pouvez trouver l'adresse utilisée et le réseau dans `/home/ums/.config/UMS/debug.log` ou `/var/log/ums/ums.log`. Cherchez une ligne ressemblant à `Using address /192.168.0.54 found on network interface: name:enp0s3 (enp0s3)`. Le sous-réseau utilisé doit être le même que le renderer (ie : si votre TV est sur 192.168.0.X et ums sur 192.168.1.X, cela ne marchera pas)
**Plus d'informations sur la page de documentation :**
https://yunohost.org/packaging_apps
Sur de petits appareils (par exemple une raspberry, la transco peut demander trop de puissance, n'hésiter par à utiliser des transcodeur alternatifs.
## Liens

View file

@ -2,7 +2,8 @@
; Manifest
domain="domain.tld" (DOMAIN)
is_public=1 (PUBLIC|public=1|private=0)
vlc=no
name=MyUMS
interface=eth0
; Checks
pkg_linter=1
#Only work w/ root domain

View file

@ -38,7 +38,7 @@
# -----------
# The server name is displayed in the renderer before the profile name.
# Default: "Universal Media Server"
server_name =
server_name =__SERVER_NAME__
# Append profile name
# -------------------
@ -143,7 +143,7 @@ single_instance =
# 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 =
network_interface =__INTERFACE__
# Force IP of the server
# ----------------------
@ -157,7 +157,7 @@ hostname =
# 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 =
port =__PORT_REND__
# Use an IP filter (whitelist)
# ----------------------------
@ -1626,7 +1626,7 @@ search_recurse_depth=
# 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 =
log_level = INFO
# Logfile name
# ------------
@ -1652,7 +1652,7 @@ logging_logfile_name =
# Please note: If UMS is started in "forced" TRACE mode, buffering will
# be disabled regardless of this setting.
# Default: false
logging_buffered =
logging_buffered = true
# Logging Filter Console
# ----------------------

View file

@ -37,15 +37,30 @@
}
},
{
"name":"vlc",
"type": "boolean",
"name":"server_name",
"type":"string",
"example":"MyUMS",
"default": "UniversalMediaServer",
"ask": {
"en": "By which name should UMS be identified by your renderer",
"fr": "Par quel nom UMS doit-il être identifié par vos appareils"
},
"help": {
"en": "This has no impact on the way the server will work and is only use to identify it on the network",
"fr": "Ceci n a aucun impact sur le fonctionnement du serveur et sert uniquement à l identifier sur le réseau"
}
},
{
"name":"interface",
"type": "string",
"default": "eth0",
"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"
"en" : "Which network interface do you want to use?",
"fr" : "Quel réseau souhaitez vous utiliser?"
},
"help": {
"en": "This will use approx 600GB more and will install a LOT of dependencies - NOT RECOMMENDED",
"fr": "Cela va utiliser environ 600GB supplémentaires et installera BEAUCOUP de dépendances - NON RECOMMANDE"
"en": "On lan, the interface is usually eth0, on wifi it s usually wlan0",
"fr": "En filaire, l interface est souvent eth0, en wifi wlan0"
}
}
]

View file

@ -10,17 +10,21 @@ pkg_dependencies="mediainfo dcraw p7zip"
MACH=`uname -m`
case "$MACH" in
"armv6l" ) MACH="armel"
SHA256=1051fd725ff2c8da469fd9c0d1331e3c8ec031194303a8c79f7fad80c70e4a5e ;;
SHA256=1051fd725ff2c8da469fd9c0d1331e3c8ec031194303a8c79f7fad80c70e4a5e
#for some reason, jre is not in the tarball
pkg_dependencies="$pkg_dependencies openjdk-8-jre" ;;
"armv7l" ) if [ $(dpkg --print-architecture) = "armhf" ]; then
MACH="armhf"
SHA256=194686fb5af695112485780b2cb89af2ec7cb675f166ff2717c7fc66eac958c0
pkg_dependencies="$pkg_dependencies openjdk-8-jre"
else
MACH="armel"
SHA256=1051fd725ff2c8da469fd9c0d1331e3c8ec031194303a8c79f7fad80c70e4a5e
pkg_dependencies="$pkg_dependencies openjdk-8-jre"
fi ;;
"armv8l" ) MACH="arm64"
"armv8l" ) MACH="arm64"
SHA256=179ad2ff3800001b8e51d21776426d88c72c1ca1e4030363f3e9b4820d0919cc ;;
"x86_64" ) MACH="x86_64"
"x86_64" ) MACH="x86_64"
SHA256=7fbed13a5c5f8eb01f6f1b4815c73fb4b21b81b4affff29b5185715fa76f841b ;;
* ) MACH="x86"
SHA256=ec8e67e3b03300857116ebb9ddfe1bd938b506e9ba603df02f3c8d38bf9bb7be ;;

View file

@ -27,14 +27,12 @@ ynh_abort_if_errors
domain=$YNH_APP_ARG_DOMAIN
path_url=/
is_public=$YNH_APP_ARG_IS_PUBLIC
vlc_required=$YNH_APP_ARG_VLC
server_name=$YNH_APP_ARG_SERVER_NAME
interface=$YNH_APP_ARG_INTERFACE
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
@ -55,7 +53,6 @@ ynh_script_progression --message="Storing installation settings..." --weight=1
ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url
#will be used when restoring
ynh_app_setting_set --app=$app --key=vlc --value=$vlc_required
#=================================================
# STANDARD MODIFICATIONS

View file

@ -33,11 +33,8 @@ path_url=$(ynh_app_setting_get --app=$app --key=path)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
port_web=$(ynh_app_setting_get --app=$app --key=port_web)
port_rend=$(ynh_app_setting_get --app=$app --key=port_rend)
vlc_required=$(ynh_app_setting_get --app=$app --key=vlc)
if [ "$vlc_required" -eq 1 ] ; then
pkg_dependencies="$pkg_dependencies vlc"
fi
#=================================================
# CHECK IF THE APP CAN BE RESTORED

View file

@ -21,11 +21,6 @@ path_url=$(ynh_app_setting_get --app=$app --key=path)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
port_web=$(ynh_app_setting_get --app=$app --key=port_web)
port_rend=$(ynh_app_setting_get --app=$app --key=port_rend)
vlc_required=$(ynh_app_setting_get --app=$app --key=vlc)
if [ "$vlc_required" -eq 1 ] ; then
pkg_dependencies="$pkg_dependencies vlc"
fi
#=================================================
# CHECK VERSION
@ -122,22 +117,6 @@ ynh_script_progression --message="Upgrading systemd configuration..." --weight=1
# Create a dedicated systemd config
ynh_add_systemd_config
#=================================================
# UPDATE A CONFIG FILE
#=================================================
ynh_script_progression --message="Setting up configuration file..." --weight=3
### 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)
mkdir -p "/home/$app/.config/UMS"
ynh_add_config --template="UMS.conf.default" --destination="/home/$app/.config/UMS/UMS.conf"
ynh_add_config --template="WEB.conf.default" --destination="/home/$app/.config/UMS/WEB.conf"
ynh_add_config --template="VirtualFolders.conf.default" --destination="/home/$app/.config/UMS/VirtualFolders.conf"
chown -R $app:$app "/home/$app/.config"
chmod -R 700 "/home/$app/.config"
#=================================================
# GENERIC FINALIZATION
#=================================================