GNOME Bugzilla – Bug 727463
Ugly warning when using media_art_get_path
Last modified: 2014-09-10 08:58:45 UTC
Created attachment 273432 [details] [review] Check that file is not NULL In python console: >> MediaArt.get_path('Sgt Pepper', "Beatles", "album", None) (process:17843): GLib-GIO-CRITICAL **: g_file_get_parent: assertion 'G_IS_FILE (file)' failed this happens as in media_art_get_path we pass file = NULL, but in media_art_get_file we try to get its parent. Attached file solves the problem
(In reply to comment #0) > Created an attachment (id=273432) [details] [review] > Check that file is not NULL > > In python console: > >> MediaArt.get_path('Sgt Pepper', "Beatles", "album", None) > > (process:17843): GLib-GIO-CRITICAL **: g_file_get_parent: assertion 'G_IS_FILE > (file)' failed > > this happens as in media_art_get_path we pass file = NULL, but in > media_art_get_file we try to get its parent. > > Attached file solves the problem Hi, thanks for the patch, I think this has been fixed already: commit 009ba5f8b4e538500516048c386d37bde852a9bc Author: Martyn Russell <martyn@lanedo.com> Date: Fri Aug 15 11:27:21 2014 +0100 cache: Make the documentation for media_art_get_path() and _get_file() clearer Also added some checks into the API and a return value to know if the function was successful. https://bugzilla.gnome.org/show_bug.cgi?id=734837
*** Bug 733304 has been marked as a duplicate of this bug. ***
*** Bug 731659 has been marked as a duplicate of this bug. ***