[rhythmbox: 1/2] podcast: do not set metadata errors on download status if download is complete
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox: 1/2] podcast: do not set metadata errors on download status if download is complete
- Date: Wed, 10 Aug 2022 04:05:34 +0000 (UTC)
commit b4df7d17da43ff886cf81245b1c99ddb4893c174
Author: crvi <crvisqr gmail com>
Date: Wed Jun 15 00:20:48 2022 +0530
podcast: do not set metadata errors on download status if download is complete
podcast/rb-podcast-manager.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/podcast/rb-podcast-manager.c b/podcast/rb-podcast-manager.c
index c0dd5aa6f..57fe5f704 100644
--- a/podcast/rb-podcast-manager.c
+++ b/podcast/rb-podcast-manager.c
@@ -1089,11 +1089,15 @@ rb_podcast_manager_save_metadata (RBPodcastManager *pd, RhythmDBEntry *entry)
}
if (error != NULL) {
- /* this probably isn't an audio enclosure. or some other error */
- g_value_init (&val, G_TYPE_ULONG);
- g_value_set_ulong (&val, RHYTHMDB_PODCAST_STATUS_ERROR);
- rhythmdb_entry_set (pd->priv->db, entry, RHYTHMDB_PROP_STATUS, &val);
- g_value_unset (&val);
+ gulong status;
+
+ status = rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_STATUS);
+ if (status != RHYTHMDB_PODCAST_STATUS_COMPLETE) {
+ g_value_init (&val, G_TYPE_ULONG);
+ g_value_set_ulong (&val, RHYTHMDB_PODCAST_STATUS_ERROR);
+ rhythmdb_entry_set (pd->priv->db, entry, RHYTHMDB_PROP_STATUS, &val);
+ g_value_unset (&val);
+ }
g_value_init (&val, G_TYPE_STRING);
g_value_set_string (&val, error->message);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]