Difference between revisions of "Channel icons"

From MythTV Official Wiki
Jump to: navigation, search
m
Line 54: Line 54:
  
 
from the master_iconmap directory to create a patch for Trac.  See http://svn.mythtv.org/trac/ticket/2365 for an example patch (look at the newest patch on the ticket--the first one was for a very different (and harder to edit) style).
 
from the master_iconmap directory to create a patch for Trac.  See http://svn.mythtv.org/trac/ticket/2365 for an example patch (look at the newest patch on the ticket--the first one was for a very different (and harder to edit) style).
 +
 +
== MythWeb ==
 +
Note that updating icons in mythweb will require you to flush the cache from the mythweb/data/cache/ directory, and possibly the tv_icons as well.
 
[[Category:HOWTO]]
 
[[Category:HOWTO]]

Revision as of 09:41, 12 February 2007

If you would like to ensure that channel icons for your local/subscribed channels are automatically available to anyone (including yourself) configuring a MythTV system, you can help create the "master" (all-inclusive) map of icons to channels.

One of the best sources of channel icons is http://www.lyngsat-logo.com/ . There, you can browse the available icons and choose those appropriate for your system. However, doing so can be a lot of work (requiring many page hits and a lot of time).

An easier approach is to use some new features in the post-0.20-SVN branch of MythTV to quickly look up the information. And, the best part is that you can use this new feature (and help out with the development of MythTV) even if you're not using SVN--there's no need to upgrade any part of your MythTV installation.

First, checkout the appropriate portion of the SVN branch with:

svn co http://svn.mythtv.org/svn/trunk/mythtv/contrib/master_iconmap

Doing so will create a directory called "master_iconmap" underneath the current directory. The master_iconmap directory contains a directory called "lyngsat" which contains a file lyngsat_stations.txt--a plain text listing of /all/ the available icons (small channel icons--listed on the line containing [ls-icon]) and logos (larger channel icons--often "widescreen" versions--listed on the line containing [ls-logo]) at LyngSat.

Open the lyngsat/lyngsat_stations.txt file in one text editor so you can search it for your stations. You'll need to decide whether to use the icons or the logos (I used the logos for my stations).

Then open and edit data/{baseurl,callsigntonetwork,networktourl}.txt in another editor(s).

  • baseurl.txt - shouldn't require any changes
  • callsigntonetwork.txt - create a mapping between a callsign (left column) and a network name (right column); it's /very/ important that you use the callsigns used by your listings provider (i.e. DataDirect) or something appropriate for everyone (if callsigns aren't generally used in your country); see below for information on naming networks
  • networktourl.txt - create a mapping between a network name (left column--use the name you defined in callsigntonetwork.txt) and an icon/logo URL (right column--copied straight out of lyngsat_stations.txt)

When naming networks, please try to use the following convention:

  • Local Affiliates for Major Networks - If the station is a local station, append a dash followed by the station's callsign to the name of the network with which the station is affiliated. For example, WKMG is the callsign of a CBS affiliate, so its network name should be CBS-WKMG.
  • WB, UPN, and MYTV - Stations that were affiliated with the WB and UPN networks are changing networks. Some are becoming affiliates of the new CW network and others of the MyNetworkTV (MyTV) network and some of neither. Note, though, that it's not a simple substitution (some WB networks are becoming CW and others are becoming MyTV and some are going independent, and the same for UPN stations). The best source of information is probably http://www.wikipedia.org/. For affiliates of CW, use "CW-" and for affiliates of MyTV, use "MYTV-".
  • PAX/i: Independent Television Network (ITV) - PAX has renamed it's network in July of 2005 to i: Independent Television or ITV for short(more information - http://en.wikipedia.org/wiki/I_network). ITV has a network of affiliate stations across the US, most of which were formally PAX affiliates. PAX is no longer the correct term and the network should be researched to see if it is now an ITV affiliate. If so, ITV affiliates should use the "ITV-" prefix followed by their callsign. The generic ITV logo can be used as well by simply maping the callsign to ITV. NOTE: This is different than Non-Affiliated networks (often referred to as "independent stations") and mentioned below. Please make sure that non-affiliated stations are not confused for stations that are affiliated with the "i: Independent Television" network.
  • Non-Affiliated Stations (IND) - If the station is not affiliated with a national network (i.e. it's an "independent" channel), append the callsign to "IND-". For example, WSBK decided not to affiliate with the new CW or MyTV networks, but instead became an independent station, so its network name is "IND-WSBK". NOTE: This is different than stations that are part of an actual network called "i: Independent Television". Please make sure that non-affiliated stations are not confused for stations that are affiliated with the "i: Independant Television" network.
  • Use Descriptive Names - If the channel is a cable channel, use a descriptive name for it (i.e. "CARTOONNETWORK" was chosen because it is much more descriptive than "TOON" or "CN").
  • If the above doesn't apply (for non-US stations, for example), choose an appropriate convention and document it here.

Test your changes by running:

./build_map.pl

from the master_iconmap directory to incorporate your changes into the master_iconmap.xml file. Then, as the user who runs the mythfrontend program, run (again, from the master_iconmap directory):

mythfilldatabase --reset-icon-map all

to clear your current channel icons and

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

to import icons using the updated master_iconmap.xml file (which now contains your changes). Mythfilldatabase will download icon files for stations in your channel lineup that have matching callsigns to those now defined in master_iconmap.xml. The icon image files will go into the directory .mythtv/channels located in your current user's home directory. At this point, verify all your channels have icons.

Note that if you check for icons with MythWeb, you'll have to delete MythWeb's icon cache with the following (change path as appropriate) and copy in the updated icons. You may also have to set permissions on the icon files to ensure they are readable by the web server's user account.

rm /var/www/htdocs/mythtv/data/tv_icons/*
cp ~/.mythtv/channels/* /var/www/htdocs/mythtv/data/tv_icons
chmod a+r /var/www/htdocs/mythweb/data/tv_icons/*

Once everything looks good, run

svn diff data > ~/master_iconmap.patch

from the master_iconmap directory to create a patch for Trac. See http://svn.mythtv.org/trac/ticket/2365 for an example patch (look at the newest patch on the ticket--the first one was for a very different (and harder to edit) style).

MythWeb

Note that updating icons in mythweb will require you to flush the cache from the mythweb/data/cache/ directory, and possibly the tv_icons as well.