Thread Rating:
  • 2 Vote(s) - 5 Average
Beta - TVLogo Downloader
#1
Image

What is it?

TVLogo Downloader is a Kodi program addon (+ context menu addon) to help you find, download and set logos for your TV or Radio stations. It uses http://www.thelogodb.com as the source for logos.

Features
  • Download entire logo packages by country or by package name (cable, satelite, IPTV).
  • Download and choose specific channel logos from a given package.
  • Download and map specific logos to your configured pvr stations.
  • Automatically download and map logos for all your tv stations at once.
  • Download logos for pvr channels from the context menu of the channel list window or tvguide (you need the context menu addon -> https://github.com/enen92/context.tvlogo.downloader). This feature is available only for Kodi versions higher than v15.

How does it work

TVLogo Downloader automatically sets the channel icons folder to the same folder the user defines in the addon settings. It tries to match each channel with the channels (that have logos) on the database. If a match is found, the logo is downloaded and the pvr is "refreshed" so the logos can be shown.
In Kodi 16+ this is achieved by triggering `PVR.SearchMissingChannelIcons`. In Kodi versions lower than v16, the pvr manager is restarted.
To improve the precision of the match the addon checks also if the channel is HD and a logo for the corresponding non-HD channel exists on the database and it checks also for the name of the channel after removing ascii characters. You can define a minimum similarity ratio to assume the channels match. Be aware that using low values for this ratio can cause certain channels to have a bad match, specially those that only differ on a single letter or number.
You can also define a set of words to be ignored/replaced from your channel names when performing queries to the database.

Showcase





Download

script.tvlogo.downloader: https://github.com/enen92/script.tvlogo....0.0.11beta

context.tvlogo.downloader: https://github.com/enen92/context.tvlogo...0.0.5-beta

License

GNU GENERAL PUBLIC LICENSE. Version 2, June 1991

Acknowledgments
To Zag for the wonderful work on thelogodb.com and continuous support.
To xhaggi for the help on the pull request.

Donate

Thelogodb has costs. To assure the future of the site please donate to thelogodb.com:

[Image: paypal.png]
Reply
#2
Please help by reporting bugs or sending pull requests. Please attach a debug log in case of a script error.
Reply
#3
Great work!
Image Lunatixz  Kodi / Beta repository • Twitter
Image PseudoTV • Forum • Website
 
Reply
#4
Wow - can't wait to try this later. Looks like great work.
Reply
#5
amazeballs!!
[Image: all-clearlogo.jpg]
Reply
#6
Perfect thank you. Unfortunately no logos for my region per Thelogodb Sad
Reply
#7
For my region too...
Reply
#8
@Leo2807 and @iRubin you know that you can add them yourself to the dB. Fyi
first_time_user (wiki) | free content (wiki) | forum rules (wiki) | PVR (wiki) | Debug Log (wiki)

IMPORTANT:
The official Kodi version does not contain any content what so ever. This means that you should provide your own content from a local or remote storage location, DVD, Blu-Ray or any other media carrier that you own. Additionally Kodi allows you to install third-party plugins that may provide access to content that is freely available on the official content provider website. The watching or listening of illegal or pirated content which would otherwise need to be paid for is not endorsed or approved by Team Kodi.
Reply
#9
Upload them Smile
Reply
#10
New version here with some reported bugs fixed: https://github.com/enen92/script.tvlogo....-0.0.6.zip
Reply
#11
New beta version here (0.0.11) which adds new features and fixes some reported bugs:

https://github.com/enen92/script.tvlogo....0.0.11beta

-Resize option using python pil (this is usefull if you don't have a powerfull device such as the raspbery pi 1. You can now resize the logos on a specific % just after downloading them).
-Support for formatted labels (colours, italic, bold) - Please read below
-Test HD version if HQ on the channel label
-Regular expression substitution
-Bug fixes

Some people apparently like to have colours and other formatting stuff on their channel labels. To make that kind of labels to work when querying the database, the plain-text label should be passed to the database. This means that if you have a bold yellow label, the label kodi stores is:

Code:
[B][COLOR yellow]ITV[/COLOR][/B]

For the addon to match the channel on the database, we just need to pass "itv" to thelogodb. So, to accomplish this there is an option on the addon settings to automatically replace any string or regular expression from the channel label before querying the db. Those strings are separated by commas (,). This means that, for the example above to work, you need to add the following string to the addon settings:

Code:
[COLOR (.+?)],[/COLOR],[B],[/B]

Image

Then the resulting label after replacement will be correctly detected.

Image

Note the code is now pretty stable and, if no issues are reported, I'll just apply the translations and send it over to the official repository. You'll have still a few days to test and report bugs. Once the addon is submitted don't count with too many regular updates or bug fixes. So, your fault not mine.

Also for anyone interested in the way this addon (and kodi itself works for logos) I just made some improvements to that section of kodi wiki: http://kodi.wiki/view/Settings/Live_TV#Menu.2FOSD

Cheers
Reply
#12
Hi enen92,

I'm glad someone has taken the initiative to develop an addon for logo downloads and set up a website, much appreciated Smile. I've downloaded 0.0.11 beta of the script and selected 'Automatic (only user channels without logos)'. After a brief hang, I get an error. Here's the log:

PHP Code:
15:51:34 T:1776878640  NOTICE: -->Python Interpreter Initialized<--
15:51:34 T:1776878640  NOTICE: [Tvlogo DownloaderMain menu
15
:51:34 T:1558731936 WARNINGTrying to add unsupported control type 1
15
:52:05 T:1776878640   ERROREXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - 
NOTEIGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            
Error Type: <type 'exceptions.UnicodeEncodeError'>
                                            
Error Contents'ascii' codec can't encode character u'\xf1' in position 38: ordinal not in range(128)
                                            Traceback (most recent call last):
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.tvlogo.downloader/default.py", line 49, in <module>
                                                tvlogodownloader.main_menu()
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.tvlogo.downloader/resources/lib/tvlogodownloader.py", line 37, in main_menu
                                                automaticd.automatic_downloader('
missing')
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.tvlogo.downloader/resources/lib/automaticd.py", line 88, in automatic_downloader
                                                if channel["label"] not in ch_names and channel['
thumbnail'].replace('image://','') != (logo_folder + channel["label"].replace(' ','%20')+'.png').replace('/','%2f') + '/' and not os.path.exists(logofile):
                                              
File "/home/jenkins/workspace/Android-ARM/tools/depends/xbmc-depends/arm-linux-androideabi-android-17/lib/python2.6/genericpath.py"line 18in exists
                                            UnicodeEncodeError
'ascii' codec can't encode character u'\xf1' in position 38: ordinal not in range(128)
                                            -->End of Python script error report<-- 

I already have channel logos on my device, but I wanted the script to find the channels that have missing logos and download them. The channel logos is set via Kodi's Settings> TV> Menu/OSD> Folder with channel icons and not through the PVR client I am using.

Running: Kodi 15 on Amazon Fire TV (Android ARM).

Hope that helps Wink


EDIT: Also, I've noticed that the "Download logo" option appears twice in the context menu (both are working however).
Reply
#13
Yeah, I noticed the bug yesterday on my raspberry pi, it looks like some module is different in arm (maybe os module giving encoding problems). I'm trying to fix it now to be honest. Can you activate the webserver on settings -> services -> webserver and open this url:

Quote:http://webserver_IP:webserver_PORT/jsonrpc?request={"jsonrpc":"2.0","method":"PVR.GetChannels","params":{"channelgroupid":"alltv"},"id":2}

Then pm me a pastebin of the result or just post it here. It would be nice since that way I can "inject" your channel labels into the addon and try to find out exactly what is failing

Thanks for reporting,

cheers

PS: Replace webserver_IP and webserver_Port with the ip and port of kodi webserver
Reply
#14
(2015-08-04, 17:09)enen92 Wrote: Yeah, I noticed the bug yesterday on my raspberry pi, it looks like some module is different in arm (maybe os module giving encoding problems). I'm trying to fix it now to be honest. Can you activate the webserver on settings -> services -> webserver and open this url:

Quote:http://webserver_IP:webserver_PORT/jsonrpc?request={"jsonrpc":"2.0","method":"PVR.GetChannels","params":{"channelgroupid":"alltv"},"id":2}

Then pm me a pastebin of the result or just post it here. It would be nice since that way I can "inject" your channel labels into the addon and try to find out exactly what is failing

Thanks for reporting,

cheers

PS: Replace webserver_IP and webserver_Port with the ip and port of kodi webserver

Sure, stay put, I'll post the results in a moment. Bear with me...

EDIT: where do you want me to open the URL, can I open the url on my PC? And I'm guessing the webserver IP is the IP of my Fire TV?

Thanks.

EDIT 2: Don't worry, here's the results: http://pastebin.com/eu9hfXWj
Reply
#15
That's great thanks. After I trace the bug in my PI I'll try to run your data instead of mine (y)
Reply
 
Thread Rating:
  • 2 Vote(s) - 5 Average



Logout Mark Read Team Forum Stats Members Help
TVLogo Downloader52