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 727181 - local-metadata: Another bad TV show parsing
local-metadata: Another bad TV show parsing
Status: RESOLVED FIXED
Product: grilo
Classification: Other
Component: plugins
git master
Other Mac OS
: Normal normal
: ---
Assigned To: grilo-maint
grilo-maint
Depends on:
Blocks:
 
 
Reported: 2014-03-27 18:00 UTC by Bastien Nocera
Modified: 2014-05-30 15:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix regexp and add 'fail' tests to local-metadata (4.10 KB, patch)
2014-05-11 02:30 UTC, Victor Toso
needs-work Details | Review
local-metadata: fix regexp and tests (2.27 KB, patch)
2014-05-11 17:50 UTC, Victor Toso
accepted-commit_now Details | Review
local-metadata: fix regexp and tests (2.35 KB, patch)
2014-05-11 18:00 UTC, Victor Toso
committed Details | Review

Description Bastien Nocera 2014-03-27 18:00:24 UTC
URL:
file:///home/hadess/.cache/totem/media/140127Mata-16x9%20(bug%20723166).mp4

will give out show = '140127Mata-16x9 (bug'
Comment 1 Juan A. Suarez Romero 2014-03-28 11:19:27 UTC
Can you check if this is already fixed with the latest changes in upstream?
Comment 2 Bastien Nocera 2014-03-28 11:53:45 UTC
(In reply to comment #1)
> Can you check if this is already fixed with the latest changes in upstream?

Still broken, as you can see from "make check" not failing (I added this broken test case to the local-metadata test).
Comment 3 Juan A. Suarez Romero 2014-03-28 23:34:52 UTC
What is the expected value? Can't decide from it what would be the title or the show name
Comment 4 Bastien Nocera 2014-04-08 12:29:38 UTC
It shouldn't be detected as a TV episode at all. So show should be empty, and episode/season 0.
Comment 5 Victor Toso 2014-05-11 02:30:35 UTC
Created attachment 276308 [details] [review]
fix regexp and add 'fail' tests to local-metadata
Comment 6 Bastien Nocera 2014-05-11 06:47:17 UTC
Review of attachment 276308 [details] [review]:

::: tests/local-metadata/test_local_metadata.c
@@ +99,3 @@
+    { "Adventure Time - 2x01 - It Came from the Nightosphere.mp4", NULL, "Adventure Time", 2, 1, FALSE },
+
+    /* checks that should fail: */

Those checks below are bugs that should be fixed. The computed values are completely incorrect. Correct the computed values instead.

@@ +116,3 @@
+
+    if (episode_tests[i].should_fail) {
+      g_assert_cmpstr (episode_tests[i].show, !=, show);

Why not correct the expected values in the tests instead?
Comment 7 Victor Toso 2014-05-11 17:50:55 UTC
Created attachment 276342 [details] [review]
local-metadata: fix regexp and tests

Cool. I didn't realize that with 'My.Neighbor.Totoro.1988' was not getting the title and year right.

So, i've updated the test with show value = NULL for both 'fail' cases as they are not shows.

I don't have plenty series/movies in this computer for testing, so, if you find any more problems I'm could improve the regexp a bit more.
Comment 8 Bastien Nocera 2014-05-11 17:56:07 UTC
Review of attachment 276342 [details] [review]:

Looking good!

::: tests/local-metadata/test_local_metadata.c
@@ +98,3 @@
     { "Adventure Time - 2x01 - It Came from the Nightosphere.mp4", NULL, "Adventure Time", 2, 1 },
 
+    { "My.Neighbor.Totoro.1988.1080p.BluRay.X264.mkv", NULL, NULL, 0, 0 },

Add a note above that, that it's correctly not detected as an episode of a series.
Comment 9 Victor Toso 2014-05-11 18:00:42 UTC
Created attachment 276343 [details] [review]
local-metadata: fix regexp and tests
Comment 10 Bastien Nocera 2014-05-11 18:06:30 UTC
Review of attachment 276343 [details] [review]:

Yep