summaryrefslogtreecommitdiff
path: root/sh/upd
diff options
context:
space:
mode:
Diffstat (limited to 'sh/upd')
-rwxr-xr-xsh/upd12
1 files changed, 11 insertions, 1 deletions
diff --git a/sh/upd b/sh/upd
index befc1d0..be0524b 100755
--- a/sh/upd
+++ b/sh/upd
@@ -328,7 +328,17 @@ music () {
# old opus files may have lower bitrate comparing to converting m4a with
# aac to opus, those old opus files are kept due to the cli. The trade-off
# is that converting lossy to lossy is bad.
- yt-dlp -f 'bestaudio[ext=opus]/bestaudio' -x --audio-format opus --match-filter 'license=cc-by' --match-filter 'title~=(?i)cc-by' -P "$XDG_MUSIC_DIR/cc-by/scott_buckley" https://soundcloud.com/scottbuckley/tracks
+ #
+ # At around July 2026, soundcloud will 403 Forbidden me if I query about
+ # 70+ JSON metadata. So I now use --download-archive and
+ # --break-on-existing to stop query json metadata and break the download
+ # after first met already downloaded music. But it is not perfect. This is
+ # assuming the first several music is new music. This does not consider if
+ # Scott recently uploaded too many, e.g., 80+ not cc licensed music. Other
+ # ways may include sth. like `--break-match-filters 'timestamp >=
+ # 1780524521'`. But note `--dateafter today-2months` will still query all
+ # json metadata. All ways are not perfect. I prefer my current way.
+ yt-dlp -f 'bestaudio[ext=opus]/bestaudio' -x --audio-format opus --match-filter 'license=cc-by' --match-filter 'title~=(?i)cc-by' --download-archive "$XDG_DATA_HOME/mydata/yt-dlp_download_archive" --break-on-existing -P "$XDG_MUSIC_DIR/cc-by/scott_buckley" https://soundcloud.com/scottbuckley/tracks
rsync -avP --delete "$XDG_MUSIC_DIR/cc-by/scott_buckley" pp:music/cc-by
rsync -avP --delete "$XDG_MUSIC_DIR/gpl-3.0-only" pp:music
rsync -avP --delete "$XDG_MUSIC_DIR/favorite" pp:music