fix waiting for all started feed downloads with -J
authorJoey Hess <joeyh@joeyh.name>
Wed, 12 Jul 2023 02:08:19 +0000 (22:08 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 12 Jul 2023 02:08:35 +0000 (22:08 -0400)
importfeed bug fix: When -J was used with multiple feeds, some feeds did
not get their items downloaded.

In my case, I had added a feed to the end of the list, and no items from it
were ever downloaded.

Sponsored-by: Leon Schuermann on Patreon
CHANGELOG
Command/ImportFeed.hs

index 3519f8a28f1df24a3f64218e3bd337831d7b0178..402876962b32dadb67f509193ce4e900624ac081 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -14,6 +14,8 @@ git-annex (10.20230627) UNRELEASED; urgency=medium
   * importfeed: Add feedurl to the metadata (and allow it to be used in the
     --template)
   * Improve resuming interrupted download when using yt-dlp.
+  * importfeed bug fix: When -J was used with multiple feeds, some feeds
+    did not get their items downloaded.
 
  -- Joey Hess <id@joeyh.name>  Mon, 26 Jun 2023 13:10:40 -0400
 
index 072f285b0844864b27b2c293aff24286d4b84274..9b51b03a7fcad6b4d9cdb18ed2109e5df255cf0d 100644 (file)
@@ -101,7 +101,7 @@ seek o = startConcurrency commandStages $ do
                                        return m
                                else
                                        let (pending, rest) = M.partition ispending m
-                                       in if M.null pending
+                                       in if M.null pending || not (M.null rest)
                                                then retry
                                                else do
                                                        putTMVar dlst rest