[mythtvnz] KM R5E50 out, and MythMusic problems
Steve Hodge
mythtvnz@lists.linuxnut.co.nz
Wed, 10 Jan 2007 10:58:21 +1300
------=_Part_60179_12409506.1168379901126
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
On 1/10/07, Steve Hodge <stevehodge@gmail.com> wrote:
>
> On 1/10/07, AlanP <alan.p@orcon.net.nz> wrote:
> >
> > At 06:57 p.m. 9/01/2007, you wrote:
> > >Mine is 1160, running KnoppMyth R5E50. Are there any docs detailing the
> > DB
> > >schema so I can create these tables or something?
> >
> > According to the docs, there is a " mc.sql" that, naturally, my copy of
> > KnoppMyth doesn't have. Do you have a copy of this file, Steve?
> >
>
> Yes. It only creates the database itself though, it doesn't contain the
> schema. You can see it at
> http://svn.mythtv.org/trac/browser/branches/release-0-20-fixes/mythtv/database/mc.sql
> .
>
Here are the music_ tables in my db:
CREATE TABLE `music_albums` (
`album_id` int(11) unsigned NOT NULL auto_increment,
`artist_id` int(11) unsigned NOT NULL default '0',
`album_name` varchar(255) NOT NULL default '',
`year` smallint(6) NOT NULL default '0',
`compilation` tinyint(1) unsigned NOT NULL default '0',
PRIMARY KEY (`album_id`),
KEY `idx_album_name` (`album_name`)
) TYPE=MyISAM
CREATE TABLE `music_artists` (
`artist_id` int(11) unsigned NOT NULL auto_increment,
`artist_name` varchar(255) NOT NULL default '',
PRIMARY KEY (`artist_id`),
KEY `idx_artist_name` (`artist_name`)
) TYPE=MyISAM
CREATE TABLE `music_genres` (
`genre_id` int(11) unsigned NOT NULL auto_increment,
`genre` varchar(25) NOT NULL default '',
PRIMARY KEY (`genre_id`),
KEY `idx_genre` (`genre`)
) TYPE=MyISAM
CREATE TABLE `music_playlists` (
`playlist_id` int(11) unsigned NOT NULL auto_increment,
`playlist_name` varchar(255) NOT NULL default '',
`playlist_songs` text NOT NULL,
`last_accessed` timestamp(14) NOT NULL,
`length` int(11) unsigned NOT NULL default '0',
`songcount` smallint(8) unsigned NOT NULL default '0',
`hostname` varchar(255) NOT NULL default '',
PRIMARY KEY (`playlist_id`)
) TYPE=MyISAM
CREATE TABLE `music_smartplaylist_categories` (
`categoryid` int(10) unsigned NOT NULL
auto_increment,
`name` varchar(128) NOT NULL default
'',
PRIMARY KEY
(`categoryid`),
KEY `name`
(`name`)
) TYPE=MyISAM
CREATE TABLE `music_smartplaylist_items` (
`smartplaylistitemid` int(10) unsigned NOT NULL
auto_increment,
`smartplaylistid` int(10) unsigned NOT NULL
default '0',
`field` varchar(50) NOT NULL default
'',
`operator` varchar(20) NOT NULL default
'',
`value1` varchar(255) NOT NULL default
'',
`value2` varchar(255) NOT NULL default
'',
PRIMARY KEY
(`smartplaylistitemid`),
KEY `smartplaylistid`
(`smartplaylistid`)
) TYPE=MyISAM
CREATE TABLE `music_smartplaylists` (
`smartplaylistid` int(10) unsigned NOT NULL
auto_increment,
`name` varchar(128) NOT NULL default
'',
`categoryid` int(10) unsigned NOT NULL default
'0',
`matchtype` set('All','Any') NOT NULL default
'All',
`orderby` varchar(128) NOT NULL default
'',
`limitto` int(10) unsigned NOT NULL default
'0',
PRIMARY KEY
(`smartplaylistid`),
KEY `name`
(`name`),
KEY `categoryid`
(`categoryid`)
) TYPE=MyISAM
CREATE TABLE `music_songs` (
`song_id` int(11) unsigned NOT NULL auto_increment,
`filename` text NOT NULL,
`name` varchar(255) NOT NULL default '',
`track` smallint(6) unsigned NOT NULL default '0',
`artist_id` int(11) unsigned NOT NULL default '0',
`album_id` int(11) unsigned NOT NULL default '0',
`genre_id` int(11) unsigned NOT NULL default '0',
`year` smallint(6) NOT NULL default '0',
`length` int(11) unsigned NOT NULL default '0',
`numplays` int(11) unsigned NOT NULL default '0',
`rating` tinyint(4) unsigned NOT NULL default '0',
`lastplay` timestamp(14) NOT NULL,
`date_entered` datetime default NULL,
`date_modified` datetime default NULL,
`format` varchar(4) NOT NULL default '0',
`mythdigest` varchar(255) default NULL,
`size` bigint(20) unsigned default NULL,
`description` varchar(255) default NULL,
`comment` varchar(255) default NULL,
`disc_count` smallint(5) unsigned default '0',
`disc_number` smallint(5) unsigned default '0',
`track_count` smallint(5) unsigned default '0',
`start_time` int(10) unsigned default '0',
`stop_time` int(10) unsigned default NULL,
`eq_preset` varchar(255) default NULL,
`relative_volume` tinyint(4) default '0',
`sample_rate` int(10) unsigned default '0',
`bitrate` int(10) unsigned default '0',
`bpm` smallint(5) unsigned default NULL,
PRIMARY KEY (`song_id`),
KEY `idx_name` (`name`),
KEY `idx_mythdigest` (`mythdigest`)
) TYPE=MyISAM
CREATE TABLE `music_stats` (
`num_artists` smallint(5) unsigned NOT NULL default '0',
`num_albums` smallint(5) unsigned NOT NULL default '0',
`num_songs` mediumint(8) unsigned NOT NULL default '0',
`num_genres` tinyint(3) unsigned NOT NULL default '0',
`total_time` varchar(12) NOT NULL default '0',
`total_size` varchar(10) NOT NULL default '0'
) TYPE=MyISAM
Cheers,
Steve
------=_Part_60179_12409506.1168379901126
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
On 1/10/07, <b class=3D"gmail_sendername">Steve Hodge</b> <<a href=3D"ma=
ilto:stevehodge@gmail.com">stevehodge@gmail.com</a>> wrote:<div><span cl=
ass=3D"gmail_quote"></span><blockquote class=3D"gmail_quote" style=3D"borde=
r-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-le=
ft: 1ex;">
<span class=3D"q">On 1/10/07, <b class=3D"gmail_sendername">AlanP</b> <<=
a href=3D"mailto:alan.p@orcon.net.nz" target=3D"_blank" onclick=3D"return t=
op.js.OpenExtLink(window,event,this)">alan.p@orcon.net.nz</a>> wrote:<di=
v><span class=3D"gmail_quote">
</span><blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rg=
b(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
At 06:57 p.m. 9/01/2007, you wrote:<br>>Mine is 1160, running KnoppMyth =
R5E50. Are there any docs detailing the DB<br>>schema so I can create th=
ese tables or something?<br><br>According to the docs, there is a "
mc.sql" that, naturally, my copy of<br>KnoppMyth doesn't have. Do =
you have a copy of this file, Steve?<br></blockquote></div><br></span>Yes. =
It only creates the database itself though, it doesn't contain the sche=
ma. You can see it at=20
<a href=3D"http://svn.mythtv.org/trac/browser/branches/release-0-20-fixes/m=
ythtv/database/mc.sql" target=3D"_blank" onclick=3D"return top.js.OpenExtLi=
nk(window,event,this)">http://svn.mythtv.org/trac/browser/branches/release-=
0-20-fixes/mythtv/database/mc.sql
</a>.<br></blockquote></div><br>Here are the music_ tables in my db:<br>CRE=
ATE TABLE `music_albums` ( &=
nbsp; &nbs=
p; <br> &n=
bsp; `alb=
um_id` int(11) unsigned NOT NULL auto_increment, <b=
r> &=
nbsp; `artist_id` int(11) unsigned NOT NULL default '0'=
, =20
<br>  =
; `album_name` varchar(255) NOT NULL default '',&=
nbsp; <br>  =
; &n=
bsp; `year` smallint(6) NOT NULL default '0', &nbs=
p; =
<br>  =
; `compilation` tinyint(1) unsigned NOT NULL default '=
;0', =20
<br>  =
; PRIMARY KEY (`album_id`), =
&nb=
sp; =
<br> &nbs=
p; KEY `idx_album_name` (`album_name`) &=
nbsp; &nbs=
p; <br> &n=
bsp; ) TYPE=3DMyISAM<br><br><br>C=
REATE TABLE `music_artists` ( &nbs=
p; &=
nbsp;
<br>  =
; `artist_id` int(11) unsigned NOT NULL auto_increm=
ent, <br> =
`artist_name` varchar(255) NOT NULL de=
fault '', <br>  =
; &n=
bsp; PRIMARY KEY (`artist_id`), &n=
bsp;  =
;
<br>  =
; KEY `idx_artist_name` (`artist_name`) =
&nb=
sp; <br> &=
nbsp; ) TYPE=3DMyISAM<br><br>CREATE TABLE `music_ge=
nres` ( &n=
bsp;  =
; <br> &nb=
sp; `genre_id` int(11) unsigned NOT NULL auto=
_increment, =20
<br>  =
; `genre` varchar(25) NOT NULL default '', &=
nbsp; <br=
> &n=
bsp; PRIMARY KEY (`genre_id`), &nb=
sp; =
<br> &nbs=
p; &=
nbsp; KEY `idx_genre` (`genre`) &n=
bsp;  =
; =20
<br>  =
; ) TYPE=3DMyISAM<br><br>CREATE TABLE `music_playlists` ( =
&nb=
sp; <br>&=
nbsp; &nbs=
p; `playlist_id` int(11) unsigned NOT NULL au=
to_increment, <br> &nb=
sp; `playlist_name` v=
archar(255) NOT NULL default '',  =
; =20
<br>  =
; `playlist_songs` text NOT NULL, =
&nb=
sp; <br>&=
nbsp; &nbs=
p; `last_accessed` timestamp(14) NOT NULL,&nb=
sp; =
<br> &nbs=
p; `length` int=
(11) unsigned NOT NULL default '0', &n=
bsp; =20
<br>  =
; `songcount` smallint(8) unsigned NOT =
NULL default '0', <br> &nb=
sp; =
`hostname` varchar(255) NOT NULL default '', &nbs=
p; <br> &n=
bsp;  =
; PRIMARY KEY (`playlist_id`) &nbs=
p; &=
nbsp; =20
<br>  =
; ) TYPE=3DMyISAM<br><br>CREATE TABLE `music_smartp=
laylist_categories` ( =
<br> &nbs=
p; &=
nbsp; `categoryid` in=
t(10) unsigned NOT NULL auto_increment, <br> &=
nbsp; &nbs=
p; &=
nbsp; `name` varchar(128) NOT NULL default '',&nb=
sp; =
=20
<br>  =
; &n=
bsp; PRIMARY KEY (`ca=
tegoryid`), &nbs=
p; &=
nbsp; <br>  =
; &n=
bsp;  =
; KEY `name` (`name`) =
&nb=
sp; =
<br> &nbs=
p; &=
nbsp; ) TYPE=3DMyISAM
<br><br>CREATE TABLE `music_smartplaylist_items` ( &=
nbsp; &nbs=
p; <br> &n=
bsp;  =
; `smartp=
laylistitemid` int(10) unsigned NOT NULL auto_increment, <br> &n=
bsp;  =
; &n=
bsp; `smartplaylistid` int(10) unsigned NOT NULL default '0',=
=20
<br>  =
; &n=
bsp; `field` varchar(50) NOT NULL default '',&nbs=
p; &=
nbsp; <br> =
; &n=
bsp;  =
; `operator` varchar(20) NOT NULL default '', &nbs=
p; &=
nbsp; <br>  =
; &n=
bsp; `value1` v=
archar(255) NOT NULL default '',  =
; &n=
bsp; =20
<br>  =
; &n=
bsp; `value2` varchar(255) NOT NULL default '',&n=
bsp;  =
; <br> &nb=
sp; =
&nb=
sp; PRIMARY KEY (`smartplaylistitemid`),  =
; &n=
bsp; <br> =
&nb=
sp; =
KEY `smartplaylistid` (`smartplaylistid`) &nb=
sp; =
=20
<br>  =
; &n=
bsp; ) TYPE=3DMyISAM<br><br>CREATE TABLE `music_smartplaylists` (&nbs=
p; &=
nbsp; <br=
> &n=
bsp; `smartplay=
listid` int(10) unsigned NOT NULL auto_increment, <br> &nb=
sp; =
`name` varchar(128) NOT NU=
LL default '',  =
; =20
<br>  =
; `catego=
ryid` int(10) unsigned NOT NULL default '0',  =
; <br> &nb=
sp; =
`matchtype` set('All','Any') NOT N=
ULL default 'All', =
<br>  =
; `orderb=
y` varchar(128) NOT NULL default '', &=
nbsp; =20
<br>  =
; `limitt=
o` int(10) unsigned NOT NULL default '0', &n=
bsp; <br> =
&nb=
sp; PRIMARY KEY (`smartplaylistid=
`), =
&nb=
sp; <br> &=
nbsp; &nbs=
p; KEY `name` (`name`), &nbs=
p; &=
nbsp; &nbs=
p; =20
<br>  =
; KEY `ca=
tegoryid` (`categoryid`) &nb=
sp; =
<br> &nbs=
p; &=
nbsp; ) TYPE=3DMyISAM<br><br>CREATE TABLE `music_so=
ngs` ( &nb=
sp; =
<br> &nbs=
p; `song_id` int(11) unsigned NOT NULL auto_increme=
nt, =20
<br>  =
; `filename` text NOT NULL, =
&nb=
sp; <br> &=
nbsp; `name` va=
rchar(255) NOT NULL default '', =
<br> &nbs=
p; `track` smallint(6) unsi=
gned NOT NULL default '0', =20
<br>  =
; `artist_id` int(11) unsigned NOT NULL default '0',&nb=
sp; <br> &=
nbsp; `album_id` int(11) unsigned NOT NULL default '0=
', <br> &nbs=
p; `genre_id` int(11) unsigned NOT NULL=
default '0', =20
<br>  =
; `year` smallint(6) NOT NULL default '0', &=
nbsp; <br>  =
; `=
length` int(11) unsigned NOT NULL default '0', &nb=
sp; <br> &=
nbsp; `numplays` int(11) unsigned NOT NULL default '0=
', =20
<br>  =
; `rating` tinyint(4) unsigned NOT NULL default '0',&nb=
sp; <br> &=
nbsp; `lastplay` timestamp(14) NOT NULL,  =
; &n=
bsp; <br> =
`date_entered` datetime default NULL, &=
nbsp; &nbs=
p; =20
<br>  =
; `date_modified` datetime default NULL,  =
; <br> &nb=
sp; =
`format` varchar(4) NOT NULL default '0', &=
nbsp; <br>  =
; `mythdigest` varcha=
r(255) default NULL, &=
nbsp; =20
<br>  =
; `size` bigint(20) unsigned default NULL, &nb=
sp; <br> &=
nbsp; `descript=
ion` varchar(255) default NULL, &n=
bsp; <br> =
`comment` varchar(255) default N=
ULL,  =
; <br> &nb=
sp; `disc_count` smallint(5) unsigned d=
efault '0', =20
<br>  =
; `disc_number` smallint(5) unsigned default '0', =
<br> &nbs=
p; `track_count` smallint(5) unsigned d=
efault '0', <br> &nb=
sp; `start_time=
` int(10) unsigned default '0', =
=20
<br>  =
; `stop_time` int(10) unsigned default NULL, &=
nbsp; <br>  =
; `eq_preset` varchar=
(255) default NULL, &n=
bsp; <br> =
`relative_volume` tinyint(4) def=
ault '0', &nbs=
p; =20
<br>  =
; `sample_rate` int(10) unsigned default '0', &nbs=
p; <br> &n=
bsp; `bitrate` int(10=
) unsigned default '0', &n=
bsp; <br> =
`bpm` smallint(5) unsigned=
default NULL, &=
nbsp; =20
<br>  =
; PRIMARY KEY (`song_id`), &=
nbsp; &nbs=
p; <br> &n=
bsp; KEY =
`idx_name` (`name`), &=
nbsp; &nbs=
p; <br> &n=
bsp; KEY `idx_mythdigest` (=
`mythdigest`) &n=
bsp; <br> =
) TYPE=3DMyISAM
<br><br>CREATE TABLE `music_stats` ( &nb=
sp; =
<b=
r> &=
nbsp; `num_artists` smallint(5) unsigned NOT NULL default '0'=
, <br> &nb=
sp; `num_albums` smallint(5) unsigned NOT NULL default &#=
39;0', =20
<br>  =
; `num_songs` mediumint(8) unsigned NOT NULL default '0'=
;, <br> &n=
bsp; `num_genres` tinyint(3) unsigned NOT NULL defa=
ult '0', <br> =
`total_time` varchar(12) N=
OT NULL default '0',  =
; =20
<br>  =
; `total_size` varchar(10) NOT NULL default '0' &n=
bsp; <br> =
) TYPE=
=3DMyISAM<br><br>Cheers,<br>Steve<br>
------=_Part_60179_12409506.1168379901126--