![]() |
How / Where in xbmc pvr is the TV database created? - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: PVR & Live TV Support (https://forum.kodi.tv/forumdisplay.php?fid=167) +---- Forum: MythTV (https://forum.kodi.tv/forumdisplay.php?fid=170) +---- Thread: How / Where in xbmc pvr is the TV database created? (/showthread.php?tid=157487) |
How / Where in xbmc pvr is the TV database created? - fnc1 - 2013-02-25 Looking at the TV database i can see the schema and the Create commands for the TV22.db but where are these defined? RE: How / Where in xbmc pvr is the TV database created? - Gibby13 - 2013-02-25 /userdata/Database RE: How / Where in xbmc pvr is the TV database created? - fnc1 - 2013-02-25 I was actually wondering the mechanism which initially creates the databases in that dir? Where is that located. RE: How / Where in xbmc pvr is the TV database created? - fetzerch - 2013-02-25 The class responsible for the TV database is CPVRDatabase: https://github.com/xbmc/xbmc/blob/master/xbmc/pvr/PVRDatabase.cpp It inherits code from CDatabase: https://github.com/xbmc/xbmc/blob/master/xbmc/dbwrappers/Database.cpp Not sure what you are planning to do but the database stuff is handled in xbmc directly, not in a pvr addon. If it's not mythtv related, you most likely get better answers in http://forum.xbmc.org/forumdisplay.php?fid=136 RE: How / Where in xbmc pvr is the TV database created? - fnc1 - 2013-02-25 Thanks, cfetzer - Yeah it's mythtv related. When the database is created there are two columns iChannelNumber and IClientChannelNumber that are set as the type integer while they are pulled from the mythtv database (I'm guessing, based on what I've figured out already) with a type of varchar(10). Because they are assigned as integers the numbering is a little messed up when it comes to sub channels. I have 3x Ch. 8 instead of ch 8.1, 8.2, and 8.3. However in the myth db they are 8_1, 8_2 etc. So I was hoping to test some things out and see if the change from unit to varchar will fix things. Ultimately I was hoping some sort of fix or whatnot could be added as I'm sure this affects others. Also it would be real nice if instead of sqlite3 this could be made MySQL so that all databases could be hosted on a backend/file server somewhere and not just music and videos. Anyhow any input would be greatly appreciated. RE: How / Where in xbmc pvr is the TV database created? - fetzerch - 2013-02-25 1. Yes you're right XBMC currently uses ints for the channel lds. It wouldn't hurt to find out what parts need to be changed to make this work. Basically you have to modify and compile xbmc itself (in the xbmc/pvr/ directory from github.com/xbmc/xbmc ) and the pvr addons (in github.com/opdenkamp/xbmc-pvr-addons ). Generally, patches and fixes can be contributed using github pull requests. But that's something that comes later once you have working patches or want to get some comments from the devs. Also, you can always get quick help on freenode irc (#xbmc or #xbmc-pvr). 2. Using mysql instead of sqlite is already possible. http://wiki.xbmc.org/index.php?title=HOW-TO:Sync_multiple_libraries/Setting_up_XBMC You want to create two xml elements <epgdatabase> and <tvdatabase> in your advancedsettings.xml file. RE: How / Where in xbmc pvr is the TV database created? - fnc1 - 2013-02-25 oh nice must have missed that... #2 that is... oh i guess the tags <epgdatabase> and <tvdatabase> arent on the wikipage guess i figured from that it wasnt possible. Yeah i jumped on #xbmc the other day - didnt know there was a -pvr so that might be usefull.. however im not a programmer... but here's a diff so far: I think that this should just about do it, but im not a coder... diff PVRDatabase.cpp PVRDatabase-var.cpp 83c83 < "iClientChannelNumber integer, " --- > "iClientChannelNumber varchar(10), " 99c99 < // "iClientChannelNumber integer," --- > // "iClientChannelNumber varchar(10)," 123c123 < "iChannelNumber integer" --- > "iChannelNumber varchar(10)" 377c377 < PVRChannelGroupMember newMember = { channel, (unsigned int)m_pDS->fv("iChannelNumber").get_asInt() }; --- > PVRChannelGroupMember newMember = { channel, (unsigned int)m_pDS->fv("iChannelNumber").get_asString() }; 724c724 < int iChannelNumber = m_pDS->fv("iChannelNumber").get_asInt(); --- > int iChannelNumber = m_pDS->fv("iChannelNumber").get_asString(); and not sure what the first int int in this line " int iChannelNumber = m_pDS->fv("iChannelNumber").get_asInt()" here is for, or how that would need to be changed.... along with: the (unsigned int) after the "," after channel (or what the m_pDS->fv does for that matter) PVRChannelGroupMember newMember = { channel, (unsigned int)m_pDS->fv("iChannelNumber").get_asString() }; Also, I have no idea how/if these changes would affect the other PVR's (other than mythtv) Is there a good way to set up a dev environment? like with a VM - any suggestions? Based on whats in the cpp i could probably generate my own DB file, but i may be over my head as far as the coding goes... but i think its a step in the right direction... RE: How / Where in xbmc pvr is the TV database created? - Gibby13 - 2013-02-26 I am trying to get <epgdatabase> and <tvdatabase> in my advanced settings to use MySQL no luck so far, is there are more documentation on this? As far as setting up a dev enviroment, I use the same machine and just compile from nighties into a different directory, stop the stable xbmc and start the one I just compiled. RE: How / Where in xbmc pvr is the TV database created? - fnc1 - 2013-02-26 Based on the input from the guys in xbmc-pvr it looks like making the changes (which would fix the sub-channels) i was thinking would affect other depends... instead they suggested adding another field with the proper type.. which is a little beyond my skill set... so i opened a thread in the PVR Dev (now that i know where the changes would need to be made) and hopefully can get some help with an update to the code, that would fix the subchannel issue. I created the thread as a feature request here, if your curious and want to follow developments or can help with coding: http://forum.xbmc.org/showthread.php?tid=157676 RE: How / Where in xbmc pvr is the TV database created? - User 57826 - 2013-02-27 (2013-02-26, 01:39)Gibby13 Wrote: I am trying to get <epgdatabase> and <tvdatabase> in my advanced settings to use MySQL no luck so far, is there are more documentation on this? Do you have MySQL setup for Video's and Music? If so, its the exact same. Code: <epgdatabase> RE: How / Where in xbmc pvr is the TV database created? - Gibby13 - 2013-02-27 Yep already using DB for videos and music. I was trying to make this to difficult lol. (2013-02-27, 17:48)djroketboy Wrote:(2013-02-26, 01:39)Gibby13 Wrote: I am trying to get <epgdatabase> and <tvdatabase> in my advanced settings to use MySQL no luck so far, is there are more documentation on this? RE: How / Where in xbmc pvr is the TV database created? - flhthemi - 2014-10-13 What files does the tv22.db contain data for? Is it just PVR related data? |