[rhythmbox] podcast: make feed parse condition during selection change more explicit



commit 4b1e6fcb55552dd921de28660c14aa2f400b1d62
Author: crvi <crvisqr gmail com>
Date:   Mon Mar 8 01:14:50 2021 +0530

    podcast: make feed parse condition during selection change more explicit
    
    When feed selection changes, we want to force parsing for 'failed' and
    'unparsed' feeds. This commit uses a more explicit way to define the
    condition.

 podcast/rb-podcast-add-dialog.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/podcast/rb-podcast-add-dialog.c b/podcast/rb-podcast-add-dialog.c
index 051006d99..7f2b1c31d 100644
--- a/podcast/rb-podcast-add-dialog.c
+++ b/podcast/rb-podcast-add-dialog.c
@@ -561,11 +561,15 @@ feed_selection_changed_cb (GtkTreeSelection *selection, RBPodcastAddDialog *dial
                                    FEED_COLUMN_PARSED_FEED, &channel,
                                    -1);
 
-               if (channel->posts == NULL) {
+               switch (channel->status) {
+               case RB_PODCAST_PARSE_STATUS_UNPARSED:
+               case RB_PODCAST_PARSE_STATUS_ERROR:
                        rb_debug ("parsing feed %s to get posts", channel->url);
                        parse_search_result (dialog, channel);
-               } else {
+                       break;
+               case RB_PODCAST_PARSE_STATUS_SUCCESS:
                        add_posts_for_feed (dialog, channel);
+                       break;
                }
        }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]