diff --git a/.DS_Store b/.DS_Store
new file mode 100644
index 0000000..c1d8d8f
Binary files /dev/null and b/.DS_Store differ
diff --git a/README.md b/README.md
index 46b79fe..f246016 100644
--- a/README.md
+++ b/README.md
@@ -27,7 +27,7 @@ In addition to constituting an advantage in terms of confidentiality (the data d
- Ability to subscribe to channels without creating a Google account
-**Shipped version:** 04.05.23~ynh1
+**Shipped version:** 20.05.23~ynh1
**Demo:** https://invidious.site/
@@ -42,7 +42,6 @@ In addition to constituting an advantage in terms of confidentiality (the data d
## Documentation and resources
* Official app website:
-* Official user documentation:
* Official admin documentation:
* Upstream app code repository:
* YunoHost documentation for this app:
diff --git a/README_fr.md b/README_fr.md
index 2ff4696..fdf7347 100644
--- a/README_fr.md
+++ b/README_fr.md
@@ -20,12 +20,13 @@ Invidious est une interface permettant d'accéder aux vidéos Youtube sans passe
En plus de constituer un avantage sur le plan de la confidentialité (les données ne transitent pas directement par les services du géant).
### Fonctionnalités :
+
- Mode audio seul,
- Mode sombre,
- Possibilité d'afficher les commentaires Reddit plutôt que les commentaires YouTube,
- Possibilité de s'abonner aux chaines sans créer de compte Google
-**Version incluse :** 04.05.23~ynh1
+**Version incluse :** 20.05.23~ynh1
**Démo :** https://invidious.site/
@@ -40,7 +41,6 @@ En plus de constituer un avantage sur le plan de la confidentialité (les donné
## Documentations et ressources
* Site officiel de l’app :
-* Documentation officielle utilisateur :
* Documentation officielle de l’admin :
* Dépôt de code officiel de l’app :
* Documentation YunoHost pour cette app :
diff --git a/conf/config.yml b/conf/config.yml
index e3de0b6..82b32bf 100644
--- a/conf/config.yml
+++ b/conf/config.yml
@@ -158,12 +158,12 @@ hsts: true
## See: https://github.com/iv-org/invidious/issues/957#issuecomment-576424042
##
## Accepted values: true, false
-## Default: true
+## Default: false
##
-#use_quic: true
+#use_quic: false
##
-## Additionnal cookies to be sent when requesting the youtube API.
+## Additional cookies to be sent when requesting the youtube API.
##
## Accepted values: a string in the format "name1=value1; name2=value2..."
## Default:
@@ -188,7 +188,7 @@ hsts: true
##
## Path to log file. Can be absolute or relative to the invidious
-## binary. This is overriden if "-o OUTPUT" or "--output=OUTPUT"
+## binary. This is overridden if "-o OUTPUT" or "--output=OUTPUT"
## are passed on the command line.
##
## Accepted values: a filesystem path or 'STDOUT'
@@ -197,7 +197,7 @@ hsts: true
#output: STDOUT
##
-## Logging Verbosity. This is overriden if "-l LEVEL" or
+## Logging Verbosity. This is overridden if "-l LEVEL" or
## "--log-level=LEVEL" are passed on the command line.
##
## Accepted values: All, Trace, Debug, Info, Warn, Error, Fatal, Off
@@ -295,8 +295,17 @@ captcha_enabled: __CAPTCHA_ENABLED__
##
admins: ["__ADMIN__"]
-## Email provided to users for bug reports
-admin_email: __EMAIL__
+##
+## Enable/Disable the user notifications for all users
+##
+## Note: On large instances, it is recommended to set this option to 'false'
+## in order to reduce the amount of data written to the database, and hence
+## improve the overall performance of the instance.
+##
+## Accepted values: true, false
+## Default: true
+##
+#enable_user_notifications: true
# -----------------------------
# Background jobs
@@ -306,16 +315,23 @@ admin_email: __EMAIL__
## Number of threads to use when crawling channel videos (during
## subscriptions update).
##
-## Notes:
-## - Setting this to 0 will disable the channel videos crawl job.
-## - This setting is overriden if "-c THREADS" or
-## "--channel-threads=THREADS" are passed on the command line.
+## Notes: This setting is overridden if either "-c THREADS" or
+## "--channel-threads=THREADS" is passed on the command line.
##
## Accepted values: a positive integer
## Default: 1
##
channel_threads: 1
+##
+## Time interval between two executions of the job that crawls
+## channel videos (subscriptions update).
+##
+## Accepted values: a valid time interval (like 1h30m or 90m)
+## Default: 30m
+##
+#channel_refresh_interval: 30m
+
##
## Forcefully dump and re-download the entire list of uploaded
## videos when crawling channel (during subscriptions update).
@@ -328,10 +344,8 @@ full_refresh: false
##
## Number of threads to use when updating RSS feeds.
##
-## Notes:
-## - Setting this to 0 will disable the channel videos crawl job.
-## - This setting is overriden if "-f THREADS" or
-## "--feed-threads=THREADS" are passed on the command line.
+## Notes: This setting is overridden if either "-f THREADS" or
+## "--feed-threads=THREADS" is passed on the command line.
##
## Accepted values: a positive integer
## Default: 1
@@ -342,13 +356,49 @@ feed_threads: 1
## Enable/Disable the polling job that keeps the decryption
## function (for "secured" videos) up to date.
##
-## Note: This part of the code is currently broken, so changing
+## Note: This part of the code generate a small amount of data every minute.
+## This may not be desired if you have bandwidth limits set by your ISP.
+##
+## Note 2: This part of the code is currently broken, so changing
## this setting has no impact.
##
## Accepted values: true, false
-## Default: true
+## Default: false
##
-#decrypt_polling: true
+#decrypt_polling: false
+
+
+jobs:
+
+ ## Options for the database cleaning job
+ clear_expired_items:
+
+ ## Enable/Disable job
+ ##
+ ## Accepted values: true, false
+ ## Default: true
+ ##
+ enable: true
+
+ ## Options for the channels updater job
+ refresh_channels:
+
+ ## Enable/Disable job
+ ##
+ ## Accepted values: true, false
+ ## Default: true
+ ##
+ enable: true
+
+ ## Options for the RSS feeds updater job
+ refresh_feeds:
+
+ ## Enable/Disable job
+ ##
+ ## Accepted values: true, false
+ ## Default: true
+ ##
+ enable: true
# -----------------------------
@@ -373,7 +423,7 @@ feed_threads: 1
# -----------------------------
-# Miscellanous
+# Miscellaneous
# -----------------------------
##
@@ -412,7 +462,7 @@ feed_threads: 1
## Accepted values: a string
## Default:
##
-#hmac_key:
+hmac_key: __KEY__
##
## List of video IDs where the "download" widget must be
@@ -434,7 +484,22 @@ feed_threads: 1
##
#cache_annotations: false
+##
+## Source code URL. If your instance is running a modified source
+## code, you MUST publish it somewhere and set this option.
+##
+## Accepted values: a string
+## Default:
+##
+#modified_source_code_url: ""
+##
+## Maximum custom playlist length limit.
+##
+## Accepted values: Integer
+## Default: 500
+##
+#playlist_length_limit: 500
#########################################
#
@@ -459,9 +524,9 @@ default_user_preferences:
##
## Default user interface language (locale).
##
- ## Note: overridin the default (no preferred caption language)
- ## is not recommended, in order to not penalize people using
- ## other languages.
+ ## Note: When hosting a public instance, overriding the
+ ## default (english) is not recommended, as it may
+ ## people using other languages.
##
## Accepted values:
## ar (Arabic)
@@ -498,9 +563,24 @@ default_user_preferences:
locale: __LANGUAGE__
##
- ## Top 3 prefered languages for video captions.
+ ## Default geographical location for content.
##
- ## Note: overridin the default (no preferred
+ ## Accepted values:
+ ## AE, AR, AT, AU, AZ, BA, BD, BE, BG, BH, BO, BR, BY, CA, CH, CL, CO, CR,
+ ## CY, CZ, DE, DK, DO, DZ, EC, EE, EG, ES, FI, FR, GB, GE, GH, GR, GT, HK,
+ ## HN, HR, HU, ID, IE, IL, IN, IQ, IS, IT, JM, JO, JP, KE, KR, KW, KZ, LB,
+ ## LI, LK, LT, LU, LV, LY, MA, ME, MK, MT, MX, MY, NG, NI, NL, NO, NP, NZ,
+ ## OM, PA, PE, PG, PH, PK, PL, PR, PT, PY, QA, RO, RS, RU, SA, SE, SG, SI,
+ ## SK, SN, SV, TH, TN, TR, TW, TZ, UA, UG, US, UY, VE, VN, YE, ZA, ZW
+ ##
+ ## Default: US
+ ##
+ #region: US
+
+ ##
+ ## Top 3 preferred languages for video captions.
+ ##
+ ## Note: overriding the default (no preferred
## caption language) is not recommended, in order
## to not penalize people using other languages.
##
@@ -544,10 +624,10 @@ default_user_preferences:
##
## Enable/Disable dark mode.
##
- ## Accepted values: true, false
- ## Default:
+ ## Accepted values: "dark", "light", "auto"
+ ## Default: "auto"
##
- #dark_mode: true
+ #dark_mode: "auto"
##
## Enable/Disable thin mode (no video thumbnails).
@@ -572,7 +652,7 @@ default_user_preferences:
#feed_menu: ["Popular", "Trending", "Subscriptions", "Playlists"]
##
- ## Default feed to diplay on the home page.
+ ## Default feed to display on the home page.
##
## Note: setting this option to "Popular" has no
## effect when 'popular_enabled' is set to false.
@@ -697,7 +777,7 @@ default_user_preferences:
## Accepted values: dash, hd720, medium, small
## Default: hd720
##
- quality: hd720
+ quality: dash
##
## Default dash video quality.
@@ -737,6 +817,16 @@ default_user_preferences:
## Default: true
##
#vr_mode: true
+
+ ##
+ ## Save the playback position
+ ## Allow to continue watching at the previous position when
+ ## watching the same video.
+ ##
+ ## Accepted values: true, false
+ ## Default: false
+ ##
+ #save_player_pos: false
# -----------------------------
# Subscription feed
@@ -790,7 +880,7 @@ default_user_preferences:
# -----------------------------
- # Miscellanous
+ # Miscellaneous
# -----------------------------
##
@@ -825,3 +915,13 @@ default_user_preferences:
## Default: false
##
#automatic_instance_redirect: false
+
+ ##
+ ## Show the entire video description by default (when set to 'false',
+ ## only the first few lines of the description are shown and a
+ ## "show more" button allows to expand it).
+ ##
+ ## Accepted values: true, false
+ ## Default: false
+ ##
+ #extend_desc: false
diff --git a/conf/nginx.conf b/conf/nginx.conf
index 089fcff..dc2a546 100644
--- a/conf/nginx.conf
+++ b/conf/nginx.conf
@@ -1,16 +1,11 @@
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ {
- proxy_pass http://127.0.0.1:__PORT__/;
- proxy_redirect off;
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Host $server_name;
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
+ proxy_pass http://127.0.0.1:__PORT__;
+ proxy_set_header X-Forwarded-For $remote_addr;
+ proxy_set_header Host $host; # so Invidious knows domain
+ proxy_http_version 1.1; # to keep alive
+ proxy_set_header Connection ""; # to keep alive
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
@@ -18,16 +13,11 @@ location __PATH__/ {
location __PATH__/embed/ {
- proxy_pass http://127.0.0.1:__PORT__/embed/;
- proxy_redirect off;
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Host $server_name;
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
+ proxy_pass http://127.0.0.1:__PORT__/embed/;
+ proxy_set_header X-Forwarded-For $remote_addr;
+ proxy_set_header Host $host; # so Invidious knows domain
+ proxy_http_version 1.1; # to keep alive
+ proxy_set_header Connection ""; # to keep alive
more_set_headers "X-Frame-Options : ALLOWALL";
more_set_headers "Content-Security-Policy : upgrade-insecure-requests ; frame-ancestors * ";
diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md
index 7027cc4..ebf774c 100644
--- a/doc/DESCRIPTION_fr.md
+++ b/doc/DESCRIPTION_fr.md
@@ -2,6 +2,7 @@ Invidious est une interface permettant d'accéder aux vidéos Youtube sans passe
En plus de constituer un avantage sur le plan de la confidentialité (les données ne transitent pas directement par les services du géant).
### Fonctionnalités :
+
- Mode audio seul,
- Mode sombre,
- Possibilité d'afficher les commentaires Reddit plutôt que les commentaires YouTube,
diff --git a/doc/screenshots/screenshot.png b/doc/screenshots/screenshot.png
index c3abc7f..8adb43d 100644
Binary files a/doc/screenshots/screenshot.png and b/doc/screenshots/screenshot.png differ
diff --git a/manifest.toml b/manifest.toml
index db76e5f..cb7857d 100644
--- a/manifest.toml
+++ b/manifest.toml
@@ -5,7 +5,7 @@ name = "Invidious"
description.en = "Alternative front-end to YouTube"
description.fr = "Front-end alternatif à YouTube"
-version = "04.05.23~ynh1"
+version = "20.05.23~ynh1"
maintainers = ["eric_G"]
@@ -13,12 +13,11 @@ maintainers = ["eric_G"]
license = "GPL-3.0-only"
demo = "https://invidious.site/"
admindoc = "https://docs.invidious.io/"
-userdoc = "https://github.com/iv-org/documentation"
code = "https://github.com/iv-org/invidious"
website = "https://invidio.us/"
[integration]
-yunohost = ">= 11.1.18"
+yunohost = ">= 11.1.19"
architectures = ["amd64"]
multi_instance = false
ldap = false
@@ -64,7 +63,7 @@ ram.runtime = "50M"
api.protected = true
[resources.apt]
- packages = "apt-transport-https libssl-dev libxml2-dev libyaml-dev libgmp-dev libreadline-dev postgresql librsvg2-bin imagemagick libsqlite3-dev zlib1g-dev libevent-dev pkg-config libpcre3-dev"
+ packages = "libssl-dev libxml2-dev libyaml-dev libgmp-dev libreadline-dev postgresql librsvg2-bin imagemagick libsqlite3-dev zlib1g-dev libevent-dev libpcre3-dev"
[resources.database]
type = "postgresql"
diff --git a/scripts/_common.sh b/scripts/_common.sh
index 2f10767..9909edb 100644
--- a/scripts/_common.sh
+++ b/scripts/_common.sh
@@ -4,7 +4,7 @@
# COMMON VARIABLES
#=================================================
-version_commit=1eb1bae3706204908fa57b6c91fe00041d4346c5
+version_commit=3a54e9556b0cd28fd224db5801f8141a68108c13
#=================================================
# PERSONAL HELPERS
diff --git a/scripts/install b/scripts/install
index 54463d2..8728c61 100644
--- a/scripts/install
+++ b/scripts/install
@@ -13,7 +13,7 @@ source /usr/share/yunohost/helpers
# RETRIEVE ARGUMENTS FROM THE MANIFEST
#=================================================
-email=$(ynh_user_get_info --username=$admin --key=mail)
+key=$(ynh_string_random --length=24)
registration_enabled="true"
login_enabled="true"
captcha_enabled="true"
@@ -23,7 +23,7 @@ captcha_enabled="true"
#=================================================
ynh_script_progression --message="Storing installation settings..." --weight=2
-ynh_app_setting_set --app=$app --key=email --value=$email
+ynh_app_setting_set --app=$app --key=key --value=$key
ynh_app_setting_set --app=$app --key=registration_enabled --value=$registration_enabled
ynh_app_setting_set --app=$app --key=login_enabled --value=$login_enabled
ynh_app_setting_set --app=$app --key=captcha_enabled --value=$captcha_enabled
@@ -46,57 +46,16 @@ chown -R $app:www-data "$install_dir"
git config --system --add safe.directory $install_dir
# Download, check integrity, uncompress and patch the source from GitHub
-#ynh_exec_as $app
git clone https://github.com/iv-org/invidious "$install_dir" --quiet
pushd "$install_dir"
- #ynh_exec_as $app
git reset --hard --quiet $version_commit
+ make
popd
-for i in $install_dir/config/sql/*.sql ; do
- ynh_replace_string --match_string="kemal" --replace_string=$db_user --target_file="$i" ;
- ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < "$i" ;
-done
-
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
-#=================================================
-# NGINX CONFIGURATION
-#=================================================
-ynh_script_progression --message="Configuring NGINX web server..." --weight=3
-
-# Create a dedicated NGINX config
-ynh_add_nginx_config
-
-#=================================================
-# SPECIFIC SETUP
-#=================================================
-# INSTALL INVIDIOUS
-#=================================================
-ynh_script_progression --message="Building Invidious.. (this will take some time and resources!)" --weight=60
-
-pushd "$install_dir"
- ynh_exec_warn_less shards install --production
- ynh_exec_warn_less crystal build $install_dir/src/invidious.cr --release
-popd
-
-#=================================================
-# SYSTEM CONFIGURATION
-#=================================================
-ynh_script_progression --message="Adding system configurations related to $app ..." --weight=10
-
-ynh_add_config --template="../conf/cron_invidious" --destination="/etc/cron.d/$app"
-chown root: "/etc/cron.d/$app"
-chmod 644 "/etc/cron.d/$app"
-
-ynh_use_logrotate
-
-ynh_add_systemd_config
-
-yunohost service add $app --description="Invidious is an alternative front-end to YouTube" --log="/var/log/$app/$app.log"
-
#=================================================
# MODIFY A CONFIG FILE
#=================================================
@@ -107,6 +66,38 @@ ynh_add_config --template="../conf/config.yml" --destination="$install_dir/confi
chmod 600 "$install_dir/config/config.yml"
chown $app:$app "$install_dir/config/config.yml"
+#=================================================
+# SPECIFIC SETUP
+#=================================================
+# INSTALL INVIDIOUS
+#=================================================
+ynh_script_progression --message="Building Invidious.. (this will take some time and resources!)" --weight=60
+
+pushd "$install_dir"
+ ./invidious --migrate
+ ynh_exec_warn_less shards install --production
+ ynh_exec_warn_less crystal build $install_dir/src/invidious.cr --release
+ #ynh_exec_warn_less crystal build $install_dir/src/invidious.cr --Ddisable_quic --release
+popd
+
+#=================================================
+# SYSTEM CONFIGURATION
+#=================================================
+ynh_script_progression --message="Adding system configurations related to $app ..." --weight=10
+
+# Create a dedicated NGINX config
+ynh_add_nginx_config
+
+ynh_add_config --template="../conf/cron_invidious" --destination="/etc/cron.d/$app"
+chown root: "/etc/cron.d/$app"
+chmod 644 "/etc/cron.d/$app"
+
+ynh_use_logrotate
+
+ynh_add_systemd_config
+
+yunohost service add $app --description="Invidious is an alternative front-end to YouTube" --log="/var/log/$app/$app.log"
+
#=================================================
# START SYSTEMD SERVICE
#=================================================
diff --git a/scripts/restore b/scripts/restore
index d97cae5..c970c8c 100644
--- a/scripts/restore
+++ b/scripts/restore
@@ -25,7 +25,6 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
ynh_restore_file --origin_path="$install_dir"
-chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
diff --git a/scripts/upgrade b/scripts/upgrade
index 66b3ee9..51c498e 100644
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -44,6 +44,11 @@ if [ -z "${captcha_enabled:-}" ]; then
ynh_app_setting_set --app=$app --key=captcha_enabled --value=$captcha_enabled
fi
+if [ -z "${key:-}" ]; then
+ key=$(ynh_string_random --length=24)
+ ynh_app_setting_set --app=$app --key=key --value=$key
+fi
+
#=================================================
# UPGRADE DEPENDENCIES
#=================================================
@@ -96,10 +101,10 @@ yunohost service add $app --description="Invidious is an alternative front-end t
#=================================================
# MODIFY A CONFIG FILE
#=================================================
-#ynh_script_progression --message="Modifying a config file..."
+ynh_script_progression --message="Modifying a config file..."
-#ynh_add_config --template="../conf/config.yml" --destination="$install_dir/config/config.yml"
-#chmod 600 $install_dir/config/config.yml
+ynh_add_config --template="../conf/config.yml" --destination="$install_dir/config/config.yml"
+chmod 600 $install_dir/config/config.yml
#=================================================
# START SYSTEMD SERVICE