Jump to content


Photo

TV Episode Naming Incorrect

tv episode naming filename

  • Please log in to reply
15 replies to this topic

#1 cloudstriker83 OFFLINE  

cloudstriker83

    Newbie

  • Members
  • 7 posts
  • Local time: 03:28 PM

Posted 05 March 2017 - 02:53 PM

Hi,

 

I used iTunes before Emby and so have a TV episode structure in the form of

/TV Show Name/Season 1/01 Episode Name.m4v

according to https://github.com/M...ing-conventions it should be okay, to have episodes named just with episode number and episode name.

 

But it's not working that way. I have the file “The Expanse/Season 2/06 Paradigm Shift.m4v” which results in Emby as an episode named “06 Paradigm Shift” with season number 2 and episode number field blank. So Emby doesn't recognize the “06” as episode number but part of the title.

 

When I rename the file to “S02E06 Paradigm Shift.m4v” everything works fine and i have an episode named “Paradigm Shift” with season number 2 and episode number 6.

 

Do have have to rename ALL of my tv media files to correctly work with Emby because the TV-Naming wiki page is incorrect. Or is there a problem with Emby?

 

I attached both logfiles, one with scanning the libraries with the not working “06 Paradigm Shift.m4v” and one with the working “S02E06 Paradigm Shift.m4v” files.

Attached Files



#2 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139953 posts
  • Local time: 08:28 AM

Posted 05 March 2017 - 04:37 PM

hi @cloudstriker83, I tested this with no problem found. Notice how the info has episode #9.

 

58bc76edccee1_Untitled.png



#3 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139953 posts
  • Local time: 08:28 AM

Posted 05 March 2017 - 04:38 PM

I think the actual problem is that the tvdb server is having some difficulty today and is timing out quite a bit. As a result some metadata fetches are failing and that is why you're not getting the proper title.



#4 cloudstriker83 OFFLINE  

cloudstriker83

    Newbie

  • Members
  • 7 posts
  • Local time: 03:28 PM

Posted 05 March 2017 - 04:47 PM

I noticed tvdb having some performance issues today … but I created the library already on friday. And can reproduce both cases by just renaming the file back and forth. S02E06... scan... working, 06... scan... incorrect, S02E06... scan... working, and so on. Would be a big coincidence if tvdb is alway/only down, when I'm trying to use the “06...” file



#5 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139953 posts
  • Local time: 08:28 AM

Posted 05 March 2017 - 04:56 PM

Sorry, i understand you're operating under the assumption that there's an Emby problem but that would a bit of an injustice as it's 100% related to the tvdb server issues.

To prove this, I turned on the MovieDb provider for episode metadata, then I added a new episode using your convention above, and viola, correct title, overview, image, everything.

 

58bc7b642c0ec_Untitled.png



#6 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139953 posts
  • Local time: 08:28 AM

Posted 05 March 2017 - 04:57 PM

58bc7bafc3ce7_Untitled.png



#7 cloudstriker83 OFFLINE  

cloudstriker83

    Newbie

  • Members
  • 7 posts
  • Local time: 03:28 PM

Posted 05 March 2017 - 05:53 PM

I just disabled tvdb for metadata for tv shows, seasons and episodes and switched to moviedb. I then created a new file for episode 7, which didn't exist as a file before (just to prevent something stuck in some kind of cache).... and: the same problem, even now with moviedb. Episode number is part of the title, episode number field is empty.

 

58bc87c5cae66_Bildschirmfoto20170305um22

 

Then I created another new file for episode 8, but with S02E08 naming and it worked fine.

 

58bc883e642cf_Bildschirmfoto20170305um22



#8 cloudstriker83 OFFLINE  

cloudstriker83

    Newbie

  • Members
  • 7 posts
  • Local time: 03:28 PM

Posted 05 March 2017 - 08:04 PM

I just copied the “The Expanse” folder into a new “TestFolder” and renamed it to a tv show I don't own. So I have the following structure TestFolder/Two and a Half Men/Season 2/...

The video files still have the names (and inline meta data) of The Expanse, like before, and yet again the only files, Emby seems to correctly recognize are the ones with the S02E0x file names. They get the correct meta data and have the episode numbers in the file info overlay.

I tried this with tvdb as metadata source as well as moviedb as source.

 

So it seems unlikely to me, that this has something to do with tvdb (which by the way is up and running normally right now) as I can reproduce this beviour independent from the data source.

 

With that in mind I disabled all of the metadata sources for tv shows, seasons and episodes. I created a new library and started scanning. And again the same result. There are obviously no images, summaries etc. in the episodes, but while “01 Safe.m4v” is now titled “01 Safe” with a blank episode number:

 

58bca587885a7_T01.png

 

file “S02E06 Paradigm Shift.m4v” is now titled “S02E06 Paradigm Shift” BUT has the correct episode number:

 

58bca592a822f_T06.png

 

And then I noticed something on your screenshot that differed from mind: you used a dash between episode number and episode name. So I renamed the file “01 Safe.m4v” to “01 - Safe.m4v” and this is what I got:

 

58bca71554a21_T01b.png

 

Emby recognized the file as episode 1 of that season. But this is NOT what is mentioned in the naming conventions of the Emby wiki. There is “02 Episode Name.avi” one of the possible filenames (and not “02 - Episode Name.avi”).



#9 cloudstriker83 OFFLINE  

cloudstriker83

    Newbie

  • Members
  • 7 posts
  • Local time: 03:28 PM

Posted 05 March 2017 - 08:33 PM

Just had a look into https://github.com/M...eNumberTests.cs and it seems that you are only testing those file names with dash between episode number and name (TestEpisodeNumber7, TestEpisodeNumber8, TestEpisodeNumber9) or with only episode number and nothing else (TestEpisodeNumber10) and with episode number followed by dot and space and then episode name (TestEpisodeNumber48). But you are not testing episode number, space, episode name.



#10 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139953 posts
  • Local time: 08:28 AM

Posted 05 March 2017 - 10:10 PM

what does your emby library setup look like? where does this folder appear in setup and using what content type?



#11 Happy2Play OFFLINE  

Happy2Play

    Trial and Error

  • Moderators
  • 16105 posts
  • Local time: 05:28 AM
  • LocationWashington State

Posted 05 March 2017 - 10:25 PM

@Luke  as OP noted all formats except spacing is working.  Tested and episode 02 was not identified.

 

58bcc8862a1c4_spacing.jpg


Edited by Happy2Play, 05 March 2017 - 10:26 PM.


#12 cloudstriker83 OFFLINE  

cloudstriker83

    Newbie

  • Members
  • 7 posts
  • Local time: 03:28 PM

Posted 06 March 2017 - 05:12 AM

The MediaBrowser.Naming repo says it features the support of all http://kodi.wiki/vie..._files/TV_shows namings. There you'll find the follwing:

 

\Season #\##

Season [season#] at the end of the directory name, file name starts with [episode#]

 

 

 

I'm not that good in C# but it seems there is no regex for that case in NamingOptions.cs (https://github.com/M...amingOptions.cs), so you should add something like:

 

                // "Season 1/01 blah.avi"
                nnew EpisodeExpression(@"[Ss]eason[\._ ](?<seasonnumber>[0-9]+)[\\\/](?<epnumber>\d{1,3})([^\\\/]*)$")
                {
                    IsOptimistic = true, 
                    IsNamed = true
                }

And some test methods in https://github.com/M...eNumberTests.cs

        [TestMethod]
        public void TestEpisodeNumber9991()
        {
            Assert.AreEqual(4, GetEpisodeNumberFromFile(@"The Expanse/Season 2/04 Godspeed.m4v"));
        }
        [TestMethod]
        public void TestEpisodeNumber9992()
        {
            Assert.AreEqual(4, GetEpisodeNumberFromFile(@"The Expanse\Season 2\04 Godspeed.m4v"));
        }


#13 ebr OFFLINE  

ebr

    Chief Bottle Washer

  • Administrators
  • 47494 posts
  • Local time: 08:28 AM

Posted 06 March 2017 - 09:51 AM

I thought we removed that convention because it caused problems with episode titles like "12 Angry Men"...



#14 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139953 posts
  • Local time: 08:28 AM

Posted 06 March 2017 - 04:26 PM

Ok yes, my mistake. It seems we don't have a regex to cover this scenario.  @cloudstriker83, your regex sample does work, but can you tweak it a little to handle these failing tests

        [TestMethod]
        public void TestEpisodeNumber58()
        {
            Assert.AreEqual(16, GetEpisodeNumberFromFile(@"Season 2\16 12 Some Title.avi"));
        }

        [TestMethod]
        public void TestEpisodeNumber59()
        {
            Assert.AreEqual(7, GetEpisodeNumberFromFile(@"Season 2\7 12 Angry Men.avi"));
        }

In both cases the episode number is being detected as 12. Thanks.



#15 cloudstriker83 OFFLINE  

cloudstriker83

    Newbie

  • Members
  • 7 posts
  • Local time: 03:28 PM

Posted 06 March 2017 - 04:42 PM

In both cases the episode number is being detected as 12. Thanks.

 

I'm not sure if the regex is wrong. Maybe it has something to do with the following “Group 3” (see below). Or with the isOptimistic, isNamed options. Or maybe the new regex that is checked before does already match so the new one isn't checked at all (try putting the new regex to the top of the array just to see if it's an order problem). Sorry, but I don't have an Emby dev enviroment running to simply play along with the settings.

 

58bdc7ef0a842_Bildschirmfoto20170306um21



#16 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139953 posts
  • Local time: 08:28 AM

Posted 06 March 2017 - 04:47 PM

Thanks for the info.







Also tagged with one or more of these keywords: tv, episode, naming, filename

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users