Posts: 149
Joined: Jan 2011
Reputation:
1
fnc1
Senior Member
Posts: 149
Looking at the TV database i can see the schema and the Create commands for the TV22.db but where are these defined?
Posts: 149
Joined: Jan 2011
Reputation:
1
fnc1
Senior Member
Posts: 149
I was actually wondering the mechanism which initially creates the databases in that dir? Where is that located.
Posts: 149
Joined: Jan 2011
Reputation:
1
fnc1
Senior Member
Posts: 149
2013-02-25, 21:45
(This post was last modified: 2013-02-25, 21:45 by fnc1.)
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.
Posts: 149
Joined: Jan 2011
Reputation:
1
fnc1
Senior Member
Posts: 149
2013-02-25, 22:52
(This post was last modified: 2013-02-25, 22:54 by fnc1.)
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...
Posts: 20
Joined: Feb 2013
Reputation:
0
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.
Posts: 110
Joined: Nov 2009
(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?
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.
Do you have MySQL setup for Video's and Music? If so, its the exact same.
Code:
<epgdatabase>
<type>mysql</type>
<host>i.p.a.d.d.r.e.s.s</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</epgdatabase>
<tvdatabase>
<type>mysql</type>
<host>i.p.a.d.d.r.e.s.s</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</tvdatabase>
Posts: 983
Joined: Mar 2014
Reputation:
41
What files does the tv22.db contain data for? Is it just PVR related data?