I have decided to add importing of another playlist to the same repo (https://github.com/TrueTube/Andriy_Popyk) which already had some videos fetched for another playlist. First I got confused since my invocation of git annex importfeed --debug --fast 'https://www.youtube.com/feeds/videos.xml?playlist_id=PLSWNjjvqdBIsKntshAmYH7HBCv2HLlowX' --template 'Суспільство_і_політика/${itempubdate}-${itemtitle}.mkv'
just silently (no reason even in --debug
output) did nothing. RTFM pointed me to --force
flag which "Force downloading items it's seen before." which seemed like a remedy since it quickly added those videos from the play list. But it is not a clean remedy since rerunning causes git annex
to re-add those same videos with 2_
prefix, wasting "traffic" and requiring subsequent adhoc git rm -f folder/2_
. I wonder if there could be some way to avoid needing that?
The reason it doesn't overwrite is that it's not impossible for a feed to have two posts with the same title (eg "happy groundhogs day") or whatever else is used to construct the filename (unless you use
${itemid}
in your --template).Maybe overwriting would have been the right choice in your situation.. do you think an option that overwrites would be useful?
Or maybe better, an option that skips downloading when a file with the generated name already exists? If one groundhog's day greeting is enough for you..
I don't think overwrite here should have done anything -- should have been the same key and filename, so should be the same as skipping I think.
Overall indeed might be just nice to have
--existing noclob|overwrite|skip
so it either adds index to declob, or skips or overwrites? I would have probably used either skip or overwriteOh, but it seems that
importfeed --force
already has code to handle this. It checks if the file already exists and has the same url recorded as the url being imported. For some reason in that case, it says it failed to import the url, which seems a bit odd behavior to me, but in any case it doesn't add a "2_" file.That works for regular rss feeds, but does not work for yt-dlp urls.
The reason is the url mangling done for yt-dlp urls (and other special remote urls). Fixed this bug.