UK SchedulesDirect movies split by news
Added by Em Smith almost 7 years ago
On some channels there is a five minute "news" in the middle of the movie. Previously SD would hide that news programme from the schedule and just give one programme combining the movie segments+news so scheduling worked nicely.
However, I noticed last night that on some channels, SD have started to split the movie in to the three programmes, movie (1 hour); news (5 mins); movie pt 2 (1h30) to accurately follow the OTA guide. That means you may only get one part of the movie, with the second half marked as a dup.
I've not had time to look in to a proper fix (have to wait until next year), but in the interim I've attached a perl script to take an xmltv file, remove the five minutes news and merge the two movie segments. It may be useful to other people. It's very slow to run since it has to parse/re-write.
You'd run it as something like:
tv_grab_zz_sdjson_sqlite --config-file tv.xml --output myfile.xml && tv_fixup_programmes myfile.xml > myfile-fix.xml && nc -w -5 -U ~/.hts/tvheadend/epggrab/xmltv.sock
And in the output file you would see comment lines where a programme has been merged:
<!-- Merging programmes on XYZ for 'Bob' (MV12345678.0000) and removing 'News' (SH87654321.0000) of 5 minute duration -->
I also had to disable/re-enable my recording rules to pick up the new extended times for movies that had already been scheduled.
Note that for me, the sdjson grabber outputs xmltv that isn't parseable by the xmltv parser (due to duplicate channel/id) so it means we get some warnings about dropped channel definitions.
tv_fixup_programmes (5.44 KB) tv_fixup_programmes |