Video downloads have many more options. Downloads are migrated.

Storing video settings in session storage to help user start downloads consistently.

Applying channel tag name to new channels when download videos or channels.

Initializing map tiles when importing and resetting map.
This commit is contained in:
Roland 2024-11-02 15:14:02 -06:00
parent a385d4f709
commit 5621d47309
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
77 changed files with 5878 additions and 2541 deletions

View file

@ -106,3 +106,6 @@ fi
# Clear map tile cache only after successful import.
yes | /bin/bash /opt/wrolpi/scripts/clear_map_cache.sh
# Use curl to fetch the first few layers of map tiles so the map is ready to use.
bash /opt/wrolpi/wrolpi/scripts/initialize_map_tiles.sh

View file

@ -8,10 +8,20 @@ if [ $EUID != 0 ]; then
exit $?
fi
if psql -l 2>/dev/null | grep gis >/dev/null; then
# Change directory to avoid "sudo" home directory warning.
cd /tmp
if sudo -u postgres psql -l 2>/dev/null | grep gis >/dev/null; then
yes_or_no "Are you sure you want to delete the map database and cache? This can't be undone!" || exit 0
fi
function cleanup() {
sudo rm -f /tmp/tile.png /tmp/tile.md5
}
trap cleanup EXIT
cleanup
set -e
set -x
@ -25,6 +35,22 @@ sudo -u postgres psql -d wrolpi -c "UPDATE map_file SET imported=false"
yes | /opt/wrolpi/scripts/initialize_map_db.sh
# Use curl to fetch the first few layers of map tiles so the map is ready to use.
bash /opt/wrolpi/wrolpi/scripts/initialize_map_tiles.sh
# Check the hash value of a Washington DC tile from /opt/wrolpi-blobs/gis-map.dump.gz
wget "https://127.0.0.1:8084/hot/13/2345/3134.png" \
--quiet \
--no-check-certificate \
--timeout 600 \
-O /tmp/tile.png
set +x
echo "b9b7884d64b555fd4f433f991a86cc72 /tmp/tile.png" > /tmp/tile.md5
if md5sum -c /tmp/tile.md5 >/dev/null ; then
echo "Map tile was rendered correctly"
else
echo "Map tile was not rendered correctly!"
exit 1
fi
echo "Map has been reset."