NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support v
« Previous 1 … 16 17 18 19 20 … 43 Next »
Genre Colors

 
  • 0 Vote(s) - 0 Average
Genre Colors
GWCowling323
Offline

Member

Posts: 125
Threads: 27
Joined: Jul 2016
#1
2021-01-21, 12:01 PM
Hopefully this is the last post on this and I will just wait until Sub adds Genre colors selection to Version 5.

I'm attaching my npvr.db3 file and the latest log. 

Is utilization of npver.db3 automatic or does something else need to be set?


Attached Files
.zip   npvr.zip (Size: 134.83 KB / Downloads: 3)
.zip   logs-20210121-0700.zip (Size: 270.17 KB / Downloads: 1)
Graham
Offline

Posting Freak

UK
Posts: 4,058
Threads: 102
Joined: Dec 2005
#2
2021-01-21, 01:00 PM
(2021-01-21, 12:01 PM)GWCowling323 Wrote: Hopefully this is the last post on this and I will just wait until Sub adds Genre colors selection to Version 5.
I'm attaching my npvr.db3 file and the latest log. 
Is utilization of npver.db3 automatic or does something else need to be set?

npvr.log has this ...

Quote:2021-01-20 11:53:45.415 [ERROR][1] Error loading genres: Input string was not in a correct format.

It might be because you have blank values in the EPG_GENRE table.  It might be that you need a word, any word, (but all different words) Iin the ... name ... column in every row and ... 00000000 .... in the ... color ... column where the column is currently blank.  If all that doesn't work ... then ... I don't know ...


Attached Files Thumbnail(s)
   
GWCowling323
Offline

Member

Posts: 125
Threads: 27
Joined: Jul 2016
#3
2021-01-21, 02:53 PM
(2021-01-21, 01:00 PM)Graham Wrote:
(2021-01-21, 12:01 PM)GWCowling323 Wrote: Hopefully this is the last post on this and I will just wait until Sub adds Genre colors selection to Version 5.
I'm attaching my npvr.db3 file and the latest log. 
Is utilization of npver.db3 automatic or does something else need to be set?

npvr.log has this ...

Quote:2021-01-20 11:53:45.415 [ERROR][1] Error loading genres: Input string was not in a correct format.

It might be because you have blank values in the EPG_GENRE table.  It might be that you need a word, any word, (but all different words) Iin the ... name ... column in every row and ... 00000000 .... in the ... color ... column where the column is currently blank.  If all that doesn't work ... then ... I don't know ...
Put names in all the name cells and 000... in all the color cells. Still not working. Tried to find out from Wiki if I have npve.db3 in the right folder but had no luck. What folder should it be in? This will be my last question on this subject. If I've got it in the right place, I'll just wait until Sub gets to my wishlist item.
Graham
Offline

Posting Freak

UK
Posts: 4,058
Threads: 102
Joined: Dec 2005
#4
2021-01-21, 03:05 PM
(2021-01-21, 02:53 PM)GWCowling323 Wrote: Put names in all the name cells and 000... in all the color cells. Still not working. Tried to find out from Wiki if I have npve.db3 in the right folder but had no luck. What folder should it be in? This will be my last question on this subject. If I've got it in the right place, I'll just wait until Sub gets to my wishlist item.

 ... C:\Users\Public\NPVR-data ... https://github.com/sub3/NextPVR/wiki/components
DSperber
Offline

Member

Posts: 134
Threads: 12
Joined: Jan 2020
#5
2021-12-15, 02:23 PM (This post was last modified: 2021-12-15, 02:27 PM by DSperber.)
Discovered this thread with Google search. Saved me lots of trouble.

I, too, just this week had to upgrade from v4 to v5 in order to get support for ATSC 3.0 channels just this past week starting to get rolled out in LA.

I actually wanted to use the "TV Listings" add-on that I had become fond of with v4, but apparently it's not usable with v5. So I at least wanted to get the genre-color customizations that had taken me so much clerical time to implement with the regular TV Guide of v4 brought over somehow into v5 with minimal effort if possible.

The discussion in this and a few other related threads about copying the EPG_GENRE table over from v4 to v5 in the npvr.db3 database hit me in the head! I actually have a very nice free SQLite display/edit tool that I had discovered two years ago when I was working on a project that involved an SQLite version of a table in the mix. I could probably use it to accomplish what needed to be done for migrating EPG_GENRE in this current story.

The product is DB Browser for SQLite.

File -> open database -> navigate to and select the c:\users\public\npvr\npvr.db3 of v4, I clicked on the "browse data" tab of the GUI. Then I expanded the dropdown table list and select the EPG_GENRE table item. This presented the following data.

[Image: Uw0GY1.jpg]

Then File -> Export... -> Table as CSV file... -> to produce the following

[Image: EzTMO4.jpg]

I then pushed SAVE, to trigger the SAVE AS dialog where I navigated to the folder location where I wanted the exported CSV-form of my v4 EPG_GENRE table placed, leaving it named exactly what it was named originally (i.e. EPG-GENRE.CSV). Then "X" out and close.

Then re-launch the SQLite browser, and now open c:\users\public\npvr-data\npvr.db3 which is the v5 database. And again, click on the "browse data" tab and select the EPG_GENRE table, thus revealed in its initial default form (since I'd just installed v5 and had done no customization). It looked like this (in CSV->Excel form, because I exported it in its original untouched form just for a backup):

[Image: P88hlM.jpg]


Then it was File -> Import from CSV file... -> navigate to and select the previously save exported CSV file corresponding to the EPG_GENRE table from v4. This presents an IMPORT CSV file dialog with the values populated from that CSV file.

I assumed that when I pushed the OK button the old original default v5 table would be replaced by the exported CSV customized values from v4. However I got an error message suggesting some kind of unacceptable conflict, and the import was aborted. Looking again at the dialog a bit more I decided to explore the "Advance" button options. And here was the answer. Because the table name already existed, I need to grant permission for the IMPORT to replace the rows of the existing table (i.e. from v5) from the data in the rows of the imported table (i.e. from v4) which of course is exactly what I wanted to do in the first place.

So I just had to check that specific advanced option:

[Image: pUWIWP.jpg]

And sure enough, now when I pushed OK all of the rows in the exported v4 CSV file replaced (and added after the end) the old rows of the original v5 CSV. And the import completed successfully. Then push the "write changes" button to write out the updated npvr.db3 table with the replaced EPG_GENRE table, and I'm done.

And now, sure enough, the TV Guide presentation is colorized exactly the same way I had accomplished using the v4 GUI tools built into the product (which is currently absent in v5).

[Image: OI1jPj.jpg]
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,839
Threads: 954
Joined: May 2006
#6
2021-12-15, 02:38 PM (This post was last modified: 2021-12-15, 02:44 PM by mvallevand.)
It is great that sub kept this functionality

Another option if you don't need to edit the csv file would be to use sqlite3 commands in a command window or via sqlite3

Code:
.open npvr.db3
attach "v4filename" as v4;
delete from epg_genre;
insert into epg_genre select * from v4.epg_genre;

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Kodi Genre map small bug sammy3 8 2,176 2020-04-27, 04:53 PM
Last Post: sub
  Search EPG info by category/genre nhm 6 1,952 2020-02-12, 06:58 PM
Last Post: sub

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

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

Linear Mode
Threaded Mode