TV Guide Genre Colours (1 Viewer)

Marcusb

Retired Team Member
  • Premium Supporter
  • February 16, 2005
    1,994
    29
    Melbourne
    Excellent FlipGer, this is something I am very interested in too.

    Cheers,

    Marcus.
     

    FlipGer

    Retired Team Member
  • Premium Supporter
  • April 27, 2004
    2,658
    115
    50
    Leipzig, Germany
    Home Country
    Germany Germany
    Hi,

    Ok, i have added the patch on sourceforge

    This is only a small hack to define your own genre colors in the TVGuide. This happens through an externel XML for each skin.

    If no XML is defined, the normal colors will be taken.

    I have added an example GenreColors.xml. This file has to placed in the \skin\<name>\ directory. Eg. \skin\BlueTwo\GenreColors.xml

    Colors can be added by name "Red"
    or by HEX #RRGGBB and #AARRGGBB
    #FF0000 (red)
    #00FF0000 (red with alpha value 0)

    You can define up to 30 colors. The "info"->"count" is optional. It might speed up the process of reading for some milliseconds. ;-)

    There is no real connetion between a genre and the color, this can not be done easily. This is because the genre names are read dynamically by MP out of the tvguide.xml. So the colors are randomly added to genres by MP.

    But hopefully this will help some skinners to make there TVGuides looking even nicer. :)

    Flip.
     

    FlipGer

    Retired Team Member
  • Premium Supporter
  • April 27, 2004
    2,658
    115
    50
    Leipzig, Germany
    Home Country
    Germany Germany
    Hi Taipan,

    i usally take a look into the sourcecode once a day to check if the changes have been implemented. So i will let you know.

    You can see it, if the new file GenreColors.xml will appear in the /skin/<name>/ directory.

    "Unfortunately" some changes have been done to the sourcefiles, so i uploaded a new version today. Hopefully it will find its way into CVS. ;)

    Flip
     

    Frodo

    Retired Team Member
  • Premium Supporter
  • April 22, 2004
    1,517
    121
    54
    The Netherlands
    Home Country
    Netherlands Netherlands
    Sorry but it wont. The patch is not that user friendly
    for example:

    XML :
    - users have to add <color1> to <color30> in the .xml file
    - user have to fill in the count in the .xml file
    Not very userfriendly. Loose the count/numbers pls

    Mapping:
    no mapping is possible between genre name & color. This patch only allows you to assign different colors.
    I would like to have a genre<->color mapping instead

    If you fix these 3 things i'll put it in cvs
     

    FlipGer

    Retired Team Member
  • Premium Supporter
  • April 27, 2004
    2,658
    115
    50
    Leipzig, Germany
    Home Country
    Germany Germany
    Hi frodo,

    frodo said:
    Sorry but it wont. The patch is not that user friendly
    for example:
    XML :
    - users have to add <color1> to <color30> in the .xml file
    - user have to fill in the count in the .xml file
    Not very userfriendly. Loose the count/numbers pls

    Jep, will try to do that.

    frodo said:
    no mapping is possible between genre name & color. This patch only allows you to assign different colors.
    I would like to have a genre<->color mapping instead

    Jep, this is imho the worst thing and i would also like to see that, but this can not be done easliy. MP builds its genres dynamically out of the tvguide.xml. So every user has individual genre types, because of:
    a) different languages
    b) different grabbers

    I for example have nearly 1000 genres! Because i am using the german Clickfinder for my tvguide.xml.

    So, in my eyes there are only two ways to "fix" this:
    1) Let the user assign colors to the genres.
    Result: No influence for the skinners. Need of an additional user interface.
    2) Hardcode say about 30 genres in english language.
    Result: Influence for skinners. No need to import the genres from tvguide.xml anymore. Need of translation in strings.xml.

    So both solutions are not very satisfying and need much code changes. Therefor i only did a fast hack. I would tend to the second one, but that is beyond my freetime... ;)

    I can change the first two points, but the third....

    BTW: Is there an easy way to walk trough an xml with the xmlreader? Something like foreach node? Haven't found it yet. But will search for it.

    Thanks for looking into it anyway! :)

    Flip
     

    James

    Retired Team Member
  • Premium Supporter
  • May 6, 2005
    1,385
    67
    Switzerland
    Hi FilpGer,

    I would say define a number of genre groups or catagories. 30 seems like too many. Too many colours will make a mess of the EPG in my option. I would say limit it to 5 or 10 at the most.

    Then name them in the strings files. Apply colours to them in the skin. For example Movie, News, Sports, ...

    Then have a user configurable system for mapping/translating the EPG genres to these groups.

    So the 1000 genres that you have are most likely Movie/Drama, Movie/Comedy, etc .. these cann all be mapped to Movie.

    The original genre can still be kept, but the mapping would be just for the colour selection.

    /James
     

    LordMessi

    Retired Team Member
  • Premium Supporter
  • July 4, 2005
    449
    0
    46
    Ørsø, Dronninglund, Denmark
    Home Country
    Denmark Denmark
    My suggestion would be a 2 new fields in the genre table:

    MPColor and WebColor
    Both strings

    Then the user could set a genre color to use in MP and one to use on the web (ie. MPW)

    ???
     

    FlipGer

    Retired Team Member
  • Premium Supporter
  • April 27, 2004
    2,658
    115
    50
    Leipzig, Germany
    Home Country
    Germany Germany
    Hi James,

    yes, this was also more or less my idea. Thanks for the hints. :)

    Again, this is much to change, and i dunno if i can find the time...But i will try.

    Flip
     

    Users who are viewing this thread

    Similar threads

    Well, I had already recognized your problem, but I still wanted to point out the basic connections once again. Unfortunately, I don't have a fundamentally different solution for you, but with this approach you should achieve your goal. ;) The idea of first setting the current genre colors with the defines is certainly a good one, as...
    Well, I had already recognized your problem, but I still wanted to point out the basic connections once again. Unfortunately, I...
    Good afternoon, Does anyone know a way of referencing the genre colour of the currently selected item in the TV Guide. We are all...
    Replies
    4
    Views
    2K
    In the UK, the EPG transmitted in the DVB-T datastream allows each programme to have two genres -- a primary genre, and a secondary genre (i.e. a subgenre). The primary genre might be something like Film (or Movie in the USA). The secondary genre for Film might be something like: Action, Comedy, Crime, Fantasy, Romance, Science...
    In the UK, the EPG transmitted in the DVB-T datastream allows each programme to have two genres -- a primary genre, and a secondary...
    In the UK, the EPG transmitted in the DVB-T datastream allows each programme to have two genres -- a primary genre, and a secondary...
    Replies
    0
    Views
    1K
    Actually, you just reminded me of how I have handled this in the past: I merged the contents of an old export.xml with a new one to make a complete file containing the old values I needed and the new values I didn't want to change. Why should it matter if the export file is missing some values? I would expect the import process to...
    Actually, you just reminded me of how I have handled this in the past: I merged the contents of an old export.xml with a new one to...
    My "fresh install" is missing some settings (in particular genre maps) that I would like to import from a previous export. There...
    Replies
    2
    Views
    712
    MP1 MP2 Design questions. DE
    No No
    No No
    Is there an xml display utility that will allow graphically checking of dialog and osd text and graphics element placement? or Is...
    Replies
    1
    Views
    2K
    Nice finding! (y)(y)(y) Adapted to new DWHD and PVHD ;) Position is in front of category bar ;)
    Nice finding! (y)(y)(y) Adapted to new DWHD and PVHD ;) Position is in front of category bar ;)
    This thread is intended for skin authors, plus those advanced users who have learnt skin programming and have customised the skins...
    Replies
    1
    Views
    2K
    Top Bottom