As digiteng has mentioned. His official release is on post 1.
See first post of how and where to use.
This is just my experiments with his code.
Fully linted the file.
Your code checked for internet connection, but didn't actually stop if no internet.
Your applyskin function is only reading data, so no need to apply attribs. Find source isn't the best way of finding the source component.
Like others have done I have used components.sources libraries to check.
I have wrote in a set of valid images sizes that will be used to download poster based on the user skin width size.
(185, 200, 300, 342, 500)
Size values in skin can now be anything if still 1:1.5 ratio and will pick nearest valid size image to download.
I only create the event name, and serviceref once, then these arguments are passed to all other functions. So no repeating code.
File names of posters are cleaned to prevent illegal characters
I have kept in your big regex replacer, but I don't think its need any more.
TV words are checked before movie words. I found this gave better results overall.
TMBD query string is now wrapped in quotes
If TV or Movie search fails, I try again with Multi search
I ignore any event that has the word "news" in it. Lots of incorrect results otherwise.
Lots of refs have a backdrop artwork and no main poster, I download the backdrop artwwork and squash it up. Better than nothing I suppose.
I have kept your skin sources the same (for backwards compatibility), but eventview and epgselection will only work if the poster is already downloaded as the change function doesn't start downloading for these screens. (That would require some more code). Using source="Event" makes things difficult. :/
There is no autobouquets mass download like other chaps have been doing.
Backup any original posterx.py files if you want to compare with my version
I presume this doesn't work on dreamboxes due to the use of threading.
You could get around that with twisted downloadpage. But as downloadpage is defunct in the latest version of twisted, we are all screwed on working out an alternative universal background downloader.
** I have updated the file as today it seems lots of channels titles are prefixed with "New: ". So fixed that **