GNOME Bugzilla – Bug 727181
local-metadata: Another bad TV show parsing
Last modified: 2014-05-30 15:11:33 UTC
URL: file:///home/hadess/.cache/totem/media/140127Mata-16x9%20(bug%20723166).mp4 will give out show = '140127Mata-16x9 (bug'
Can you check if this is already fixed with the latest changes in upstream?
(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).
What is the expected value? Can't decide from it what would be the title or the show name
It shouldn't be detected as a TV episode at all. So show should be empty, and episode/season 0.
Created attachment 276308 [details] [review] fix regexp and add 'fail' tests to local-metadata
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?
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.
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.
Created attachment 276343 [details] [review] local-metadata: fix regexp and tests
Review of attachment 276343 [details] [review]: Yep