Correctly matching multiple episodes aired on the same date

Hi

I’ve updated a scanner which was written for Enigma2 (linux satellite box) files to work with files recorded with DVBLink. The files are in the following format;

Emmerdale-1900_20160324-4-10030000-1458846000.ts

ShowName-AirTime-AirDate-ChannelNo-NotUsed-Notused.ts

This works fine apart from where there are two episodes aired on the same date (at different times) such as;

Emmerdale-2000_20160324-4-10030000-1458849600.ts

As you can see, this is two episodes of the programme “Emmerdale”, one aired at 7pm and one at 8pm. Unfortunately, Plex is only passing the air date to TheTVDB (and if my understanding of the API is correct, there isn’t a way to identify multiple episodes on the same day) but I’m hoping to be proved wrong.

This is my code snippet - hopefully somebody will know either what the fix is or tell me this is not possible;

  if (file.endswith(".ts")):

    # Remove path and extension
    tsfile = os.path.basename(file)
    tsfile = os.path.splitext(tsfile)[0]

    # DVBLink files are named as follows - Programme_Name,Time_Date,ChannelNo,JunkData,MoreJunkData
    (programme,time_date,channel,junk,morejunk) = tsfile.split('-',6)
    (time,date) = time_date.split('_')

    year = int(date[0:4])
    month = int(date[4:6])
    day = int(date[6:8])
    hour = int(time[0:2])
    minute = int(time[2:4])
    d = datetime.datetime(year, month, day, hour, minute)
    t = d.timetuple()

    show = programme.replace('_',' ')
    season = year
    #episode = (hour,minute)
    #title = channel+" - "+date[6:8]+"/"+date[4:6]+"/"+date[0:4]+" "+time[0:2]+":"+time[2:4]
    title = show

    print "adding tv show", (show), "season", (season),"title", (title), "year", (year)
    tv_show = Media.Episode(show,season,title,year)
    tv_show.released_at = "%4d-%02d-%02d %02d:%02d" % (year, month, day, hour, minute)
    tv_show.parts.append(file)
    mediaList.append(tv_show)

Today’s Beta Release 1.11.3.4793 has changes in handling of multiple episodes on the same day

See Release Notice http://forums.plex.tv/discussion/comment/1615546/#Comment_1615546

  • (DVR) Episodes of the same show that air on the same day now record correctly (#6668)

A further change has been released today in version 1.12.2.4929 beta

See Release Notice http://forums.plex.tv/discussion/comment/1645660/#Comment_1645660

  • (DVR) More fixes around recording multiple airings of a show on the same day (#6668)

This fixes the problem where only one episode was recorded.

There remains an issue with episode identification in the library and that is because of the lack of the detail in the Gracenote data. The airing time is used in this fix to label the episodes differently.

Thanks to @“Kings Media” for the additional user testing for this fix

Is there anything further on the issue of episode identification in the library for these multiple recordings? This has been ongoing for such a long time.

Any idea if this issue is ever going to get resolved?

Not sure if I should have started a new topic or reply to this post. Let me know.
The new EPG doesn’t seem to recognize Major League Basebal games at all. It keeps matching every game to the PBS documentary “Baseball (1994)”. Also, if more than one game airs on the same day, it combines the two games into one episode. Probably due to the aforementioned mismatch.

I too have this problem with simpsons episodes that aired on the same day. All the time I get two episodes that shows up as one in Plex.