Opened 13 years ago

Closed 9 years ago

#1777 closed patch (fixed)

Support for new XMLTV

Reported by: stuartm Owned by: stuartm
Priority: minor Milestone: 0.21
Component: MythTV - Mythtv-setup Version: head
Severity: low Keywords:
Cc: mythtv@… Ticket locked: no

Description

I'm working on adding support for the new xmltv features and improvements, which should reduce the hardcoded xmltv stuff in Myth, at Isaac's request.

There will be at least three changes.

Setup => Use tv_find_grabbers instead of a hardcoded list. FillData? => Glean the grabbers capabilities from the new --capabilities option. e.g. All grabbers with the baseline capability support --offset Setup => Add support for the new apiconfig. (Currently only used by the Swedish grabber?)

These all require the version of XMLTV to be 0.5.43 or greater. Maintain backwards compatibility is up for debate, though I personally don't think it necessary (XMLTV is easy to upgrade).

I've attached the first draft of a patch which covers using tv_find_grabbers.

Attachments (6)

xmltv_find_grabber.diff (5.3 KB) - added by stuart@… 13 years ago.
Use tv_find_grabbers
xmltv_find_grabber.2.diff (5.8 KB) - added by stuartm 13 years ago.
Diff updated against 0.20/SVN head
xmltv_capabilities_3.diff (30.4 KB) - added by stuartm 13 years ago.
Final version of patch
tv_find_grabbers_to_fixes.diff (6.4 KB) - added by stuartm 12 years ago.
tv_find_grabbers patch for -fixes
mythfilldatabase_capabilities_backport.diff (28.5 KB) - added by stuartm 12 years ago.
Backport of the --capabilties changes to -fixes
mythfilldatabase_capabilities_backport.2.diff (28.5 KB) - added by stuartm 12 years ago.
Removed second call to handlePrograms() which was accidently left in after the merge

Download all attachments as: .zip

Change History (32)

Changed 13 years ago by stuart@…

Attachment: xmltv_find_grabber.diff added

Use tv_find_grabbers

comment:1 Changed 13 years ago by willu.mailingLists@…

Hi,

I maintain tv_grab_au_reg, an XMLTV grabber for two Australian data sources. Based on my quick glance at the new XMLTV, it shouldn't be too hard to support the new discovery spec (just need to add two simple command line options).

I'm more concerned about some of the additional requirements on the baseline capability. I hope that Myth doesn't lose the capability to interpret timestamps without explicit timezones.

Finally, as far as backwards compatability, I think it would be good to support the version of XMLTV currently in Debian Stable. That could be as simple as allowing the user to enter the path and command line options to a grabber manually, and not failing if you can't find 'tv_find_grabbers'. i.e. it might be harder to configure if you're using Debian Stable, but it is still possible. Myth can already do this, so just don't take that functionality out.

comment:2 Changed 13 years ago by mattias.holmlund@…

With this patch, MythTV would be able to use all XMLTV-grabbers installed on the system that complies with the XMLTV baseline capability. This means that MythTV would no longer need to be updated when a new grabber is written, instead tv_find_grabbers will automatically find the new grabber and give the user the option of using it. tv_find_grabbers will find all grabbers that are in the executable path, have a name starting with tv_grab_ and support the --capabilities and --description parameters. These parameters in the xmltv wiki, but it is unfortunately down at the moment.

As for backwards compatibility, I don't think it is a big issue. Most grabbers get data from websites that change and break the grabber, so most grabbers have a relatively short lifespan for each version anyway. There is already a repository for the latest xmltv-release for Debian Stable for example (http://debian.crustynet.org.uk/).

comment:3 Changed 13 years ago by cpinkham

Milestone: 0.21
Severity: mediumlow
Type: defectpatch

Agreeing with Stuart that this should wait till after 0.20, so moving this to 0.21.

comment:4 Changed 13 years ago by stuartm

Owner: changed from Isaac Richards to stuartm

Changed 13 years ago by stuartm

Attachment: xmltv_find_grabber.2.diff added

Diff updated against 0.20/SVN head

comment:5 Changed 13 years ago by stuartm

(In [11137]) Refs #1777

Use tv_find_grabbers to auto-discover available xmltv scripts in mythtv-setup. Removed hard-coded options.

This bumps the required version of xmltv to >= 0.5.43

comment:6 Changed 13 years ago by stuartm

Status: newassigned

Attached what will likely be the final version of the xmltv_capabilities patch. I really need datadirect users to test and some more xmltv user testing wouldn't hurt.

Changed 13 years ago by stuartm

Attachment: xmltv_capabilities_3.diff added

Final version of patch

comment:7 Changed 13 years ago by stuartm

(In [12499]) Refs #1777

Adds support for the xmltv --capabilities and --preferredmethod arguments to mythfilldatabase.

This removes most of the hard-coded support for specific xmltv grabbers. I expect there to be teething trouble with this change. Please keep discussion to the -dev mailing list and not in Trac.

Note: This commit does not include the support for the cache capability, it may or may not be added later.

comment:8 Changed 13 years ago by stuartm

Reporter: changed from stuart@… to stuartm

comment:9 Changed 13 years ago by stuartm

(In [12571]) Adds VB_XMLTV for xmltv related messages.

Append --quiet to the grabber argument unless VB_XMLTV is set.

Refs #1777 and closes #1179

comment:10 Changed 12 years ago by anonymous

Milestone: 0.21unknown

comment:11 Changed 12 years ago by anonymous

Cc: mythtv@… added

comment:12 Changed 12 years ago by stuartm

Milestone: unknown0.21

comment:13 Changed 12 years ago by stuartm

Attaching a patch for 0.20-fixes backporting the tv_find_grabbers stuff. This seems worth doing now that some new grabbers are likely to be appearing for North America.

Ubuntu, Gentoo, Debian and Mandriva are all providing at least xmltv 0.5.44. I'll assume the same is true for Fedora and most other big distros

If the patch works on 0.20-fixes (I don't have a -fixes install to test) this will be committed soon to allow people to migrate before the September cutoff.

Changed 12 years ago by stuartm

tv_find_grabbers patch for -fixes

comment:14 Changed 12 years ago by Matt Rude <mythtv@…>

Fedora 7 is. # rpm -qa | grep xmltv xmltv-grabbers-0.5.45-70.fc7 xmltv-0.5.45-70.fc7 xmltv-gui-0.5.45-70.fc7

And so is Fedora Core 6 # rpm -qa | grep xmltv xmltv-grabbers-0.5.45-70.fc6.at xmltv-gui-0.5.45-70.fc6.at xmltv-0.5.45-70.fc6.at

comment:15 Changed 12 years ago by stuartm

(In [13871]) Backports the XMLTV tv_find_grabbers changes from trunk to -fixes ready for US users to migrate before the 1st September cutoff for Zap2It.

NOTE: This changes the minimum supported version of xmltv to 0.5.43

Refs #1777

Changed 12 years ago by stuartm

Backport of the --capabilties changes to -fixes

comment:16 Changed 12 years ago by stuartm

Attached the first version of a patch to backport the --capabilities changes which have been in trunk for 7 months to -fixes.

There was a major re-organisation of mythfilldatabase just after 0.20 was released. This meant that I had to manually merge the (large) patch and there may be a few problems. I don't have a fixes install to test and I haven't even tried compiling it.

I need some brave users to test the patch and be prepared to help debug any issues with me. This includes a couple of datadirect users to make sure that the changes haven't accidentally broken that.

comment:17 Changed 12 years ago by stuartm

Please note, before I receive any bug reports for the -fixes backport, the minimum required version of xmltv is 0.5.43 and the latest version 0.5.47 is recommended.

Unofficial grabbers _must_ support the baseline capability in addition to the --description and --capabilities arguments. See http://xmltv.org/wiki/xmltvcapabilities.html for more information.

comment:18 Changed 12 years ago by Hadley Rich <hads@…>

OK, I've just compiled and tested on a friends 20-fixes install. It compiles fine here. Using XMLTV 0.5.44 with my own external grabber. The grabber prefers allatonce.

Everything appears to work as expected, I've updated the cron job on that box to see what happens over the next couple of days.

comment:19 in reply to:  17 Changed 12 years ago by Roo <roo.watt@…>

Replying to stuartm:

Unofficial grabbers _must_ support the baseline capability in addition to the --description and --capabilities arguments. See http://xmltv.org/wiki/xmltvcapabilities.html for more information.

IIRC the grabber must also support --description to be discovered by tv_find_grabbers. --description returns a simple description of the grabber like "ICETV grabber - Australia".

I definitely had problems with this when it was introduced to trunk and this is what I tracked it down to.

Roo.

Changed 12 years ago by stuartm

Removed second call to handlePrograms() which was accidently left in after the merge

comment:20 Changed 12 years ago by stuartm

I've updated the patch to remove a duplicate function call spotted by hads. I'm still looking for more people to test this patch before I will commit it to -fixes.

The patch will allow users in North America to use an xmltv grabber after the DataDirect? service ceases in three weeks, should anyone need motivation to help.

comment:21 Changed 12 years ago by stuartm

(In [14206]) Backports the xmltv support changes to -fixes for those people wanting to use an xmltv grabber after the Zap2It service stops in two weeks. Requires that xmltv be at version 0.5.43 or above.

Refs #1777

N.B. This is a feature backport and not a bug fix.

comment:22 Changed 12 years ago by stuartm

Status: acceptedstarted

comment:23 Changed 11 years ago by stuartm

Milestone: 0.210.22

Unfortunately I've no time to finish this before 0.21.

comment:24 Changed 10 years ago by stuartm

Milestone: 0.220.23
Status: startedassigned

Pains me to do it, but I've got to be realistic and recognise that with all the work remaining on mythui this needs pushing to the 0.23 release.

comment:25 Changed 10 years ago by stuartm

Component: mythtvMythTV - Mythtv-setup

comment:26 Changed 9 years ago by stuartm

Milestone: 0.230.21
Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.