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 752681 - Port Apple Trailers source to Lua
Port Apple Trailers source to Lua
Status: RESOLVED FIXED
Product: grilo
Classification: Other
Component: lua
unspecified
Other All
: Normal normal
: ---
Assigned To: grilo-maint
grilo-maint
Depends on:
Blocks:
 
 
Reported: 2015-07-21 18:20 UTC by Bastien Nocera
Modified: 2015-07-23 16:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
lua-factory: Better debugging when registering sources (1.97 KB, patch)
2015-07-21 18:20 UTC, Bastien Nocera
committed Details | Review
lua-factory: Add support for GRL_METADATA_KEY_SIZE (1.29 KB, patch)
2015-07-21 18:20 UTC, Bastien Nocera
none Details | Review
lua-factory: Fix performer key containing only one name (1.92 KB, patch)
2015-07-21 18:20 UTC, Bastien Nocera
none Details | Review
lua-factory: Add Pocket GResource file to the dist (807 bytes, patch)
2015-07-21 18:20 UTC, Bastien Nocera
committed Details | Review
lua-factory: Port Apple Trailers source to Lua (14.61 KB, patch)
2015-07-21 18:20 UTC, Bastien Nocera
committed Details | Review
apple-trailers: Remove stand-alone C apple-trailers plugin (58.47 KB, patch)
2015-07-21 18:20 UTC, Bastien Nocera
committed Details | Review
lua-factory: Add support for GRL_METADATA_KEY_SIZE (1.73 KB, patch)
2015-07-22 17:17 UTC, Bastien Nocera
committed Details | Review
lua-factory: Fix performer key containing only one name (1.93 KB, patch)
2015-07-22 17:17 UTC, Bastien Nocera
committed Details | Review
lua-factory: Use GRL_WARNING instead of g_warning (2.55 KB, patch)
2015-07-22 17:18 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2015-07-21 18:20:00 UTC
.
Comment 1 Bastien Nocera 2015-07-21 18:20:16 UTC
Created attachment 307849 [details] [review]
lua-factory: Better debugging when registering sources
Comment 2 Bastien Nocera 2015-07-21 18:20:21 UTC
Created attachment 307850 [details] [review]
lua-factory: Add support for GRL_METADATA_KEY_SIZE

GRL_METADATA_KEY_SIZE is an int64 key, which we need to support.
Comment 3 Bastien Nocera 2015-07-21 18:20:25 UTC
Created attachment 307851 [details] [review]
lua-factory: Fix performer key containing only one name

Fix the handling of arrays of strings. We shouldn't always overwrite the
names previously there, especially as the key is emptied before handling
tables of values.
Comment 4 Bastien Nocera 2015-07-21 18:20:30 UTC
Created attachment 307852 [details] [review]
lua-factory: Add Pocket GResource file to the dist
Comment 5 Bastien Nocera 2015-07-21 18:20:35 UTC
Created attachment 307854 [details] [review]
lua-factory: Port Apple Trailers source to Lua
Comment 6 Bastien Nocera 2015-07-21 18:20:41 UTC
Created attachment 307855 [details] [review]
apple-trailers: Remove stand-alone C apple-trailers plugin
Comment 7 Victor Toso 2015-07-21 20:57:04 UTC
Review of attachment 307849 [details] [review]:

Sure.
Comment 8 Victor Toso 2015-07-21 21:08:47 UTC
Review of attachment 307850 [details] [review]:

Looks good otherwise

::: src/lua-factory/grl-lua-library.c
@@ +344,3 @@
+          grl_data_set_int64 (GRL_DATA (media), key_id, lua_tointeger (L, -1));
+        } else if (lua_istable (L, -1)) {
+          grl_util_add_table_to_media (L, media, key_id, key_name, type);

You will need to add G_TYPE_INT64 to grl_util_add_table_to_media as well
Comment 9 Victor Toso 2015-07-21 21:15:42 UTC
Review of attachment 307851 [details] [review]:

Sure.

::: src/lua-factory/grl-lua-library.c
@@ +206,3 @@
+    fixed = g_convert (str, -1, "UTF-8", "ISO8859-1", NULL, NULL, NULL);
+    if (fixed == NULL) {
+      g_warning ("Ignored non-UTF-8 and non-ISO8859-1 string for field '%s'", key_name);

GRL_WARNING?
Comment 10 Victor Toso 2015-07-21 21:16:51 UTC
Review of attachment 307852 [details] [review]:

Yes
Comment 11 Bastien Nocera 2015-07-22 17:17:50 UTC
Created attachment 307922 [details] [review]
lua-factory: Add support for GRL_METADATA_KEY_SIZE

GRL_METADATA_KEY_SIZE is an int64 key, which we need to support.
Comment 12 Bastien Nocera 2015-07-22 17:17:55 UTC
Created attachment 307923 [details] [review]
lua-factory: Fix performer key containing only one name

Fix the handling of arrays of strings. We shouldn't always overwrite the
names previously there, especially as the key is emptied before handling
tables of values.
Comment 13 Bastien Nocera 2015-07-22 17:18:15 UTC
Created attachment 307924 [details] [review]
lua-factory: Use GRL_WARNING instead of g_warning
Comment 14 Victor Toso 2015-07-23 15:28:55 UTC
Review of attachment 307924 [details] [review]:

yes
Comment 15 Victor Toso 2015-07-23 15:30:08 UTC
Review of attachment 307922 [details] [review]:

yes!
Comment 16 Victor Toso 2015-07-23 15:31:04 UTC
Review of attachment 307923 [details] [review]:

agreed
Comment 17 Victor Toso 2015-07-23 16:04:42 UTC
Review of attachment 307854 [details] [review]:

looks good as well!
Comment 18 Victor Toso 2015-07-23 16:07:23 UTC
Review of attachment 307855 [details] [review]:

I think it is necessary to port the apple-trailers test to the tests/lua-factory/sources as well.
Comment 19 Victor Toso 2015-07-23 16:14:53 UTC
Attachment 307849 [details] pushed as c101d06 - lua-factory: Better debugging when registering sources
Attachment 307852 [details] pushed as e8d8221 - lua-factory: Add Pocket GResource file to the dist
Attachment 307854 [details] pushed as 069f7dc - lua-factory: Port Apple Trailers source to Lua
Attachment 307922 [details] pushed as 46d7ebf - lua-factory: Add support for GRL_METADATA_KEY_SIZE
Attachment 307923 [details] pushed as d5e489d - lua-factory: Fix performer key containing only one name
Attachment 307924 [details] pushed as edb26e0 - lua-factory: Use GRL_WARNING instead of g_warning
Comment 20 Bastien Nocera 2015-07-23 16:51:26 UTC
All pushed to master, thanks for the reviews!