After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 770806 - fixes for 0.3.3 release
fixes for 0.3.3 release
Status: RESOLVED FIXED
Product: grilo
Classification: Other
Component: plugins
unspecified
Other All
: Normal normal
: ---
Assigned To: grilo-maint
grilo-maint
Depends on:
Blocks:
 
 
Reported: 2016-09-03 15:33 UTC by Victor Toso
Modified: 2016-10-21 21:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
youtube: gdata_youtube_video_get_video_id is deprecated (1.27 KB, patch)
2016-09-03 15:33 UTC, Victor Toso
rejected Details | Review
youtube: gdata_youtube_video_look_up_content is deprecated (1.72 KB, patch)
2016-09-03 15:34 UTC, Victor Toso
rejected Details | Review
youtube: fix a few compiler warnings (3.61 KB, patch)
2016-09-03 15:34 UTC, Victor Toso
none Details | Review
tmdb: use GTask instead of GSimpleAsyncResult (2.87 KB, patch)
2016-09-03 15:34 UTC, Victor Toso
committed Details | Review
metrolyrics: fix html parser (2.27 KB, patch)
2016-09-03 15:34 UTC, Victor Toso
none Details | Review
tests: fix url for mocked content in thegamesdb (1.19 KB, patch)
2016-09-03 15:34 UTC, Victor Toso
committed Details | Review
youtube: replace deprecated gdata_youtube_video_get_video_id (1.15 KB, patch)
2016-09-05 13:24 UTC, Victor Toso
committed Details | Review
youtube: replace deprecated gdata_youtube_video_look_up_content (1.73 KB, patch)
2016-09-05 13:24 UTC, Victor Toso
committed Details | Review
youtube: fix a few compiler warnings (3.30 KB, patch)
2016-09-05 13:25 UTC, Victor Toso
rejected Details | Review
youtube: fix unused variable (892 bytes, patch)
2016-09-05 13:25 UTC, Victor Toso
rejected Details | Review
metrolyrics: fix html parser (1.41 KB, patch)
2016-09-05 13:25 UTC, Victor Toso
committed Details | Review
youtube: fix assignment compiler warnings (3.30 KB, patch)
2016-09-05 14:20 UTC, Victor Toso
committed Details | Review
youtube: remove unused variable (895 bytes, patch)
2016-09-05 14:21 UTC, Victor Toso
committed Details | Review

Description Victor Toso 2016-09-03 15:33:51 UTC
Only one warning left here, for grl-opensubtitles [0] but can be fixed later on
anyway.

[0] grl-opensubtitles.c:221:3: warning: ‘soup_xmlrpc_request_new’ is deprecated:
Use 'soup_xmlrpc_message_new' instead [-Wdeprecated-declarations]
Comment 1 Victor Toso 2016-09-03 15:33:57 UTC
Created attachment 334719 [details] [review]
youtube: gdata_youtube_video_get_video_id is deprecated

Not sure if this should work in versions prior 0.17.0 so #ifdef to
avoid regressions.

grl-youtube.c:507:5: warning: ‘gdata_youtube_video_get_video_id’ is
deprecated: Use gdata_entry_get_id instead [-Wdeprecated-declarations]
  grl_media_set_id (media, gdata_youtube_video_get_video_id (video));
  ^~~~~~~~~~~~~~~~
Comment 2 Victor Toso 2016-09-03 15:34:03 UTC
Created attachment 334720 [details] [review]
youtube: gdata_youtube_video_look_up_content is deprecated

It always return NULL as this is no longer supported by Google.

grl-youtube.c: In function ‘build_media_from_entry’:
grl-youtube.c:571:2: warning: ‘gdata_youtube_video_look_up_content’ is
deprecated: Use gdata_youtube_video_get_player_uri instead
[-Wdeprecated-declarations]
  gdata_youtube_video_look_up_content (video,
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comment 3 Victor Toso 2016-09-03 15:34:08 UTC
Created attachment 334721 [details] [review]
youtube: fix a few compiler warnings

grl-youtube.c:591:10: warning: unused variable ‘id’ [-Wunused-variable]
  gchar *id;
         ^~
grl-youtube.c:745:47: warning: passing argument 1 of
gdata_youtube_service_get_categories_async’ from incompatible pointer
  gdata_youtube_service_get_categories_async (service, NULL,
                                              ^~~~~~~
grl-youtube.c:31: expected ‘GDataYouTubeService * but argument
is of type ‘GDataService *
  void gdata_youtube_service_get_categories_async (GDataYouTubeService
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

grl-youtube.c: In function ‘produce_from_feed’:
grl-youtube.c:1076:9: warning: assignment from incompatible pointer
  query = gdata_youtube_query_new (NULL);
  ^

grl-youtube.c: In function ‘produce_from_category’:
grl-youtube.c:1128:9: warning: assignment from incompatible pointer
  query = gdata_youtube_query_new (NULL);
  ^

grl-youtube.c: In function ‘grl_youtube_source_search’:
grl-youtube.c:1317:9: warning: assignment from incompatible pointer
  query = gdata_youtube_query_new (ss->text);
  ^
Comment 4 Victor Toso 2016-09-03 15:34:13 UTC
Created attachment 334722 [details] [review]
tmdb: use GTask instead of GSimpleAsyncResult
Comment 5 Victor Toso 2016-09-03 15:34:18 UTC
Created attachment 334723 [details] [review]
metrolyrics: fix html parser

Seems that in some lyrics a new <div></div> can be included with some
info. That was breaking the html parser.

Instead on relying on ending </div> for the lyric, let's use something
else that is present and not so common (<p class="writers") as ending
point for the lyrics and remove what is not interesting for us.

Leaving a g_debug on lyrics test to pinpoint faster what is the issue
between the data we have stored and the lyrics from webservice.
Comment 6 Victor Toso 2016-09-03 15:34:24 UTC
Created attachment 334724 [details] [review]
tests: fix url for mocked content in thegamesdb

(test_games:5048): Grilo-WARNING **: [lua-library]
grl-lua-library.c:504: Can't fetch element 1 (URL:
http://thegamesdb.net/api/GetGamesList.php?name=Ast%C3%A9rix&platform=PC):
'Could not find mock content Key file does not have group
'http://thegamesdb.net/api/GetGamesList.php?name=Ast%C3%A9rix&platform=PC''
Comment 7 Bastien Nocera 2016-09-05 11:51:31 UTC
Review of attachment 334719 [details] [review]:

Given that gdata_youtube_video_get_video_id() just calls gdata_entry_get_id(), and that since the YouTube v3 port (which we require to speak to upstream YouTube), no need for the #ifdef's
Comment 8 Bastien Nocera 2016-09-05 11:52:38 UTC
Review of attachment 334719 [details] [review]:

Also note that the commit subject should be something like:
"Replace deprecated ..."

otherwise there's no way to know whether it's a replacement, a removal, a change of behaviour, from the shortlog.
Comment 9 Bastien Nocera 2016-09-05 11:53:52 UTC
Review of attachment 334720 [details] [review]:

Ditto about the commit message, looks fine otherwise.
Comment 10 Bastien Nocera 2016-09-05 11:56:14 UTC
Review of attachment 334721 [details] [review]:

Rest looks fine, but again with the subject ("Fix assignment compiler warnings").

::: src/youtube/grl-youtube.c
@@ -589,3 @@
   GList *all = NULL, *iter;
   CategoryInfo *cat_info;
-  gchar *id;

Separate patch for this ("Remove unused variable").
Comment 11 Bastien Nocera 2016-09-05 11:57:53 UTC
Review of attachment 334723 [details] [review]:

Would be great to add the lyrics in question to the test suite to make sure we don't regress in the future.

::: tests/lua-factory/sources/test_lua_metrolyrics.c
@@ +108,2 @@
     if (g_ascii_strncasecmp (lyrics, data, size - 1) != 0) {
+      g_debug ("--- Lyrics stored in test -----\n%s", data);

Was that needed/wanted?

Should probably be in a separate patch.
Comment 12 Bastien Nocera 2016-09-05 11:58:44 UTC
Review of attachment 334724 [details] [review]:

Does the test pass after that? If so, please push.
Comment 13 Bastien Nocera 2016-09-05 12:00:38 UTC
Review of attachment 334722 [details] [review]:

If the test suite still passes, and is valgrind-clean, looks fine to me, but not as a "fix" for 0.3.3.
Comment 14 Victor Toso 2016-09-05 13:10:58 UTC
(In reply to Bastien Nocera from comment #11)
> Review of attachment 334723 [details] [review] [review]:
> 
> Would be great to add the lyrics in question to the test suite to make sure
> we don't regress in the future.

I catch this with the lyrics we already have in the test suite.

> 
> ::: tests/lua-factory/sources/test_lua_metrolyrics.c
> @@ +108,2 @@
>      if (g_ascii_strncasecmp (lyrics, data, size - 1) != 0) {
> +      g_debug ("--- Lyrics stored in test -----\n%s", data);
> 
> Was that needed/wanted?
> 
> Should probably be in a separate patch.

It was but I'll remove, we don't really need it.
Comment 15 Victor Toso 2016-09-05 13:15:34 UTC
Comment on attachment 334724 [details] [review]
tests: fix url for mocked content in thegamesdb

Attachment 334724 [details] pushed as a93945b - tests: fix url for mocked content in thegamesdb
Comment 16 Victor Toso 2016-09-05 13:24:49 UTC
Created attachment 334803 [details] [review]
youtube: replace deprecated gdata_youtube_video_get_video_id

grl-youtube.c:507:5: warning: ‘gdata_youtube_video_get_video_id’ is
deprecated: Use gdata_entry_get_id instead [-Wdeprecated-declarations]
  grl_media_set_id (media, gdata_youtube_video_get_video_id (video));
  ^~~~~~~~~~~~~~~~
Comment 17 Victor Toso 2016-09-05 13:24:55 UTC
Created attachment 334804 [details] [review]
youtube: replace deprecated gdata_youtube_video_look_up_content

It always return NULL as this is no longer supported by Google.

grl-youtube.c: In function ‘build_media_from_entry’:
grl-youtube.c:571:2: warning: ‘gdata_youtube_video_look_up_content’ is
deprecated: Use gdata_youtube_video_get_player_uri instead
[-Wdeprecated-declarations]
  gdata_youtube_video_look_up_content (video,
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comment 18 Victor Toso 2016-09-05 13:25:01 UTC
Created attachment 334805 [details] [review]
youtube: fix a few compiler warnings

grl-youtube.c:745:47: warning: passing argument 1 of
gdata_youtube_service_get_categories_async’ from incompatible pointer
  gdata_youtube_service_get_categories_async (service, NULL,
                                              ^~~~~~~
grl-youtube.c:31: expected ‘GDataYouTubeService * but argument
is of type ‘GDataService *
  void gdata_youtube_service_get_categories_async (GDataYouTubeService
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

grl-youtube.c: In function ‘produce_from_feed’:
grl-youtube.c:1076:9: warning: assignment from incompatible pointer
  query = gdata_youtube_query_new (NULL);
  ^

grl-youtube.c: In function ‘produce_from_category’:
grl-youtube.c:1128:9: warning: assignment from incompatible pointer
  query = gdata_youtube_query_new (NULL);
  ^

grl-youtube.c: In function ‘grl_youtube_source_search’:
grl-youtube.c:1317:9: warning: assignment from incompatible pointer
  query = gdata_youtube_query_new (ss->text);
  ^
Comment 19 Victor Toso 2016-09-05 13:25:06 UTC
Created attachment 334806 [details] [review]
youtube: fix unused variable

grl-youtube.c:591:10: warning: unused variable ‘id’ [-Wunused-variable]
  gchar *id;
         ^~
Comment 20 Victor Toso 2016-09-05 13:25:12 UTC
Created attachment 334807 [details] [review]
metrolyrics: fix html parser

Seems that in some lyrics a new <div></div> can be included with some
info. That was breaking the html parser.

Instead on relying on ending </div> for the lyric, let's use something
else that is present and not so common (<p class="writers") as ending
point for the lyrics and remove what is not interesting for us.
Comment 21 Victor Toso 2016-09-05 13:28:05 UTC
Review of attachment 334719 [details] [review]:

obsolete
Comment 22 Victor Toso 2016-09-05 13:28:19 UTC
Review of attachment 334720 [details] [review]:

obsolete
Comment 23 Bastien Nocera 2016-09-05 13:34:36 UTC
Review of attachment 334803 [details] [review]:

Sure.
Comment 24 Bastien Nocera 2016-09-05 13:34:58 UTC
Review of attachment 334804 [details] [review]:

Yes.
Comment 25 Bastien Nocera 2016-09-05 13:35:39 UTC
Review of attachment 334805 [details] [review]:

Subject line again, rest looks good.
Comment 26 Bastien Nocera 2016-09-05 13:36:29 UTC
Review of attachment 334806 [details] [review]:

"Remove unused variable"

"fixing" an unused variable could mean to start using it.
Comment 27 Bastien Nocera 2016-09-05 13:39:05 UTC
(In reply to Victor Toso from comment #14)
> (In reply to Bastien Nocera from comment #11)
> > Review of attachment 334723 [details] [review] [review] [review]:
> > 
> > Would be great to add the lyrics in question to the test suite to make sure
> > we don't regress in the future.
> 
> I catch this with the lyrics we already have in the test suite.

So the output was already wrong in the test suite. Something has to change, no? Either the input (the website changed, we need new test data files), or the output (the new output is cleaned up now).
Comment 28 Victor Toso 2016-09-05 13:43:51 UTC
(In reply to Bastien Nocera from comment #27)
> (In reply to Victor Toso from comment #14)
> > (In reply to Bastien Nocera from comment #11)
> > > Review of attachment 334723 [details] [review] [review] [review] [review]:
> > > 
> > > Would be great to add the lyrics in question to the test suite to make sure
> > > we don't regress in the future.
> > 
> > I catch this with the lyrics we already have in the test suite.
> 
> So the output was already wrong in the test suite. Something has to change,
> no? Either the input (the website changed, we need new test data files), or
> the output (the new output is cleaned up now).

The website changed but we don't have the html stored locally. grl-metrolyrics unit test does fetch the website every time and check if the result is the same as before.
Comment 29 Victor Toso 2016-09-05 13:44:24 UTC
(In reply to Bastien Nocera from comment #26)
> Review of attachment 334806 [details] [review] [review]:
> 
> "Remove unused variable"
> 
> "fixing" an unused variable could mean to start using it.

Okay :)
Thanks again!
Comment 30 Victor Toso 2016-09-05 14:17:33 UTC
Attachment 334803 [details] pushed as 8d91159 - youtube: replace deprecated gdata_youtube_video_get_video_id
Attachment 334804 [details] pushed as e425483 - youtube: replace deprecated gdata_youtube_video_look_up_content
Comment 31 Victor Toso 2016-09-05 14:20:55 UTC
Created attachment 334808 [details] [review]
youtube: fix assignment compiler warnings

grl-youtube.c:745:47: warning: passing argument 1 of
gdata_youtube_service_get_categories_async’ from incompatible pointer
  gdata_youtube_service_get_categories_async (service, NULL,
                                              ^~~~~~~
grl-youtube.c:31: expected ‘GDataYouTubeService * but argument
is of type ‘GDataService *
  void gdata_youtube_service_get_categories_async (GDataYouTubeService
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

grl-youtube.c: In function ‘produce_from_feed’:
grl-youtube.c:1076:9: warning: assignment from incompatible pointer
  query = gdata_youtube_query_new (NULL);
  ^

grl-youtube.c: In function ‘produce_from_category’:
grl-youtube.c:1128:9: warning: assignment from incompatible pointer
  query = gdata_youtube_query_new (NULL);
  ^

grl-youtube.c: In function ‘grl_youtube_source_search’:
grl-youtube.c:1317:9: warning: assignment from incompatible pointer
  query = gdata_youtube_query_new (ss->text);
  ^
Comment 32 Victor Toso 2016-09-05 14:21:01 UTC
Created attachment 334809 [details] [review]
youtube: remove unused variable

grl-youtube.c:591:10: warning: unused variable ‘id’ [-Wunused-variable]
  gchar *id;
         ^~
Comment 33 Bastien Nocera 2016-09-05 14:31:59 UTC
(In reply to Victor Toso from comment #28)
> (In reply to Bastien Nocera from comment #27)
> > (In reply to Victor Toso from comment #14)
> > > (In reply to Bastien Nocera from comment #11)
> > > > Review of attachment 334723 [details] [review] [review] [review] [review] [review]:
> > > > 
> > > > Would be great to add the lyrics in question to the test suite to make sure
> > > > we don't regress in the future.
> > > 
> > > I catch this with the lyrics we already have in the test suite.
> > 
> > So the output was already wrong in the test suite. Something has to change,
> > no? Either the input (the website changed, we need new test data files), or
> > the output (the new output is cleaned up now).
> 
> The website changed but we don't have the html stored locally.
> grl-metrolyrics unit test does fetch the website every time and check if the
> result is the same as before.

Ha, ok, will review now.
Comment 34 Bastien Nocera 2016-09-05 14:32:38 UTC
Review of attachment 334807 [details] [review]:

Looks good.
Comment 35 Bastien Nocera 2016-09-05 14:33:00 UTC
Review of attachment 334808 [details] [review]:

Yep.
Comment 36 Bastien Nocera 2016-09-05 14:33:17 UTC
Review of attachment 334809 [details] [review]:

Sure.
Comment 37 Victor Toso 2016-09-05 14:43:02 UTC
I'll let the bug open for the tmdb patch which should be commited after freeze.

Attachment 334807 [details] pushed as 1596afd - metrolyrics: fix html parser
Attachment 334808 [details] pushed as d519b20 - youtube: fix assignment compiler warnings
Attachment 334809 [details] pushed as b63fa21 - youtube: remove unused variable
Comment 38 Victor Toso 2016-09-05 14:43:58 UTC
Review of attachment 334805 [details] [review]:

obsolete
Comment 39 Victor Toso 2016-09-05 14:44:07 UTC
Review of attachment 334806 [details] [review]:

obsolete
Comment 40 Victor Toso 2016-10-21 21:04:22 UTC
Attachment 334722 [details] pushed as fb45b33 - tmdb: use GTask instead of GSimpleAsyncResult