[grilo-plugins] thetvdb: use define for gom table names
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins] thetvdb: use define for gom table names
- Date: Tue, 25 Aug 2015 14:08:41 +0000 (UTC)
commit 66710d98ca8fc118ec78aa62b71bd3019806b2d5
Author: Victor Toso <me victortoso com>
Date: Fri Jul 31 23:08:56 2015 +0200
thetvdb: use define for gom table names
This is useful when referencing external tables as we are going to do in
the next commit.
https://bugzilla.gnome.org/show_bug.cgi?id=748423
src/thetvdb/thetvdb-resources-episodes.c | 2 +-
src/thetvdb/thetvdb-resources-series.c | 2 +-
src/thetvdb/thetvdb-resources.h | 2 ++
3 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/thetvdb/thetvdb-resources-episodes.c b/src/thetvdb/thetvdb-resources-episodes.c
index d760a01..e3f779b 100644
--- a/src/thetvdb/thetvdb-resources-episodes.c
+++ b/src/thetvdb/thetvdb-resources-episodes.c
@@ -234,7 +234,7 @@ episode_resource_class_init (EpisodeResourceClass *klass)
g_type_class_add_private(object_class, sizeof(EpisodeResourcePrivate));
resource_class = GOM_RESOURCE_CLASS(klass);
- gom_resource_class_set_table(resource_class, "episodes");
+ gom_resource_class_set_table(resource_class, EPISODE_TABLE_NAME);
specs[PROP_DB_ID] = g_param_spec_int64 (EPISODE_COLUMN_ID,
NULL, NULL,
diff --git a/src/thetvdb/thetvdb-resources-series.c b/src/thetvdb/thetvdb-resources-series.c
index 25f9e49..10b092c 100644
--- a/src/thetvdb/thetvdb-resources-series.c
+++ b/src/thetvdb/thetvdb-resources-series.c
@@ -232,7 +232,7 @@ series_resource_class_init (SeriesResourceClass *klass)
g_type_class_add_private(object_class, sizeof(SeriesResourcePrivate));
resource_class = GOM_RESOURCE_CLASS(klass);
- gom_resource_class_set_table(resource_class, "series");
+ gom_resource_class_set_table(resource_class, SERIES_TABLE_NAME);
specs[PROP_DB_ID] = g_param_spec_int64 (SERIES_COLUMN_ID,
NULL, NULL,
diff --git a/src/thetvdb/thetvdb-resources.h b/src/thetvdb/thetvdb-resources.h
index 81d2eb3..8631853 100644
--- a/src/thetvdb/thetvdb-resources.h
+++ b/src/thetvdb/thetvdb-resources.h
@@ -55,6 +55,7 @@
SERIES_TYPE_RESOURCE, \
SeriesResourceClass))
+#define SERIES_TABLE_NAME "series"
#define SERIES_COLUMN_ID "id"
#define SERIES_COLUMN_LANGUAGE "language"
#define SERIES_COLUMN_SERIES_NAME "series-name"
@@ -118,6 +119,7 @@ GType series_resource_get_type (void);
EPISODE_TYPE_RESOURCE, \
EpisodeResourceClass))
+#define EPISODE_TABLE_NAME "episodes"
#define EPISODE_COLUMN_ID "id"
#define EPISODE_COLUMN_LANGUAGE "language"
#define EPISODE_COLUMN_SERIES_ID "series-id"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]