compare urls irrespective of downloader

importfeed --force: Avoid creating duplicates of existing already
downloaded files when yt-dlp or a special remote was used.
This commit is contained in:
Joey Hess 2024-02-02 15:50:41 -04:00
parent f1296e260e
commit 0c64cd30c2
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 19 additions and 1 deletions

View file

@ -462,7 +462,7 @@ runDownload todownload url extension cache cv getter = do
in d </> show n ++ "_" ++ base
tryanother = makeunique (n + 1) file
alreadyexists = liftIO $ isJust <$> catchMaybeIO (R.getSymbolicLinkStatus (toRawFilePath f))
checksameurl k = ifM (elem url <$> getUrls k)
checksameurl k = ifM (elem url . map fst . map getDownloader <$> getUrls k)
( return Nothing
, tryanother
)