[mythtv-users] thetvdb fanart missing from Myth

Mike Perkins mikep at randomtraveller.org.uk
Thu Feb 16 15:46:16 UTC 2012


On 15/02/12 22:02, Ken Truesdale wrote:
> To recap, I have a recording that comes through in the program listings with
> a '/' character in it.  The slash causes the basic .24 algorithm for matching
> fanart names to fail since there can be no file named with a slash in it.
> (basic Unix rule)  I can't play any games with Jamu because even if I get a
> show in the fanart directory, Myth will never match the artwork because of
> the slash in the name.  The only thing I can do is rename the shows that come
> in for recording but I've discovered that causes problems with matching
> previously recorded shows.  And I have to remember to do it on an ongoing
> basis.
>
> So I bit the bullet and modified the Myth code that does the matching.  For
> anyone that is interested, I modified
> mythtv/programs/mythfrontend/playbackboxhelper.cpp to add following line
> title.replace(QString("/"), QString("_")); just before this line:
> title.replace(' ', "(?:\\s|-|_|\\.)?"); Recompile, redeploy, etc..
>
> Then, you need to manually get the fanart you want in the fanart directory
> and name it correctly including changing any '/' to a '_'.
>
> Note that I already had the source set up for compiling so that I could patch
> in Ron's Ceton patch.  Definitely not worth the trouble of getting the code
> just for this silly little fix.  But in case anyone else already has source
> code and has a recording with a slash in it and cares about fanart, this fix
> should do the trick.  Since it took me a while to find the right source file
> responsible, maybe somebody else could benefit.  (Unlikely, I know.)
>
> Also note that if Raymond hadn't already replied to my post explaining that
> .25 does things differently, then I'd do something more official-like about
> getting this code somewhere that it can roll forward.  But since the current
> matching in .24 is an evolutionary dead end, there's no point in anything
> more than sharing in this post.
>
Isn't there some kind of systematic way of handling characters like this by
escaping them (like & and " in HTML, or even \/ in code)? I would think 
that would be a preferable method to use rather than adding increasing 'one-off' 
rules exceptions every time someone uses yet another reserved character in a 
title string.

- yeah, I know you just have the one title so far, but the principle still 
applies. There's *always* going to be another one coming, isn't there?

-- 

Mike Perkins



More information about the mythtv-users mailing list