[mythtv-users] metadatalookup -- not searching tvdb after post processing RECORDED

Karl Dietz dekarl at spaetfruehstuecken.org
Thu Nov 1 21:50:30 UTC 2012


On 01.11.2012 18:20, John wrote:

Hi John,

ahh, it made it to the list. As this might be interesting to others
I'll reply here, too.

> 1) Trying to add a regex to pick out "subtitle" from description. The
> current fixupNl already picks up "Afl.: subtitle." from description. I
> have tried and failed to understand the C++ regex syntax represented by :
>
> m_nlSub("\\sAfl\\.:\\s([^\\.]+)\\."),

That translates to: one space, "Afl.:", another space, one or more 
characters that are not a full stop (this part is the first and only
capture group), and a full stop at the end.

> I thought m_nlSub("\\s"([^\\.]+)""), or m_nlSub("\\s\\"([^\\.]+)\\"") if
> the " needs to be escaped, but I am obviously out of my depth.

You want to capture a string that does not contain a full stop and is
enclosed by quotation marks? (with a space in front)
I think the correct escape is a single backslash for the quotation marks.
Seeing the original data (e.g. from dvbsnoop) would help to understand
what you need. (just guessing from your SQL queries hints that the
space in front of the first quotation mark might be the difference)

> I realise you didn't sign on to be my personal trainer, but would like
> to get this working. If you can point me to a good How to, happy to learn.

no worries. I have to look up the documentation for regexp every now
and then, too.

> 2) There is also :
>
> void EITFixUp::FixCategory(DBEventEIT &event) const
> {
> // remove category movie from short events
> if (event.categoryType == kCategoryMovie &&
> event.starttime.secsTo(event.endtime) < kMinMovieDuration)
> {
> /* default taken from ContentDescriptor::GetMythCategory */
> event.categoryType = kCategoryTVShow;
> }
> }
>
>
> which looks like it should fix my problem of Dutch channels being marked
> as category "Film - Comedy" and category_type movie. ( checking the
> schedules from the database there was 1 instance where the Film - *
> category actually meant a Film, real Films were marked Film !

FixCategory is a generic bandaid for fixing stuff that we should not
break in the first place. This fixup was added before I made up my mind
wrt "there is no movie/series indicator in plain old EIT".

If its (almost) always the case that "Film - *" is a series and "Film"
is a movie you can just put that rule into FixNL. Only one false
positive is way better then going by some random cutoff duration.

> However the EITFixUp::FixCategory does not seem to be being called, I
> assume it is called from somewhere else, but its not within
> eitfixup/eithelper. Any pointers ?

its only called in EITFixup for finnish stations and german RTL.

> 3) And for eithelper, this seems a reasonable patch:
>
> --- a/mythtv/libs/libmythtv/eithelper.cpp
> +++ b/mythtv/libs/libmythtv/eithelper.cpp
>
> - // Netherlands
> + // Netherlands DVB-C
> fix[ 1000U << 16] = EITFixUp::kFixNL;
> + // Canal Digitaal DVB-S 19.2 Dutch/Belgian, ONID 53 covers all Canal
> Digitaal TiD
> + fix[ 53U << 16] = EITFixUp::kFixNL;
> + // Canal Digitaal DVB-S(2) 23.5 Dutch/Belgian
> + fix[ 3202LL << 32 | 3U << 16] = EITFixUp::kFixNL;
> + fix[ 3208LL << 32 | 3U << 16] = EITFixUp::kFixNL;
> + fix[ 3211LL << 32 | 3U << 16] = EITFixUp::kFixNL;
> + fix[ 3222LL << 32 | 3U << 16] = EITFixUp::kFixNL;
> + fix[ 3225LL << 32 | 3U << 16] = EITFixUp::kFixNL;

Looks good (assuming that FixNL does not break any of the channels that
match but were not in your channel list)

Regards,
Karl


More information about the mythtv-users mailing list