[rhythmbox] rhythmdb: obsolete the podcast summary property
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] rhythmdb: obsolete the podcast summary property
- Date: Mon, 17 Jan 2022 12:25:28 +0000 (UTC)
commit af02376539fbf774bab4e3b4570ce99c43450ec8
Author: Jonathan Matthew <jonathan d14n org>
Date: Thu Dec 30 17:58:27 2021 +1000
rhythmdb: obsolete the podcast summary property
podcast/rb-podcast-entry-types.c | 2 --
rhythmdb/rhythmdb-private.h | 1 -
rhythmdb/rhythmdb-tree.c | 7 +++----
rhythmdb/rhythmdb.c | 9 ++-------
rhythmdb/rhythmdb.h | 2 +-
5 files changed, 6 insertions(+), 15 deletions(-)
---
diff --git a/podcast/rb-podcast-entry-types.c b/podcast/rb-podcast-entry-types.c
index 4666ac24e..87a0074db 100644
--- a/podcast/rb-podcast-entry-types.c
+++ b/podcast/rb-podcast-entry-types.c
@@ -77,7 +77,6 @@ podcast_post_create (RhythmDBEntryType *entry_type, RhythmDBEntry *entry)
RBRefString *empty = rb_refstring_new ("");
podcast->description = rb_refstring_ref (empty);
podcast->subtitle = rb_refstring_ref (empty);
- podcast->summary = rb_refstring_ref (empty);
podcast->lang = rb_refstring_ref (empty);
podcast->copyright = rb_refstring_ref (empty);
podcast->image = rb_refstring_ref (empty);
@@ -90,7 +89,6 @@ podcast_data_destroy (RhythmDBEntryType *entry_type, RhythmDBEntry *entry)
RhythmDBPodcastFields *podcast = RHYTHMDB_ENTRY_GET_TYPE_DATA (entry, RhythmDBPodcastFields);
rb_refstring_unref (podcast->description);
rb_refstring_unref (podcast->subtitle);
- rb_refstring_unref (podcast->summary);
rb_refstring_unref (podcast->lang);
rb_refstring_unref (podcast->copyright);
rb_refstring_unref (podcast->image);
diff --git a/rhythmdb/rhythmdb-private.h b/rhythmdb/rhythmdb-private.h
index 585b63234..d6e0d7817 100644
--- a/rhythmdb/rhythmdb-private.h
+++ b/rhythmdb/rhythmdb-private.h
@@ -41,7 +41,6 @@ typedef struct {
/* podcast */
RBRefString *description;
RBRefString *subtitle;
- RBRefString *summary;
RBRefString *lang;
RBRefString *copyright;
RBRefString *image;
diff --git a/rhythmdb/rhythmdb-tree.c b/rhythmdb/rhythmdb-tree.c
index d265aae58..18a486325 100644
--- a/rhythmdb/rhythmdb-tree.c
+++ b/rhythmdb/rhythmdb-tree.c
@@ -675,6 +675,7 @@ rhythmdb_tree_parser_end_element (struct RhythmDBTreeLoadContext *ctx,
case RHYTHMDB_PROP_TRACK_PEAK:
case RHYTHMDB_PROP_ALBUM_GAIN:
case RHYTHMDB_PROP_ALBUM_PEAK:
+ case RHYTHMDB_PROP_SUMMARY:
skip = TRUE;
break;
default:
@@ -1114,10 +1115,6 @@ save_entry (RhythmDBTree *db,
if (podcast && podcast->subtitle)
save_entry_string(ctx, elt_name, rb_refstring_get (podcast->subtitle));
break;
- case RHYTHMDB_PROP_SUMMARY:
- if (podcast && podcast->summary)
- save_entry_string(ctx, elt_name, rb_refstring_get (podcast->summary));
- break;
case RHYTHMDB_PROP_LANG:
if (podcast && podcast->lang)
save_entry_string(ctx, elt_name, rb_refstring_get (podcast->lang));
@@ -1183,6 +1180,8 @@ save_entry (RhythmDBTree *db,
case RHYTHMDB_PROP_TRACK_PEAK:
case RHYTHMDB_PROP_ALBUM_GAIN:
case RHYTHMDB_PROP_ALBUM_PEAK:
+ /* obsolete podcast properties */
+ case RHYTHMDB_PROP_SUMMARY:
break;
}
}
diff --git a/rhythmdb/rhythmdb.c b/rhythmdb/rhythmdb.c
index 61832bc6c..54c4294c9 100644
--- a/rhythmdb/rhythmdb.c
+++ b/rhythmdb/rhythmdb.c
@@ -3778,9 +3778,7 @@ rhythmdb_entry_set_internal (RhythmDB *db,
podcast->subtitle = rb_refstring_new (g_value_get_string (value));
break;
case RHYTHMDB_PROP_SUMMARY:
- g_assert (podcast);
- rb_refstring_unref (podcast->summary);
- podcast->summary = rb_refstring_new (g_value_get_string (value));
+ g_assert_not_reached ();
break;
case RHYTHMDB_PROP_LANG:
g_assert (podcast);
@@ -5058,10 +5056,7 @@ rhythmdb_entry_get_string (RhythmDBEntry *entry,
else
return NULL;
case RHYTHMDB_PROP_SUMMARY:
- if (podcast)
- return rb_refstring_get (podcast->summary);
- else
- return NULL;
+ return NULL;
case RHYTHMDB_PROP_LANG:
if (podcast)
return rb_refstring_get (podcast->lang);
diff --git a/rhythmdb/rhythmdb.h b/rhythmdb/rhythmdb.h
index 85d774859..3b58d2334 100644
--- a/rhythmdb/rhythmdb.h
+++ b/rhythmdb/rhythmdb.h
@@ -142,7 +142,7 @@ typedef enum
RHYTHMDB_PROP_STATUS,
RHYTHMDB_PROP_DESCRIPTION,
RHYTHMDB_PROP_SUBTITLE,
- RHYTHMDB_PROP_SUMMARY,
+ RHYTHMDB_PROP_SUMMARY, /* obsolete */
RHYTHMDB_PROP_LANG,
RHYTHMDB_PROP_COPYRIGHT,
RHYTHMDB_PROP_IMAGE,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]