Commit 38e44dd6 authored by nimrod's avatar nimrod
Browse files

New sync-podcasts script.

Use wget over WebDAV instead of unison over SSH. Should be faster and
more portable.
parent 0f135439
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -306,11 +306,6 @@ sync_comics () {
    find "$HOME/Downloads/Comics/" -name "$(date --date '2 month ago' +'0-Day\ Week\ of\ %Y.%m.*')" -exec rm -r {} +
}

sync_podcasts () (
    cd || exit 1
    unison podcasts
)

temp_venv () {
    cdtemp
    venv .

.unison/podcasts.prf

deleted100644 → 0
+0 −7
Original line number Diff line number Diff line
root = Downloads/Podcasts/
root = ssh://kodi.shore.co.il//srv/library/nimrod/Podcasts
path = .
batch = true

#nocreation
#nodeletion
+18 −0
Original line number Diff line number Diff line
#!/bin/sh
set -eu

XDG_DOWNLOAD_DIR="${XDG_DOWNLOAD_DIR:-$HOME/Downloads}"
mkdir -p "$XDG_DOWNLOAD_DIR/Podcasts"

exec wget \
    --continue \
    --cut-dirs=3 \
    --directory-prefix "$XDG_DOWNLOAD_DIR/Podcasts" \
    --mirror \
    --no-host-directories \
    --no-parent \
    --recursive \
    --reject '*.htm,*.html,index.htm*,robots.txt' \
    --show-progress \
    --user-agent sync-podcasts \
    https://library.shore.co.il/webdav/nimrod/Podcasts/