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 725408 - local-metadata: Even if non of the regexes match, do not include file extension in title
local-metadata: Even if non of the regexes match, do not include file extensi...
Status: RESOLVED DUPLICATE of bug 706877
Product: grilo
Classification: Other
Component: plugins
unspecified
Other Linux
: Normal normal
: ---
Assigned To: grilo-maint
grilo-maint
Depends on:
Blocks:
 
 
Reported: 2014-02-28 17:27 UTC by Elad Alfassa
Modified: 2014-03-27 21:24 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Elad Alfassa 2014-02-28 17:27:54 UTC
File extensions are an implementation detail which is useless for a user looking for a video to watch.

I have a file named "Monty Python's Life Of Brian.mkv". It doesn't match the "show" regex nor the "movie" regex". It is shown in totem with the file extension. Ideally, I'd want it to show simply as "Monty Python's Life Of Brian".

The comment in line 400-401 of grl-local-metadata.c indicates that is indeed the intention, but for some reason that doesn't work.

I'm still investigating the cause of this bug. I also have a patch that adds a test for this case in test_local_metadata.c, if you are interested.
Comment 1 Elad Alfassa 2014-02-28 19:03:35 UTC
I'm still not sure I understand this bug completely. It seems that if the regex fails, *title is set properly in video_guess_values_from_uri(), but it gets lost somewhere on the way back to grilo and replaced with the original title passed to the plugin (the file URI).
Comment 2 Bastien Nocera 2014-02-28 19:19:15 UTC
metadata is never overwritten. That's it. See the other bugs I pointed you to.
Comment 3 Juan A. Suarez Romero 2014-03-02 22:55:19 UTC
Elad, are you using upstream? Which application are you using for testing? Totem? grilo-test-ui?

FWIW using grilo-test-ui shows me the file without the extension.
Comment 4 Elad Alfassa 2014-03-02 23:02:51 UTC
I'm testing with totem.

I have totem, grilo and grilo-plugins all up-to-date from git master.
Comment 5 Elad Alfassa 2014-03-03 16:39:36 UTC
fyi, this also happens if I make a test filename with an extension (that doesn't match the movie/show regex, such as the one in my example) in grilo-plugins/tests/local-metadata/test_local_metadata.c
Comment 6 Bastien Nocera 2014-03-27 17:47:24 UTC
(In reply to comment #5)
> fyi, this also happens if I make a test filename with an extension (that
> doesn't match the movie/show regex, such as the one in my example) in
> grilo-plugins/tests/local-metadata/test_local_metadata.c

That passes a title rather than a URL, which won't get overwritten. With the patch from bug 725456, you can double-check that it does remove the suffix when passed a URL rather than a title.
Comment 7 Juan A. Suarez Romero 2014-03-27 18:52:33 UTC
Elad, bug 725456 has been fixed and pushed. Can you test again?
Comment 8 Bastien Nocera 2014-03-27 19:20:53 UTC
(In reply to comment #7)
> Elad, bug 725456 has been fixed and pushed. Can you test again?

That bug only contains a test suite change that makes it easy to fix the bug. The patches from bug 706877 should help though.
Comment 9 Bastien Nocera 2014-03-27 21:24:30 UTC

*** This bug has been marked as a duplicate of bug 706877 ***