- October 8, 2011
- 49
- 52
- Home Country
- Antarctica
I've developed a patch that adds a new property to programs in the TV database, imports it from xmltv, and makes this property available to skins.
Purpose: to store the URL/path of a program image in the TV database, and makes it available for skins in the TV guide, scheduler, and search.
Patch/code: The .diff patch is here http://pastebin.com/aWfSQfkM - The upgrade queries are ALTER TABLE program ADD COLUMN icon VARCHAR(200) NOT NULL DEFAULT ""; ALTER TABLE recording ADD COLUMN icon VARCHAR(200) NOT NULL DEFAULT "";
Patch for TVE3.5: This is untested and doesn't have most of the MP client changes http://pastebin.com/d46BZ87j
Test data: Import xmltv data that has an <icon> on some programs (here's a sample http://pastebin.com/RALw5TgG), edit mytvguide.12Lines.xml (or 9 lines), find texture #TV.Guide.thumb and change it to #TV.Guide.Icon and then view the TV Guide. https://i.imgur.com/1kuAmLY.png
Documentation: A TV program's "Icon" is an optional element in the XMLTV specification in the format of <icon src=""> eg <icon src="https://forum.team-mediaportal.com/MediaPortal-HTPC-Media-Center15b.png"> as specified in the xmltv specification (if missing it'll just be empty, no error). XMLTV data imports this into the database and is then made available to skins as #TV.Guide.Icon, #TV.Scheduled.Icon, and #TV.Search.Icon (for the TV Guide, the list of scheduled programs, and search results respectively).
See https://forum.team-mediaportal.com/threads/allow-skins-to-cache-a-web-image.135894/ for documentation on the texture saving
Would it be possible to have this patch (and database upgrade queries) added to an upcoming MediaPortal update? If not, what can be done to improve it?
Purpose: to store the URL/path of a program image in the TV database, and makes it available for skins in the TV guide, scheduler, and search.
Patch/code: The .diff patch is here http://pastebin.com/aWfSQfkM - The upgrade queries are ALTER TABLE program ADD COLUMN icon VARCHAR(200) NOT NULL DEFAULT ""; ALTER TABLE recording ADD COLUMN icon VARCHAR(200) NOT NULL DEFAULT "";
Patch for TVE3.5: This is untested and doesn't have most of the MP client changes http://pastebin.com/d46BZ87j
Test data: Import xmltv data that has an <icon> on some programs (here's a sample http://pastebin.com/RALw5TgG), edit mytvguide.12Lines.xml (or 9 lines), find texture #TV.Guide.thumb and change it to #TV.Guide.Icon and then view the TV Guide. https://i.imgur.com/1kuAmLY.png
Documentation: A TV program's "Icon" is an optional element in the XMLTV specification in the format of <icon src=""> eg <icon src="https://forum.team-mediaportal.com/MediaPortal-HTPC-Media-Center15b.png"> as specified in the xmltv specification (if missing it'll just be empty, no error). XMLTV data imports this into the database and is then made available to skins as #TV.Guide.Icon, #TV.Scheduled.Icon, and #TV.Search.Icon (for the TV Guide, the list of scheduled programs, and search results respectively).
See https://forum.team-mediaportal.com/threads/allow-skins-to-cache-a-web-image.135894/ for documentation on the texture saving
Would it be possible to have this patch (and database upgrade queries) added to an upcoming MediaPortal update? If not, what can be done to improve it?
Last edited: