NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Forum Issues & Documentation NPVR Documentation v
1 2 3 4 5 Next »
How to create Kodi and NextPVR guides with colour

 
  • 0 Vote(s) - 0 Average
How to create Kodi and NextPVR guides with colour
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,766
Threads: 954
Joined: May 2006
#1
2020-11-20, 10:55 PM
This will be eventually make it to the wiki but I thought I'd start here to flesh out the steps involved in adding colour by genre to the NextPVR web and Kodi EPG.  It should already work by default for DVB OTA and Schedules  Direct guides.

This guide assume you can read English.

1.  Locate the genre mapping table in the Program directory data folder called genre-mapping.xml. 

Backup this file and work on the backup. I will call this the translation file.

2.  Review the file the key values are the Standard DVB mappings at the beginning of the file.  Colours are based on the type="" value. 

3.  Find the genres in your database that you want to map

I suggest using a sqlite tool suggest as sqlite3.  To get this list try this

sqlite3 pathto/npvr.db3
SQLite version 3.28.0 2019-04-16 19:49:53
Enter ".help" for usage hints.
sqlite>.output genres.txt

sqlite>select genres, count(genres) as count from epg_event group by genres order by count desc;
sqlite>.exit

Then you should have a list of all your genres sorted by how often they occur. 

4. Open the genres.txt file (I will call this the genres file) from step 3 and work from the top down, I leave it to you to determine how many you want to change some are pretty esoteric

For this example in the genre file I am using I found this

série d'animation|793

This I quickly match to  "Cartoon/Puppets" in the translation file.  Sometimes when it isn't clear it might help to look into the Schedules Direct mapping ("Animated") in the translation file

Using this inormation copy the existing line

<genre name="Cartoons / Puppets" type="80" subtype="5"/>

to the bottom of the backup of translation file and edit it with the text you want

<genre name="série d'animation" type="80" subtype="5"/>

5.  Move down the genres file and repeat the update for the items you want in step 4

6.  Once you are satisfied with the translation file save it ( you might want to save more often)  Then you can verify the file by opening it in Firefox or chrome to make sure it is valid xml

7.  With admin/sudo right rename your original genre-translations.xml to genre-translations.bak and copy in the translation file (as genre-translations.xml)

8.  Restart the NextPVR server and check the guide in NextPVR web.    This is important if you don't see it you won't see your changes.

9. If it works with the web browser it should work with Kodi.

Martin
Bernard0105
Offline

Junior Member

France
Posts: 35
Threads: 3
Joined: Nov 2020
#2
2020-11-24, 02:49 PM (This post was last modified: 2020-11-25, 05:19 PM by Bernard0105.)
Many thanks Martin, I have started to map my french xmlTV.ch genre to the Kodi type following your guide, and it works well Smile
Perhaps you may add a link to download Sqlite3 tool. Personally i downloaded this one for windows :
https://sqlite.org/2020/sqlite-tools-win...330000.zip

I think this customization will probably not survive to a NextPVR update (to ugrade version ...), isn't-it ?
It could be interesting in the future to have the possibility to locate a user genre mapping customization file in a separate directory than the internal nextPVR one. In that way it will not been replaced when updating nextPVR, exactly like the keymap customization files are working in Kodi.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,766
Threads: 954
Joined: May 2006
#3
2020-11-24, 03:03 PM
Thanks for the feedback

Yes the multi platform nature of NextPVR makes links hard, for linux users like me it is just apt get sqlite3

You are also correct that this won't survive an update and I have already suggested to sub that it should be in the user data directory. The challenge is what if the base changes?

I was going to suggest that once you complete this I could host it on github. I am not sure if sub want to keep a flavour for each EPG source in the base.

Finally I forgot to mention that for the DVB translation if you go to https://github.com/xbmc/translations/tre.../kodi.core and pick your language and navigate down to strings.po search for msgctxt "#19500" you will see the English and native translations for the DVB categories.

ie https://github.com/xbmc/translations/blo...s.po#L8384

Martin
Bernard0105
Offline

Junior Member

France
Posts: 35
Threads: 3
Joined: Nov 2020
#4
2020-11-25, 05:39 PM (This post was last modified: 2020-11-25, 05:57 PM by Bernard0105.)
Hi Martin,

I finished my maping, it took a while........because unfortunately my XMLTV source uses so many text genre variants for the same thing, that is incredible  Huh

Anyway, the result is there, and it is quite good! 
I attached it, so you can save it on github, for latter community usage. Doing that (hard) work, I also searched for the type and subtype code defintion and I found them in the ETSI EN 300 468 standard document. Here is a link to it :
https://www.etsi.org/deliver/etsi_en/300...11601p.pdf
if you do not have it already, it gives that thing better understable.

Using the ETSI doc, I put some comments in the XML mapping file, to get it more understandable. I done it for my xmltv.ch section, but also in the standard DVB section, you can reuse them if you think this is useful.

After that, I tested the NexPVR Guide search feature from the nextPVR webApp using the advanced option. That looks great, but unfortunately, the Genre filter is not working when the custom mapping file is on  Cry

It looks to be a bug, do we continue on this post, to discuss on that Guide Search issue, or perhaps a new Post is better ?

Bernard


Attached Files
.zip   Xmltv.ch-Telerama-French genre-mapping.xml.zip (Size: 3.18 KB / Downloads: 8)
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,766
Threads: 954
Joined: May 2006
#5
2020-11-25, 05:43 PM
Yes you probably didn't need to map all those one-off items. Make sure that attachments are zipped.

Sub can comment on genre filter here since it is maybe a documentation issue.

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#6
2020-11-25, 05:50 PM
(2020-11-25, 05:39 PM)Bernard0105 Wrote: After that, I tested the NexPVR Guide search feature from the nextPVR webApp using the advanced option. That looks great, but unfortunatelly, the Genre filter is not working when the custom mapping file is on  Cry

It looks to be a bug, do we continue on this post, to discuss on that Guide Search issue, or perhaps a new Post is better ?
This search function doesn't know anything about your custom mapping file. That mapping file is only about data passed to Kodi.

I just had a double check of the genre search function here and it seems to be fine from what I can tell. If you want to supply your npvr.db3, and let me know what genre you tried searching for, I'll check it here.
Bernard0105
Offline

Junior Member

France
Posts: 35
Threads: 3
Joined: Nov 2020
#7
2020-11-25, 06:06 PM (This post was last modified: 2020-11-25, 07:07 PM by Bernard0105.)
The genre filter in the search window apparently proposes all genre text found in the EPG, but for a lot of them he found nothing in my case so it is completely useless.

You are right Sub, I rechecked and the Genre filter works well now  Smile  (This morning (in Paris)
 it was not working well, no idea what happens, excepted I continue to edit  the genre maping file)
Now, everything is right, and the "film" genre keyword is especially well working, this is really great ! 
Heart I love nextPVR  Heart

For the future of NextPVR to be able to filter the EPG with some easy "end user" categories such as FILM, SERIES, SPORT, could be a great, great, great  feature that no other PVR competitors have, AFAK.
The restriction with the "genre" filtering is that there are many possibilities with the genre text. As an example "comedy" or "comedie" in french select 3 programs in my current EPG but they are not selected by "film".
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#8
2020-11-25, 06:16 PM
(2020-11-25, 06:06 PM)Bernard0105 Wrote: The genre filter in the search window apparently proposes all genre text found in the EPG, but for a lot of them he found nothing in my case so it is completely useless.
Yes, it's the list of Genres that have been in your EPG. For the mainstream genre you'll most likely find shows. You may have some more obscure genre, which may not currently have shows (but may have a few days ago, and may do next week). How useful the genre is, and how shows have been categorized ultimately comes down to your EPG source.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,766
Threads: 954
Joined: May 2006
#9
2020-11-25, 06:20 PM (This post was last modified: 2020-11-25, 06:22 PM by mvallevand.)
You could have this too if you focused just on type and not sub type.  Since the colour is by type you do have it in a way.  The problem is DVB standards aren't clear on the difference between File and Series (Movie / Drama)


In the jellyfin addon for NextPVR I specifically do allow for general categories but there is work setting it up too.  After experimenting with that I think it is probably better to just group channels rather then shows,  other then making the guide prettier. 

The nice thing about DVB standards is you should get translated genres in Kodi. 

SVP could you edit your file and remove the duplicates from the DVB genres that you also added to the xmltv.ch section.   It might make it confusing.




Martin


Attached Files Thumbnail(s)
   
Bernard0105
Offline

Junior Member

France
Posts: 35
Threads: 3
Joined: Nov 2020
#10
2020-11-25, 06:54 PM
Quote:In the jellyfin addon for NextPVR I specifically do allow for general categories but there is work setting it up too.  After experimenting with that I think it is probably better to just group channels rather then shows,  other then making the guide prettier. 


Do you know about https://www.molotov.tv/ ?
This is french site that propose an aggregation of TV channels and their "catch-up" content. They also innovated in proposing to browse the EPG as if it was a SVOD catalogue, with general categories, and displayed as a wall of posters.
This is really a powerfull way to browse the content of the EPG, and very convenient to select what you want to record.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (3): 1 2 3 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  NextPVR Recurring Scheduling georgewbateman 1 7,261 2012-11-26, 11:03 PM
Last Post: steeb
  New Using NextPVR Search Section georgewbateman 5 4,752 2012-11-14, 12:03 AM
Last Post: steeb
  NextPVR Presence on xbmc wiki steeb 36 19,096 2012-10-27, 03:45 PM
Last Post: Karyudo
  XBMC and NextPVR - A user guide steeb 47 31,923 2012-10-25, 04:19 AM
Last Post: mvallevand
  archiving defunct NextPVR Plugins etc steeb 10 7,606 2012-06-06, 10:21 PM
Last Post: steeb
  NextPVR wiki - remote control topics McBainUK 2 3,649 2012-01-14, 11:50 PM
Last Post: steeb
  NextPVR and Analog cards McBainUK 28 20,797 2011-10-06, 07:36 PM
Last Post: mian
  NextPVR Webpages steeb 21 9,470 2011-08-01, 09:57 AM
Last Post: pz1
  NextPVR Logo Pack steeb 19 12,307 2011-07-16, 10:04 AM
Last Post: martint123
  NextPVR Main Webpages (preview) steeb 20 10,285 2011-02-28, 10:01 AM
Last Post: Lao Pan

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode