[mythtv-users] icons

Bill Meek keemllib at gmail.com
Thu Jan 14 02:18:09 UTC 2021


On 1/13/21 7:52 PM, James Linder wrote:
> 
> 
>> On 13 Jan 2021, at 9:24 pm, Steve Goodey <steve at goodey.org> wrote:
>>
>> _____________________________________________
>>>
>>> I've been futzing around with icons recently in the UK.
>>>
>>> Fedora 32 and  MythTV 32 compiled from source.
>>>
>>> I've found that, contrary to what I've read, I've had most success
>>> displaying icons by putting them into /etc/mythtv/channels.
>>>
>>> I discovered this by searching the harddisk for icon files and finding some
>>> in there from one of the many attempts I made to download some.  I've since
>>> added some by hand and, provided there are database entries for them they
>>> appear in the local frontend, mythweb and WebFrontend.  One problem seems
>>> to be that those three expect different shapes and sizes of the icon.
>>>
>>> I found this command helpful:
>>>
>>> http://mythfe0:6544/Guide/GetChannelIcon?ChanId=1331
>>>
>>>  Which tells you if a frontend can find an icon.  For the webpages you also
>>> have to clear the cache to pick up any changes.
>>>
>>> HTH
>>
>> This might help.
>>
>> https://www.mythtv.org/wiki/Channel_icons 
> 
> But I’m confused . .
> 
> http://sandypit:6544/Guide/GetChannelIcon?ChanId=10007
> 
> [Not Found]
> 
> MariaDB [mythconverg]> select chanid, icon, visible from channel;
> +--------+----------------------------+---------+
> | chanid | icon                       | visible |
> +--------+----------------------------+---------+
> |  10007 | 7network_au.png            |       1 |
> . . .
> 
> 
> :6544/# gives me the EPG as it ought
> 
> [sandypit] /home/jam [1003]% mythfrontend --version
> Please attach all output as a file in bug reports.
> MythTV Version : v31.0-85-gd3088629de
> MythTV Branch : fixes/31
> Network Protocol : 91
> Library API : 31.20200101-1
> QT Version : 5.12.7
> 
> ?? James

That's a good start. Follow the path to the channel icons the same way
the backend does (and fails currently).

The backend log will have an entry SIMILAR to this:

  Using configuration directory = /home/mythtv/.mythtv

That should reflect how the backend was started and possibly changed
is MYTHCONFDIR was set (MYTHCONFDIR overrides HOME).

See if the ChannelIcons Storage Group exists and if so where it
points. If it doesn't exist then the directory is automatically
set to ~mythtv/.mythtv/channels. Or some other user's path.

Keep testing using the Services API. When that works, the
rest will.

You can test from the command line and success looks like this:

$ curl <some backend>:6544/Guide/GetChannelIcon?ChanId=10201
Warning: Binary output can mess up your terminal. Use "--output -" to tell
Warning: curl to output it to your terminal anyway, or consider "--output
Warning: <FILE>" to save to a file

A failure (if the file can't be found) looks like this:

$ curl ofc0:6544/Guide/GetChannelIcon?ChanId=10209
<!DOCTYPE html><HTML><HEAD><TITLE>Error 404</TITLE><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"></HEAD><BODY><H1>404
Not Found.</H1></BODY></HTML

If you do: mythbackend --setverbose http you'll turn on additional backend
logging. But in the missing file case, it just tells you what you already
know:

  2021-01-13 19:58:19.690401 I [2026/12069] HttpServer59 servicehost.cpp:284 (ProcessRequest) - ServiceHost::ProcessRequest: GetChannelIcon :
GET /Guide/GetChannelIcon?ChanId=10007 HTTP/1.1

  2021-01-13 19:58:19.691547 I [2026/12069] HttpServer59 httprequest.cpp:891 (FormatFileResponse) - HTTPRequest::FormatFileResponse('') - cannot
find file

-- 
Bill


More information about the mythtv-users mailing list