mirror of
https://github.com/YunoHost-Apps/minidlna_ynh.git
synced 2024-09-03 19:36:34 +02:00
Use toml for actions and config-panel
This commit is contained in:
parent
6ce3fed427
commit
bf41e7cf74
4 changed files with 51 additions and 74 deletions
25
actions.json
25
actions.json
|
@ -1,25 +0,0 @@
|
||||||
[{
|
|
||||||
"id": "install_standard",
|
|
||||||
"name": "Install the version from stable repository",
|
|
||||||
"command": "/bin/bash scripts/actions/install_standard",
|
|
||||||
"user": "root",
|
|
||||||
"accepted_return_codes": [0]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "install_backports",
|
|
||||||
"name": "Install the version from backports repository",
|
|
||||||
"command": "/bin/bash scripts/actions/install_backports",
|
|
||||||
"user": "root",
|
|
||||||
"accepted_return_codes": [0]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "reset_db",
|
|
||||||
"name": "Reinitialise the database",
|
|
||||||
"command": "/bin/bash scripts/actions/reset_db",
|
|
||||||
"user": "root",
|
|
||||||
"accepted_return_codes": [0],
|
|
||||||
"description": {
|
|
||||||
"en": "Remove the database and force Minidlna to create a new one.",
|
|
||||||
"fr": "Supprime la base de donnée et force Minidlna a en recréer une nouvelle."
|
|
||||||
}
|
|
||||||
}]
|
|
12
actions.toml
Normal file
12
actions.toml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
[install_standard]
|
||||||
|
name = "Install the version from stable repository"
|
||||||
|
command = "/bin/bash scripts/actions/install_standard"
|
||||||
|
|
||||||
|
[install_backports]
|
||||||
|
name = "Install the version from backports repository"
|
||||||
|
command = "/bin/bash scripts/actions/install_backports"
|
||||||
|
|
||||||
|
[reset_db]
|
||||||
|
name = "Reinitialise the database"
|
||||||
|
command = "/bin/bash scripts/actions/reset_db"
|
||||||
|
description = "Remove the database and force Minidlna to create a new one."
|
|
@ -1,49 +0,0 @@
|
||||||
{
|
|
||||||
"name": "Minidlna configuration panel",
|
|
||||||
"version": "0.1",
|
|
||||||
"panel": [{
|
|
||||||
"name": "Minidlna configuration",
|
|
||||||
"id": "main",
|
|
||||||
"sections": [{
|
|
||||||
"name": "Minidlna configuration",
|
|
||||||
"id": "minidlna_configuration",
|
|
||||||
"options": [{
|
|
||||||
"name": "Type of directory shown to the clients ?",
|
|
||||||
"help": "We can't use a choices field for now. In the meantime please choose between one of this values:<br>Standard container, Browse Directory, Music, Pictures or Video.",
|
|
||||||
"id": "root_container",
|
|
||||||
"type": "text",
|
|
||||||
"//": "\"choices\" : [\"Standard container\", \"Browse Directory\", \"Music\", \"Pictures\", \"Video\"]",
|
|
||||||
"default" : "Browse Directory"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Name of DLNA server shown to clients ?",
|
|
||||||
"id": "friendly_name",
|
|
||||||
"type": "text",
|
|
||||||
"default": "Yunohost DLNA"
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Overwriting config files",
|
|
||||||
"id": "overwrite_files",
|
|
||||||
"options": [{
|
|
||||||
"name": "Overwrite the config file minidlna.conf ?",
|
|
||||||
"help": "If the file is overwritten, a backup will be created.",
|
|
||||||
"id": "overwrite_settings",
|
|
||||||
"type": "bool",
|
|
||||||
"default": true
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Global configuration",
|
|
||||||
"id": "global_config",
|
|
||||||
"options": [{
|
|
||||||
"name": "Send HTML email to admin ?",
|
|
||||||
"help": "Allow app scripts to send HTML mails instead of plain text.",
|
|
||||||
"id": "email_type",
|
|
||||||
"type": "bool",
|
|
||||||
"default": true
|
|
||||||
}]
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
39
config_panel.toml
Normal file
39
config_panel.toml
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
version = "0.1"
|
||||||
|
name = "Minidlna configuration panel"
|
||||||
|
|
||||||
|
|
||||||
|
[main]
|
||||||
|
name = "Minidlna configuration"
|
||||||
|
|
||||||
|
[main.minidlna_configuration]
|
||||||
|
name = "Minidlna configuration"
|
||||||
|
|
||||||
|
[main.minidlna_configuration.root_container]
|
||||||
|
ask = "Type of directory shown to the clients ?"
|
||||||
|
choices = ["Standard container", "Browse Directory", "Music", "Pictures", "Video"]
|
||||||
|
default = "Browse Directory"
|
||||||
|
|
||||||
|
[main.minidlna_configuration.friendly_name]
|
||||||
|
ask = "Name of DLNA server shown to clients ?"
|
||||||
|
type = "text"
|
||||||
|
default = "Yunohost DLNA"
|
||||||
|
|
||||||
|
|
||||||
|
[main.overwrite_files]
|
||||||
|
name = "Overwriting config files"
|
||||||
|
|
||||||
|
[main.overwrite_files.overwrite_settings]
|
||||||
|
ask = "Overwrite the config file minidlna.conf ?"
|
||||||
|
type = "boolean"
|
||||||
|
default = true
|
||||||
|
help = "If the file is overwritten, a backup will be created."
|
||||||
|
|
||||||
|
|
||||||
|
[main.global_config]
|
||||||
|
name = "Global configuration"
|
||||||
|
|
||||||
|
[main.global_config.email_type]
|
||||||
|
ask = "Send HTML email to admin ?"
|
||||||
|
type = "boolean"
|
||||||
|
default = true
|
||||||
|
help = "Allow app scripts to send HTML mails instead of plain text."
|
Loading…
Add table
Reference in a new issue