mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-25 09:26:17 -05:00
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:
parent
a385d4f709
commit
5621d47309
77 changed files with 5878 additions and 2541 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue