diff --git a/conf/config.json b/conf/config.json index f7b5bf5..f907bf1 100644 --- a/conf/config.json +++ b/conf/config.json @@ -26,9 +26,9 @@ }, "feed": { "external_url": "https://__DOMAIN__", - "title": "Feed Title", + "title": "__FEED_TITLE__", "link": "http://__DOMAIN__/about", - "description": "Feed Description", + "description": "__FEED_DESCRIPTION__", "author": { "name": "Author Name", "email": "author@somewhere.example" diff --git a/config_panel.toml b/config_panel.toml index 6f7eec5..0092627 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -12,4 +12,19 @@ services = ["__APP__"] type = "number" help = "Set max_upload_size to the maximum number of bytes you wish to impose on uploaded and imported videos. Upload(s)/Import(s) that exceed this size will by denied by the server. This is a saftey measure so as to not DoS the Tube server instance. Set it to a sensible value you see fit." bind = "max_upload_size:/var/www/__APP__/config.json" + + [main.rss] + name = "RSS feed information" + + [main.rss.feed_title] + ask = "Feed title" + type = "string" + help = "Set the feed title for your RSS feed" + bind = "title:/var/www/__APP__/config.json" + + [main.rss.feed_description] + ask = "Feed Description" + type = "string" + help = "Set the feed description for your RSS feed" + bind = "title:/var/www/__APP__/config.json" \ No newline at end of file diff --git a/scripts/install b/scripts/install index ddd600a..74ac579 100755 --- a/scripts/install +++ b/scripts/install @@ -29,7 +29,10 @@ path_url="/" is_public=$YNH_APP_ARG_IS_PUBLIC app=$YNH_APP_INSTANCE_NAME + max_upload_size=100 +feed_title="Feed title" +feed_description="Feed description" #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS @@ -50,6 +53,8 @@ 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 ynh_app_setting_set --app=$app --key=max_upload_size --value=$max_upload_size +ynh_app_setting_set --app=$app --key=feed_title --value=$feed_title +ynh_app_setting_set --app=$app --key=feed_description --value=$feed_description #================================================= # STANDARD MODIFICATIONS diff --git a/scripts/upgrade b/scripts/upgrade index cab8f73..8fb62a0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -19,7 +19,10 @@ 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) + max_upload_size=$(ynh_app_setting_get --app=$app --key=max_upload_size) +feed_title=$(ynh_app_setting_get --app=$app --key=feed_title) +feed_description=$(ynh_app_setting_get --app=$app --key=feed_description) #================================================= # CHECK VERSION @@ -61,6 +64,18 @@ if [ -z "$max_upload_size" ]; then ynh_app_setting_set --app=$app --key=max_upload_size --value=$max_upload_size fi +# If feed_title doesn't exist, create it +if [ -z "$feed_title" ]; then + feed_title="Feed title" + ynh_app_setting_set --app=$app --key=feed_title --value=$feed_title +fi + +# If feed_description doesn't exist, create it +if [ -z "$feed_description" ]; then + feed_description="Feed description" + ynh_app_setting_set --app=$app --key=feed_description --value=$feed_description +fi + # Cleaning legacy permissions if ynh_legacy_permissions_exists; then ynh_legacy_permissions_delete_all