Mailing List Archive

Re: RFE and patch
On s?ndag 4 februari 2018 kl. 12:35:57 EET Torbjorn Jansson wrote:

> if it is eit then it sounds like you need to write a custom eitfixup for
> your provider.
> as i remember it you have one function to cleanup the eit data and there is
> a table that triggers the fixup when eit is collected on the correct
> network id or similar.
> (this is just from memory, was a while since i worked on eit fixups)

Couldn't resist and most of the work was already done for
me.Can someone commit this or what s the official procedure ?

This is applied to a pull some hour ago.

========= Start of patch ============


*** eitfixup.cpp.original 2018-02-04 13:28:40.387224914 +0200
--- eitfixup.cpp 2018-02-04 13:56:59.778378868 +0200
***************
*** 144,149 ****
--- 144,151 ----
m_RTLEpisodeNo2("^(\\d{1,2}\\/[IVX]+)\\.*\\s*"),
m_fiRerun("\\ ?Uusinta[a-zA-Z\\ ]*\\.?"),
m_fiRerun2("\\([Uu]\\)"),
+ m_fiAgeLimit("\\([1-9ST]*\\)$"),
+ m_fiFilm("^(Film|Elokuva): "),
m_dePremiereLength("\\s?[0-9]+\\sMin\\."),
m_dePremiereAirdate("\\s?([^\\s^\\.]+)\\s((?:1|2)[0-9]{3})\\."),
m_dePremiereCredits("\\sVon\\s([^,]+)(?:,|\\su\\.\\sa\\.)\\smit\\s([^\
\.]*)\\."),
***************
*** 1924,1929 ****
--- 1926,1950 ----
event.audioProps |= AUD_STEREO;
event.description = event.description.replace(m_Stereo, "");
}
+
+ // Remove age limit in parenthesis at end of title
+ // Added 4.2.2017 dag@newtech.fi
+
+ position = event.title.indexOf(m_fiAgeLimit);
+ if (position != -1)
+ {
+ event.title = event.title.replace(m_fiAgeLimit, "");
+ }
+
+ // Remove Film or Elokuva at start of title
+ // Added 4.2.2017 dag@newtech.fi
+
+ position = event.title.indexOf(m_fiFilm);
+ if (position != -1)
+ {
+ event.title = event.title.replace(m_fiFilm, "");
+ }
+
}

*** eitfixup.h.original 2018-02-04 14:13:16.551771756 +0200
--- eitfixup.h 2018-02-04 14:14:03.854354584 +0200
***************
*** 212,217 ****
--- 212,219 ----
const QRegExp m_RTLEpisodeNo2;
const QRegExp m_fiRerun;
const QRegExp m_fiRerun2;
+ const QRegExp m_fiAgeLimit;
+ const QRegExp m_fiFilm;
const QRegExp m_dePremiereLength;
const QRegExp m_dePremiereAirdate;
const QRegExp m_dePremiereCredits;

========= End of patch ============

Hope it gets in so I don't have to patch every pull :-)

Thanks again, Torbj?rn!
Dag
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: RFE and patch [ In reply to ]
On 02/04/2018 08:10 AM, Dag Nygren wrote:
> Couldn't resist and most of the work was already done for
> me.Can someone commit this or what s the official procedure ?
The procedure is to open a ticket
(https://code.mythtv.org/trac/wiki/TicketHowTo). Include a link to the
pull request or attach a patch to the ticket. Also update the pull
request with the ticket number.
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: RFE and patch [ In reply to ]
On s?ndag 4 februari 2018 kl. 15:59:05 EET Peter Bennett wrote:
> On 02/04/2018 08:10 AM, Dag Nygren wrote:
> > Couldn't resist and most of the work was already done for
> > me.Can someone commit this or what s the official procedure ?
>
> The procedure is to open a ticket
> (https://code.mythtv.org/trac/wiki/TicketHowTo). Include a link to the
> pull request or attach a patch to the ticket. Also update the pull
> request with the ticket number.

Thanks!

Ticket created and patch attached!

Dag
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: RFE and patch [ In reply to ]
On 5 February 2018 1:47:13 am Dag Nygren <dag@newtech.fi> wrote:


>
> Thanks!
>
> Ticket created and patch attached!
>
> Dag
>

A question on the patch - naming structures on thetvdb sometimes include
the year in the title like "Doctor Who (2005)", a country code like "Shark
Tank (AU)", or sometimes even both like "Utopia (AU) (2014)". Is the patch
selective enough to not strip these combinations?



_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: RFE and patch [ In reply to ]
On s?ndag 4 februari 2018 kl. 22:06:01 EET Mark Perkins wrote:
> On 5 February 2018 1:47:13 am Dag Nygren <dag@newtech.fi> wrote:
> > Thanks!
> >
> > Ticket created and patch attached!
> >
> > Dag
>
> A question on the patch - naming structures on thetvdb sometimes include
> the year in the title like "Doctor Who (2005)", a country code like "Shark
> Tank (AU)", or sometimes even both like "Utopia (AU) (2014)". Is the patch
> selective enough to not strip these combinations?

The country code will remain, but the years at the end would be removed.
Could be fixed with only accepting one or two numbers of course.

Myself don't really care too much about the years anyway.

Dag

_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: RFE and patch [ In reply to ]
On s?ndag 4 februari 2018 kl. 22:06:01 EET Mark Perkins wrote:
> On 5 February 2018 1:47:13 am Dag Nygren <dag@newtech.fi> wrote:
> > Thanks!
> >
> > Ticket created and patch attached!
> >
> > Dag
>
> A question on the patch - naming structures on thetvdb sometimes include
> the year in the title like "Doctor Who (2005)", a country code like "Shark
> Tank (AU)", or sometimes even both like "Utopia (AU) (2014)". Is the patch
> selective enough to not strip these combinations?

Ok. I fixed the patch to only react to
number below 20 (High enough age restriction :-) )
and the T or S (permitted for everyone in Finnish and Swedish)
letters in parenthesis.
It will stillfalsely react to (1T) or (1S) but avoiding that will
get unnecessary complicated.

None of your examples will be touched any more

Best
Dag


_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: RFE and patch [ In reply to ]
On 5 February 2018 9:36:52 am Dag Nygren <dag@newtech.fi> wrote:

> On söndag 4 februari 2018 kl. 22:06:01 EET Mark Perkins wrote:
>> On 5 February 2018 1:47:13 am Dag Nygren <dag@newtech.fi> wrote:
>> > Thanks!
>> >
>> > Ticket created and patch attached!
>> >
>> > Dag
>>
>> A question on the patch - naming structures on thetvdb sometimes include
>> the year in the title like "Doctor Who (2005)", a country code like "Shark
>> Tank (AU)", or sometimes even both like "Utopia (AU) (2014)". Is the patch
>> selective enough to not strip these combinations?
>
> Ok. I fixed the patch to only react to
> number below 20 (High enough age restriction :-) )
> and the T or S (permitted for everyone in Finnish and Swedish)
> letters in parenthesis.
> It will stillfalsely react to (1T) or (1S) but avoiding that will
> get unnecessary complicated.
>
> None of your examples will be touched any more
>
> Best
> Dag
>
>

Thankyou.

Is it worth adding a check to make sure the characters are always the last
4 or 5 characters of the title eg " (#)" or " (##)" - note the leading
whitespace character. This is presuming that the age restriction is always
added to the end of the title with a whitespace separator?

That might prevent matches on valid titles like "Casting(s)" and
"Histoire(s) du cinéma"


_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: RFE and patch [ In reply to ]
On m?ndag 5 februari 2018 kl. 01:36:22 EET Mark Perkins wrote:

> Is it worth adding a check to make sure the characters are always the last
> 4 or 5 characters of the title eg " (#)" or " (##)" - note the leading
> whitespace character. This is presuming that the age restriction is always
> added to the end of the title with a whitespace separator?
>
> That might prevent matches on valid titles like "Casting(s)" and
> "Histoire(s) du cin?ma"

The potential s or t character will always be upper case and
I don't think I can trust them on always adding a white space.
So I think it will be better as it is right now :-)
And I am already checking for the expression to
be the last characters of the title.

Best
Dag

_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org