[grilo-plugins/wip/hadess/update-youtube] youtube: Update to YouTube and libgdata API changes
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins/wip/hadess/update-youtube] youtube: Update to YouTube and libgdata API changes
- Date: Mon, 18 Jul 2022 11:38:57 +0000 (UTC)
commit 98db04b98c4f87008272503465bf26f3d260130a
Author: Bastien Nocera <hadess hadess net>
Date: Mon Jul 18 13:37:33 2022 +0200
youtube: Update to YouTube and libgdata API changes
Since libgdata 0.17.0 and the switch to the YouTube v3 API, all feed
types except GDATA_YOUTUBE_MOST_POPULAR_FEED have been deprecated.
See the gdata_youtube_service_query_standard_feed() API documentation.
meson.build | 2 +-
src/youtube/grl-youtube.c | 38 +-------------------------------------
2 files changed, 2 insertions(+), 38 deletions(-)
---
diff --git a/meson.build b/meson.build
index 55c93ea5..50955e85 100644
--- a/meson.build
+++ b/meson.build
@@ -78,7 +78,7 @@ if soup_api_version == '2.4'
libsoup_dep = dependency('libsoup-2.4', required: false)
libsoup24_dep = libsoup_dep
libsoup30_dep = dependency('unresolvable-dep', required: false)
- libgdata_dep = dependency('libgdata', version: '>= 0.9.1', required: false)
+ libgdata_dep = dependency('libgdata', version: '>= 0.17.0', required: false)
else
libsoup_dep = dependency('libsoup-3.0', required: false)
libsoup30_dep = libsoup_dep
diff --git a/src/youtube/grl-youtube.c b/src/youtube/grl-youtube.c
index b28ce1e8..127a95d3 100644
--- a/src/youtube/grl-youtube.c
+++ b/src/youtube/grl-youtube.c
@@ -63,33 +63,6 @@ GRL_LOG_DOMAIN_STATIC(youtube_log_domain);
#define YOUTUBE_TOP_RATED_ID (YOUTUBE_FEEDS_ID "/0")
#define YOUTUBE_TOP_RATED_NAME N_("Top Rated")
-#define YOUTUBE_TOP_FAVS_ID (YOUTUBE_FEEDS_ID "/1")
-#define YOUTUBE_TOP_FAVS_NAME N_("Top Favorites")
-
-#define YOUTUBE_MOST_VIEWED_ID (YOUTUBE_FEEDS_ID "/2")
-#define YOUTUBE_MOST_VIEWED_NAME N_("Most Viewed")
-
-#define YOUTUBE_MOST_POPULAR_ID (YOUTUBE_FEEDS_ID "/3")
-#define YOUTUBE_MOST_POPULAR_NAME N_("Most Popular")
-
-#define YOUTUBE_MOST_RECENT_ID (YOUTUBE_FEEDS_ID "/4")
-#define YOUTUBE_MOST_RECENT_NAME N_("Most Recent")
-
-#define YOUTUBE_MOST_DISCUSSED_ID (YOUTUBE_FEEDS_ID "/5")
-#define YOUTUBE_MOST_DISCUSSED_NAME N_("Most Discussed")
-
-#define YOUTUBE_MOST_LINKED_ID (YOUTUBE_FEEDS_ID "/6")
-#define YOUTUBE_MOST_LINKED_NAME N_("Most Linked")
-
-#define YOUTUBE_MOST_RESPONDED_ID (YOUTUBE_FEEDS_ID "/7")
-#define YOUTUBE_MOST_RESPONDED_NAME N_("Most Responded")
-
-#define YOUTUBE_FEATURED_ID (YOUTUBE_FEEDS_ID "/8")
-#define YOUTUBE_FEATURED_NAME N_("Recently Featured")
-
-#define YOUTUBE_MOBILE_ID (YOUTUBE_FEEDS_ID "/9")
-#define YOUTUBE_MOBILE_NAME N_("Watch On Mobile")
-
/* --- Other --- */
#define YOUTUBE_MAX_CHUNK 50
@@ -217,22 +190,13 @@ static void produce_from_directory (CategoryInfo *dir, guint dir_size, Operation
guint root_dir_size = 2;
CategoryInfo root_dir[] = {
- {YOUTUBE_FEEDS_ID, YOUTUBE_FEEDS_NAME, 10},
+ {YOUTUBE_FEEDS_ID, YOUTUBE_FEEDS_NAME, 1},
{YOUTUBE_CATEGORIES_ID, YOUTUBE_CATEGORIES_NAME, -1},
{NULL, NULL, 0}
};
CategoryInfo feeds_dir[] = {
{YOUTUBE_TOP_RATED_ID, YOUTUBE_TOP_RATED_NAME, -1},
- {YOUTUBE_TOP_FAVS_ID, YOUTUBE_TOP_FAVS_NAME, -1},
- {YOUTUBE_MOST_VIEWED_ID, YOUTUBE_MOST_VIEWED_NAME, -1},
- {YOUTUBE_MOST_POPULAR_ID, YOUTUBE_MOST_POPULAR_NAME, -1},
- {YOUTUBE_MOST_RECENT_ID, YOUTUBE_MOST_RECENT_NAME, -1},
- {YOUTUBE_MOST_DISCUSSED_ID, YOUTUBE_MOST_DISCUSSED_NAME, -1},
- {YOUTUBE_MOST_LINKED_ID, YOUTUBE_MOST_LINKED_NAME, -1},
- {YOUTUBE_MOST_RESPONDED_ID, YOUTUBE_MOST_RESPONDED_NAME, -1},
- {YOUTUBE_FEATURED_ID, YOUTUBE_FEATURED_NAME, -1},
- {YOUTUBE_MOBILE_ID, YOUTUBE_MOBILE_NAME, -1},
{NULL, NULL, 0}
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]