Difference between revisions of "Channel icons"

From MythTV Official Wiki
Jump to: navigation, search
(Storage Group)
(Link to the correct ChannelIcons section)
(11 intermediate revisions by 5 users not shown)
Line 7: Line 7:
 
* click on "Icon Download"
 
* click on "Icon Download"
 
* select either "Download all icons.." or "Rescan for missing icons.."
 
* select either "Download all icons.." or "Rescan for missing icons.."
 +
  
 
==Universal Location==
 
==Universal Location==
By default the icon will be downloaded to the '/home/<user>/.mythtv/channels' directory. This is not very friendly when you have multiple frontends and wish them all to share the icons. One method to get around this is to use a symlink for this directory that directs to a network located directory that all your frontends have access to, say '/var/mythtv/channels' for example.
+
Starting with version 0.27, a single location for channel icons can be
 +
created on the master backend. The only symlink required is for ''mythweb''.
 +
Remove it's ''.../data/tv_icons'' directory and link it to the chosen
 +
single directory. Make sure that the directory has read/write permissions for user ''mythtv''
 +
and choose the same group that is used by ''mythweb'', e.g. ''www-data''. Make the
 +
new single location directory's mode 775.
 +
 
 +
Symlinks added for prior versions (or old ''channels''/''ChannelIcons'' directories and
 +
their contents) can be removed. Obviously '''after''' copying icons to a new
 +
directory as required.
 +
 
 +
If a ''ChannelIcons'' Storage Group doesn't already exist, follow the 1st 2 paragraphs
 +
in the [[Channel_icons#Storage_Group_Location|Storage Group Location]] below. Then restart the backend then frontends.
 +
 
 +
Note, the Services API <backend>:6544/Guide/GetChannelIcon endpoint does not work
 +
with this feature. There is a patch for the problem at {{ticket|11865}}.
 +
 
 +
== Pre 0.27 Instructions==
 +
By default the icon will be downloaded to the ''/home/<user>/.mythtv/channels'' directory. This is not very friendly when you have multiple frontends and wish them all to share the icons. One method to get around this is to use a symlink for this directory that directs to a network located directory that all your frontends have access to, say ''/var/mythtv/channels'' for example.
  
 
Before downloading the icons, do the following, or similar as per your distribution:
 
Before downloading the icons, do the following, or similar as per your distribution:
Line 16: Line 35:
 
rm ~/.mythtv/channels -rf
 
rm ~/.mythtv/channels -rf
 
sudo mkdir /var/mythtv/channels
 
sudo mkdir /var/mythtv/channels
sudo chown <user>:<user> /var/mythtv/channels
+
sudo chown <user>:<group> /var/mythtv/channels
 
ln -s /var/mythtv/channels ~/.mythtv/channels
 
ln -s /var/mythtv/channels ~/.mythtv/channels
 
</pre></code>
 
</pre></code>
Line 27: Line 46:
 
for all the users that can run MythTV as well.
 
for all the users that can run MythTV as well.
  
Then download the icons using the steps above. Finally you will need to modify the icon location in the database,
+
==Storage Group Location==
<code><pre>
+
As of 0.25, there is support for using [[Storage Groups]] for access to the icons.
$ mysql -u username -p mythconverg -e "UPDATE channel SET icon = replace(icon, '/home/<user>/.mythtv/channels/', '/var/mythtv/channels/');"
 
</pre></code>
 
  
Anytime you download new icons or update the icons you will need to update the location in the database.
+
To use storage groups for channel icons, you will need to create a new storage group named ''ChannelIcons''.  Move your icons to that location.  You should then go into ''mythtv-setup'' and remove the absolute paths, leaving just the filenames.
  
==Storage Group==
+
It is important to understand that this support is not yet feature complete, as both ''mythfilldatabase'' and ''mythtv-setup'' still download icons to the ''~/.mythtv/channels/'' directory, and attempt to retrieve them from that location, but if you run the applications on the same machine as the storage group is located, you can create a link from ''~/.mythtv/channels/'' to the storage group location as a mitigation.  Also, ''mythweb'' does not use storage groups for accessing the icons.
One not fully implemented Storage Group feature is the ChannelIcons storage group. Using mythtv-setup, create this new group and point it to the location on your master backend where you wish to keep your channel icons.
 
  
mythtv-setup's channel editor does not support this yet though, so you will need to link ~/.mythtv/channels to this location for the user you use to run mythtv-setup on your backend (see above) so that when you download the icons it places them in your storage group location.
+
=Channel Icon Sources=
<code><pre>
+
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).  Once downloaded you should put the resulting JPEG files into ''.mythtv/channels/'' for the user running the front-end.  To add them to a channel you will need to run ''mythtv-setup'' and go to the channel editor and specify the icon file name for each channel.
cd ~/.mythtv
 
ln -s 'storage group locations' channels
 
</pre></code>
 
 
 
You will now also need to remove the directory portion of the icon location in your channel table in the mythconverg database.
 
 
 
<code><pre>
 
$ mysql -u username -p mythconverg -e "UPDATE channel SET icon = replace(icon, '/home/<user>/.mythtv/channels/', '');"
 
</pre></code>
 
 
 
this will let MythTV find the file in the ChannelIcons storagegroup.
 
  
=Channel Icon Sources=
+
Another source of channel icons is http://www.iconharmony.com/ which is targeted for icons for the harmony remoteSome of the available icons are more stylized than the official icon (the person running the site is a graphic artist)As with the previous source, finding an appropriate icon can be a lot of work.
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 systemHowever, doing so can be a lot of work (requiring many page hits and a lot of time).  Once downloaded you should put the resulting JPEG files into .mythtv/channels/ for the user running the front-end.  To add them to a channel you will need to run mythtv-setup and go to the channel editor and specify the icon file name for each channel.
 
  
 
==International Channel Logos==
 
==International Channel Logos==
 
* [https://ash.ms/projects/channels Australia]
 
* [https://ash.ms/projects/channels Australia]
 
* [http://www.documentjes.nl/linux/mythtv/icons/ Netherlands]
 
* [http://www.documentjes.nl/linux/mythtv/icons/ Netherlands]
 +
 +
[[Category:HOWTO]]

Revision as of 16:31, 28 September 2013

Channel Icon Download System

As of 0.21, MythTV includes a channel icon download system in mythtv-setup which will attempt to automatically download icons for channels in your database from services.mythtv.org. If it cannot find an icon it will present you with a list of options, an the ability to define your own search parameters.

To configure icon downloading in mythtv-setup:

  • run "mythtv-setup"
  • select "Channel Editor"
  • click on "Icon Download"
  • select either "Download all icons.." or "Rescan for missing icons.."


Universal Location

Starting with version 0.27, a single location for channel icons can be created on the master backend. The only symlink required is for mythweb. Remove it's .../data/tv_icons directory and link it to the chosen single directory. Make sure that the directory has read/write permissions for user mythtv and choose the same group that is used by mythweb, e.g. www-data. Make the new single location directory's mode 775.

Symlinks added for prior versions (or old channels/ChannelIcons directories and their contents) can be removed. Obviously after copying icons to a new directory as required.

If a ChannelIcons Storage Group doesn't already exist, follow the 1st 2 paragraphs in the Storage Group Location below. Then restart the backend then frontends.

Note, the Services API <backend>:6544/Guide/GetChannelIcon endpoint does not work with this feature. There is a patch for the problem at #11865.

Pre 0.27 Instructions

By default the icon will be downloaded to the /home/<user>/.mythtv/channels directory. This is not very friendly when you have multiple frontends and wish them all to share the icons. One method to get around this is to use a symlink for this directory that directs to a network located directory that all your frontends have access to, say /var/mythtv/channels for example.

Before downloading the icons, do the following, or similar as per your distribution:

rm ~/.mythtv/channels -rf
sudo mkdir /var/mythtv/channels
sudo chown <user>:<group> /var/mythtv/channels
ln -s /var/mythtv/channels ~/.mythtv/channels

You will want to run

rm ~/.mythtv/channels -rf
ln -s /var/mythtv/channels ~/.mythtv/channels

for all the users that can run MythTV as well.

Storage Group Location

As of 0.25, there is support for using Storage Groups for access to the icons.

To use storage groups for channel icons, you will need to create a new storage group named ChannelIcons. Move your icons to that location. You should then go into mythtv-setup and remove the absolute paths, leaving just the filenames.

It is important to understand that this support is not yet feature complete, as both mythfilldatabase and mythtv-setup still download icons to the ~/.mythtv/channels/ directory, and attempt to retrieve them from that location, but if you run the applications on the same machine as the storage group is located, you can create a link from ~/.mythtv/channels/ to the storage group location as a mitigation. Also, mythweb does not use storage groups for accessing the icons.

Channel Icon Sources

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). Once downloaded you should put the resulting JPEG files into .mythtv/channels/ for the user running the front-end. To add them to a channel you will need to run mythtv-setup and go to the channel editor and specify the icon file name for each channel.

Another source of channel icons is http://www.iconharmony.com/ which is targeted for icons for the harmony remote. Some of the available icons are more stylized than the official icon (the person running the site is a graphic artist). As with the previous source, finding an appropriate icon can be a lot of work.

International Channel Logos