[mythtv] PATCH Potential DataDirect icon solution

Bruce Markey bjm at lvcm.com
Tue May 25 15:27:52 EDT 2004


[ Isaac and Robert, you may wan to test this patch at this point
to decide if it should go into 0.15 ]

That's what I get for rushing ;-).  I neglected to mention
that my comments were carrying over the thought from the previous
message that this needs simple steps in the howto and should be
easy to answer support question. The closer the procedure gets
to "Run the command './getmyicons'" the better =).

More realistically, I'd like to see a better name for the script,
use default filenames and default args for something like:

$ mkiconmap
$ mythfilldatabase -i -u

or

$ mythfilldatabase -i master_iconmap.xml -u


Anduin Withers wrote:
>>Okay, this is making more sense now. Perhaps the perl script
>>should use better defaults. It seems that a script that does
>>one thing once doesn't need so many args ;-).
> 
> 
> The example I gave uses explicit args where defaults would be ok. For
> example the share directory defaults to /tmp, --out defaults to
> dni_iconmap.xml.

Good, so we don't need to restate the share on the commandline.

>>I now see the names master_iconmap.xml, iconmap.xml, dni_iconmap.xml,
>>and myicons.xml. Maybe we should stick with the first two to
>>avoid confusion for the users?
> 
> 
> master_iconmap.xml - a largely useless file at this point, some day though
> this may be the only file you care about.
> 
> iconmap.xml - default name used by mythfilldatabase
> 
> dni_iconmap.xml - default name used by na_icons_to_icon_map.pl, it is
> deliberately named differently (as are the contents). The dni_ is for Do Not
> Import. It is a few places so that when someone sends something to be added
> to the master list you can easily gauge the effort they used to create their
> map (automatically generated maps are less useful for the master list).
> 
> myicons.xml - Just a name in the example, it has nothing to do with
> anything.

I guess what I'm thinking is there is no point to having a default
name used by mythfilldatabase unless we tell users to use it.
As for "dni_", I see why you chose this. I think what would actually
happen is that if the docs say to use "myicons.xml" most people will
send in a "myicons.xml" file ;-). I think it may be less confusing
to simply say the default name would be "iconmap.xml" and the
"master_iconmap.xml" is special so it won't be overwritten but the
name makes it obvious that it can be specified on the commandline
or copied to the default name.

>>I take it that if someone has not installed XMLTV and does not
>>want to just for this, then they would use just:
> 
> 
> Yes, though currently master_iconmap.xml is only a good master if you have
> the same channels as me. I could make it more useful right now by going and
> mapping variations of the major cable channel variant to the right network
> (now I just map the P flavors).

Right, so this suggests that it might be good for the docs to
suggest where to get the latest master file even if it is a
viewcvs.cgi link to the contrib dir.

>>I assume it would be advisable to rerun these commands after
>>a lineup change to get any incremental changes, yes?
> 
> 
> It depends on the lineup change, if a call sign switches networks... then
> yes, otherwise there is no point (unless zap2it adds more icons for other
> channels in your lineup).

Exactly, I meant to imply a lineup change with new stations added.
The thought wa that the ond xmltv system would grab new icons for
new channels. Here the user should be reminded that they need to
re-run this to get the fresh icons.

>>I finally did see it download new icons into ~/.mythtv/channels/
>>by moving the old directory aside. Even though I now have some
>>new channels, it turns out none of them had icons and so it didn't
>>need to download anything new. Anyway, I can now verify that it
>>does download any new icons that it may need.
> 
> 
> Yes, the idea is to be as nice to zap2it as possible. If you already have
> something which looks like the file we need to fetch then no download is
> done.

Nicely done. My confusion was that I have four or five new
channels but it didn't pull any of the new icons. After I moved
the old directory a got a new pull, it turned out that none of
the new channels had icons anyway and that's why they weren't being
grabbed (duh ;-).


I've attached a rough draft that is too wordy and doesn't mention
anything about getting an updated master file.

--  bjm
-------------- next part --------------
  Grabbing channel icons for DataDirect users.
  ============================================

While the DataDirect TV listings service has several advantages,
it does not support grabbing logo icons for the stations you
receive. However, there are utilities provided that you can run
to grab your initial set of icons and to update when your lineups
change.

First, you need to generate or obtain an XML file with the
information for your stations.

If you have XMLTV software installed, there is a perl script
in MythTV's "./contrib/" directory which will generate this
file for you. Run the command:

  perl na_icons_to_icon_map.pl --grab --out=iconmap.xml

You will be asked for your zipcode and the service that you
use. If there are no errors, the "iconmap.xml" file that you
need for the next step will be created.

If you do not have XMLTV software installed and do not want
to install it for the sake of this minor task, there is a
generic "contrib/master_iconmap.xml" which you can copy and
use but this may not be as complete as using the specific
information for your service.

Next, run the command:

  mythfilldatabase --import-icon-map iconmap.xml --update-icon-map

This will add the icon information to your database. Finally, run
"mythfilldatabase" with no flags to update your listing and to grab
any icons that you do not already have.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: iconpatch3.tar.bz2
Type: application/octet-stream
Size: 8322 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20040525/97bae58f/iconpatch3.tar.obj


More information about the mythtv-dev mailing list