Opened 5 years ago

Closed 5 years ago

#12327 closed Bug Report - General (Fixed)

Scheduling of repeats unreliable (unreliable CRIDs)

Reported by: angela.schmid@… Owned by: Karl Egly
Priority: minor Milestone: 0.27.4
Component: MythTV - EIT Version: 0.27.3
Severity: medium Keywords: eit crid seriesid programid
Cc: Ticket locked: no

Description

Scheduling of repeats is unreliable, as my EPG provider doesn't always use the same programID/seriesID for repeats.

Discussions: https://www.mythtv.org/pipermail/mythtv-users/2014-June/364899.html http://www.gossamer-threads.com/lists/mythtv/users/580238

Atm I use a dirty patch, to not save the programID/seriesID to the DB. Only title/subtitle are used, making scheduling reliable again.

It would be nice to have an option in the EIT setup to define for a specific EIT source, if the IDs should be used for scheduling and adapt the scheduling engine accordingly.

Attachments (1)

0001-FIX-UPC-subtitle.patch (3.1 KB) - added by angela.schmid@… 5 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 5 years ago by stuartm

Component: MythTV - SchedulingMythTV - EIT
Owner: changed from gigem to Karl Egly
Status: newassigned

I think the preferred approach would be a fixup for specific networks where CRIDs are misused.

comment:2 Changed 5 years ago by angela.schmid@…

Hi Karl, My EPG provider misuses (abuses?) the Original_network_ID: 1 (0x0001) [= Astra Satellite...

Each EIT event has the following tag which could be used:

DVB-DescriptorTag?: 95 (0x5f) [= private_data_specifier_descriptor] descriptor_length: 4 (0x04)

0000: 5f 04 00 00 06 00 _.....

PrivateDataSpecifier?: 1536 (0x00000600) [= UPC 1 - 2]

Should I use this tag to identify my provider? What to fix, setting programID/seriesID to NULL?

comment:3 Changed 5 years ago by Karl Egly

Hi Angela, yes we don't currently have a nice way to handle the PrivateDataSpecifier?, but that would a good datum to key fixups to. Also the authority for CRIDs.

If I understand correctly then UPC has the same data source as Unitymedia that is not fit for our scheduling purpose. I can cherry-pick 494dfa6eef01aabe1ed7bf3d0f3139f20a8b7678 to fixes/0.27 if it works for you.

Does 30df98ce5d11b69d0b5c5114a9007cdfc79a7e9b work for you? I can cherry-pick that, too. Should improve the duplicate detection if the episode title is present in the EIT.

comment:4 Changed 5 years ago by angela.schmid@…

Hi Karl, UPC, Unitymedia KabelBW, etc, are all using a dutch EPG provider, with eventis.nl CRID.

I developed also a UPC subtitle patch (see attachment). I don't check the PrivateDataSpecifier?=UPC, so your code is better, to check first and then interprete the Private Descriptor with the subtitle as UPC subtitle data.

However, I had an explicit check to look for the country code not empty, as otherwise the length calculation could crash, as the data was sometimes not uniform/correct. This code is from June 2012 (with little adaptions for newer mythtv versions). Maybe it doesn't happen anymore. Can you please have a look if you find an issue with my code, so that checking the country code is superfluous.

Is it your code? Are you using it?

I reverse my two patches and give the above patches a try tomorrow.

Changed 5 years ago by angela.schmid@…

Attachment: 0001-FIX-UPC-subtitle.patch added

comment:5 Changed 5 years ago by Karl Egly

Yes, I wrote that code and it is in master already. I run master in production. (although I try to just use xmltv.se as epg provider these days :)

Your subtitle code seems to do almost the same as mine, but it has some small issues. The three letter code is a language code, and the subtitle does begin directly after the language code. But the text can start with a special encoding mark of 1 to 3 bytes. (btw, that is a common setup for all kinds of texts in DVB descriptors, length, three letter language, then the text maybe including an encoding mark) Also there appears to be a off by one when reading the subtitle starting at the second byte, but still reading the full length. 0xA7 is used as a magic value instead of a constant, e.g. upc_event_episode_title in master.

Should a provider start to send multiple subtitles with different languages we can start to pick the correct one. The settings are already in place.

The addition of kFixGenericDVB should not be necessary as it is added automatically for all DVB-EIT events.

As always, I'd love to collect some specimen (hexdumps from dvbsnoop showing an EIT event in the wild) for the work in progress unit tests. (Although they are a bit on the back burner at the moment)

comment:6 Changed 5 years ago by angela.schmid@…

I know about the special encoding mark, it should be taken care of in dvb_decode_text, which also takes care of the language code.

Also there appears to be a off by one when reading the subtitle starting at the second byte, but still reading the full length.

I am curious why I made the explicit check and could explain why I added it, can you please tell me where I am off by one byte.

comment:7 Changed 5 years ago by angela.schmid@…

also takes care of the language code

I meant character encoding.

comment:8 Changed 5 years ago by Karl Egly

Hmm, looks like there is no off-by-one. I got confused by the combination of comment and code... But your code does the same as my code (not surprising as its both appears to be based on #12091 by Eduard Iten. I wish I had seen the name before I committed it)

If the two commits to master work for you I'll just cherry-pick them.

comment:9 Changed 5 years ago by angela.schmid@…

My 0.26 code was posted on the UPC community site. Eduard made it 0.27 compatible. I didn't knew it found its way on trac.

Both patches work great, please make them available on fixes-0.27.

comment:10 Changed 5 years ago by Karl Egly

Milestone: unknown0.27.4
Resolution: Fixed
Status: assignedclosed

commited as c32f254cd and 86ff53a7a1

Note: See TracTickets for help on using tickets.