1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/immich_ynh.git synced 2024-09-03 20:36:24 +02:00

Revert Add geonames files to app sources

This commit is contained in:
Sylvain 2024-04-03 22:01:09 +02:00
parent 9a4b5b4b4d
commit d90b8f0576
4 changed files with 11 additions and 26 deletions

View file

@ -7,7 +7,7 @@ name = "Immich"
description.en = "Photo and video backup solution directly from your mobile phone"
description.fr = "Sauvegarde de photos et de vidéos directement depuis votre mobile"
version = "1.100.0~ynh1"
version = "1.100.0~ynh2"
maintainers = ["ewilly"]
@ -47,21 +47,6 @@ ram.runtime = "500M"
autoupdate.strategy = "latest_github_release"
[resources.sources.geonames_cities]
url = "https://download.geonames.org/export/dump/cities500.zip"
sha256 = "afec3356a980771f20c5e96f4a877d33c97fcc331dfc6b02d6bf8a492ec43828"
in_subdir = false
[resources.sources.geonames_divisions]
url = "https://download.geonames.org/export/dump/admin1CodesASCII.txt"
sha256 = "6eace8b269cd4c9635d8f8631857c0be2cb3fb6362495f77f17f266ef7328f11"
rename = "admin1CodesASCII.txt"
[resources.sources.geonames_subdivisions]
url = "https://download.geonames.org/export/dump/admin2Codes.txt"
sha256 = "defbd99329530fa6b06e154662fb16a51a0c12caf41636be17597c58c5374f1c"
rename = "admin2Codes.txt"
[resources.ports]
main.default = 3001
microservices.default = 3002

View file

@ -155,7 +155,7 @@ myynh_install_immich() {
ynh_exec_warn_less "$ynh_npm" cache clean --force
# Install immich-machine-learning
cd "$source_dir/machine-learning"
cd "$source_dir/machine-learning"
mkdir -p "$install_dir/app/machine-learning"
$py_app_version -m venv "$install_dir/app/machine-learning/venv"
(
@ -191,9 +191,15 @@ myynh_install_immich() {
sed -i -e "s@app.listen(port)@app.listen(port, '127.0.0.1')@g" "$install_dir/app/dist/main.js"
# Install geonames
cp -a "$source_dir/geonames_cities/cities500.txt" "$install_dir/resources/"
cp -a "$source_dir/geonames_divisions/admin1CodesASCII.txt" "$install_dir/resources/"
cp -a "$source_dir/geonames_subdivisions/admin2Codes.txt" "$install_dir/resources/"
mkdir -p "$source_dir/geonames"
cd "$source_dir/geonames"
curl -LO "https://download.geonames.org/export/dump/cities500.zip" 2>&1
curl -LO "https://download.geonames.org/export/dump/admin1CodesASCII.txt" 2>&1
curl -LO "https://download.geonames.org/export/dump/admin2Codes.txt" 2>&1
unzip "cities500.zip"
cp -a "$source_dir/geonames/cities500.txt" "$install_dir/resources/"
cp -a "$source_dir/geonames/admin1CodesASCII.txt" "$install_dir/resources/"
cp -a "$source_dir/geonames/admin2Codes.txt" "$install_dir/resources/"
date --iso-8601=seconds | tr -d "\n" > "$install_dir/resources/geodata-date.txt"
# Cleanup

View file

@ -15,9 +15,6 @@ ynh_script_progression --message="Setting up source files..." --weight=1
source_dir="$install_dir/source"
ynh_setup_source --source_id="main" --dest_dir="$source_dir"
ynh_setup_source --source_id="geonames_cities" --dest_dir="$source_dir/geonames_cities/"
ynh_setup_source --source_id="geonames_divisions" --dest_dir="$source_dir/geonames_divisions/"
ynh_setup_source --source_id="geonames_subdivisions" --dest_dir="$source_dir/geonames_subdivisions/"
#=================================================
# CHECK PYTHON VERSION AND COMPILE IF NEEDED

View file

@ -27,9 +27,6 @@ ynh_script_progression --message="Upgrading source files..." --weight=1
source_dir="$install_dir/source"
ynh_setup_source --source_id="main" --dest_dir="$source_dir" --full_replace=1
ynh_setup_source --source_id="geonames_cities" --dest_dir="$source_dir/geonames_cities/" --full_replace=1
ynh_setup_source --source_id="geonames_divisions" --dest_dir="$source_dir/geonames_divisions/" --full_replace=1
ynh_setup_source --source_id="geonames_subdivisions" --dest_dir="$source_dir/geonames_subdivisions/" --full_replace=1
#=================================================
# CHECK PYTHON VERSION AND COMPILE IF NEEDED