Jump to content

Bug in missing episodes


Go to solution Solved by Lessaj,

Recommended Posts

HawkXP71
Posted

With new seasons coming out, I have noticed a bug in the missing episodes system.
If you dont have any episodes from a season, meaning there is no season at all in the database, than episodes dont show up as missing.

This may be 100% intentional, but I do consider it a bug.

I can grab a log, but honestly I dont see anything it it happening when I click "show missing episodes" 

Here is an easy way to reproduce it using a developer servers.

  1. find a tv series with multiple seasons (2 is enough)
  2. On the hard drive have two copies of the show
    1. On one copy have all but one episode of the last season available, ie delete the episode from the hard drive
    2. On the other copy, delete the last season completely.
  3. Create two developer servers
    1. Point each one to the separate of your local seasons
  4. Scan the libraries, making sure the "find missing episodes" tasks has finished running (not sure how/when this gets kicked off)

You should see, in the first server it shows the missing episode from that season.  On the second server, the last season does NOT show up as missing.

Note, to reproduce there might be an easier way.  However I have found, when I remove a season from the harddrive, the database now "knows about" the season, even though it has no episodes and the missing episode list works as expected.  This is why I consider it a bug.

Posted
Quote

Point each one to the separate of your local seasons

Hi, what do you mean by this?

HawkXP71
Posted
44 minutes ago, Luke said:

Hi, what do you mean by this?

Sorry, should have been clearer.

Have one server point to one folder and the other server point to the other folder.

If your directory was
MissingEpisode/Show
                                  |-Season1
                                          |- S01E01
                                                 ....
                                          |- S01EXX
                                  |-Season2
                                          |- S02E01
                                                   ....
                                          |- S02EYY   (where YY is number of episodes - 1)
MissingSeason/Show
                                  |-Season1
                                          |- S01E01
                                                 ....
                                          |- S01EXX

The root library location for server 1 would be MissingEpisode, and for server 2 would be MissingSeason.

Is that clearer?

Posted

So they're actually independent because each server only sees one? So really you only need to test one, right?

HawkXP71
Posted
1 hour ago, Luke said:

So they're actually independent because each server only sees one? So really you only need to test one, right?

Yes, the two servers are 100% independent.

The reason why I used 2 in the how to, was in the note in my initial post
 

Quote

Note, to reproduce there might be an easier way.  However I have found, when I remove a season from the hard drive, the database now "knows about" the season, even though it has no episodes and the missing episode list works as expected.  This is why I consider it a bug.

 

HawkXP71
Posted

FYI.  In the plugin I am working on, where I created "Find missing movies from collections" functionality, as well as find missing episodes, I initially had the same issue.

The problem came down to this.

 

seasons = getSeasonsFromTmdb( show )
foreach( season of seasons )
{
	embySeason = GetEmbySeasonForShow( show );
	if ( !embySeason )  // the bug removing this check fixed it
		continue;   
	foreach( episode of season )
	{
        // it used embySeason as a parent for the internal query
        // now if embySeason is null, it always returns a null episode
		embyEpisode = GetEmbyEpisode( embySeason, embyEpisode ); 
		if ( !embyEpisode )
		{
        	// found a missing episode
		}
	}
}

You might have similar logic somewhere

Posted

i can't reproduce. i have lots of series with only a single season/episode and i'm not seeing this.

HawkXP71
Posted
38 minutes ago, Luke said:

i can't reproduce. i have lots of series with only a single season/episode and i'm not seeing this.

So your saying if you have NO episodes in a season, ie the new season starts tomorrow, and you dont have episode 1 of season 2 yet, it shows you the missing episode?

  • Solution
Lessaj
Posted

Can you show an actual example? If the new season starts tomorrow then it can't be missing can it? It's not available. Are you saying it doesn't appear under Upcoming, or are you expecting it to show you "missing episodes" that haven't been released yet without using the Upcoming toggle? This season starts tonight (not sure why it says Oct 7 in that case, but regardless it's upcoming), I don't have a Season 4 folder.

image.thumb.png.2a1b7ed5bc0e81053b25e61ee0f4216b.png

Compared to this show I only have 1 episode in my test instance shows season 2 episodes missing, I have no season 2 folder.

image.png.600908875a2a775886c53e6d7dddf0e4.png

  • Disagree 1
HawkXP71
Posted

Feeling like an idiot now... I never noticed the upcoming... ;(

  • Like 1
  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...