[rhythmbox] podcast: set download progress to 0% when starting



commit 33f8fc6188bbde1d99c7b4c974354b0ac804ad14
Author: Jonathan Matthew <jonathan d14n org>
Date:   Sun Sep 27 10:43:21 2020 +1000

    podcast: set download progress to 0% when starting
    
    Closes: #1822

 podcast/rb-podcast-manager.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/podcast/rb-podcast-manager.c b/podcast/rb-podcast-manager.c
index 753238e23..833541206 100644
--- a/podcast/rb-podcast-manager.c
+++ b/podcast/rb-podcast-manager.c
@@ -2073,12 +2073,17 @@ download_task (GTask *task, gpointer source_object, gpointer task_data, GCancell
                }
        }
 
-       /* set the download location for the episode */
+       /* set the download location for the episode, set progress to 0% */
        g_value_init (&val, G_TYPE_STRING);
        g_value_set_string (&val, sane_dl_uri);
        set_download_location (pd->priv->db, download->entry, &val);
        g_value_unset (&val);
 
+       g_value_init (&val, G_TYPE_ULONG);
+       g_value_set_ulong (&val, 0);
+       rhythmdb_entry_set (pd->priv->db, download->entry, RHYTHMDB_PROP_STATUS, &val);
+       g_value_unset (&val);
+
        rhythmdb_commit (pd->priv->db);
 
        /* check for an existing partial download */


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