Skip to content

Commit

Permalink
DB update for RTP. This adds an iptv_channel table.
Browse files Browse the repository at this point in the history
In the existing IPTV recorder we need to read in a text file on
startup for the RTSP/RTP/UDP urls, this adds a table for those
so we can keep this data in the database. This requires a new
column in channel so we can link to this table. I've also defined
several URL types since an RTP stream require up to three URLs.

I'm adding this now so I can more easily switch between branches
and so others can test the rtp and ceton branches without needing
to manually edit the database.
  • Loading branch information
daniel-kristjansson committed Apr 13, 2012
1 parent bc9e741 commit 0fcf963
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mythtv/bindings/perl/MythTV.pm
Expand Up @@ -114,7 +114,7 @@ package MythTV;
# schema version supported in the main code. We need to check that the schema
# version in the database is as expected by the bindings, which are expected
# to be kept in sync with the main code.
our $SCHEMA_VERSION = "1300";
our $SCHEMA_VERSION = "1301";

# NUMPROGRAMLINES is defined in mythtv/libs/libmythtv/programinfo.h and is
# the number of items in a ProgramInfo QStringList group used by
Expand Down
2 changes: 1 addition & 1 deletion mythtv/bindings/python/MythTV/static.py
Expand Up @@ -5,7 +5,7 @@
"""

OWN_VERSION = (0,25,-1,3)
SCHEMA_VERSION = 1300
SCHEMA_VERSION = 1301
NVSCHEMA_VERSION = 1007
MUSICSCHEMA_VERSION = 1018
PROTO_VERSION = '73'
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythbase/mythversion.h
Expand Up @@ -57,7 +57,7 @@
* mythtv/bindings/php/MythBackend.php
#endif

#define MYTH_DATABASE_VERSION "1300"
#define MYTH_DATABASE_VERSION "1301"


MBASE_PUBLIC const char *GetMythSourceVersion();
Expand Down
22 changes: 22 additions & 0 deletions mythtv/libs/libmythtv/dbcheck.cpp
Expand Up @@ -1960,6 +1960,28 @@ NULL
return false;
}

if (dbver == "1300")
{
const char *updates[] = {
"ALTER TABLE channel ADD COLUMN iptvid SMALLINT(6) UNSIGNED;",
"CREATE TABLE iptv_channel ("
" iptvid SMALLINT(6) UNSIGNED NOT NULL auto_increment,"
" chanid INT(10) UNSIGNED NOT NULL,"
" url TEXT NOT NULL,"
" type set('data', "
" 'rfc2733-1','rfc2733-2', "
" 'rfc5109-1','rfc5109-2', "
" 'smpte2022-1','smpte2022-2'),"
" bitrate INT(10) UNSIGNED NOT NULL,"
" PRIMARY KEY (iptvid)"
") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
NULL
};

if (!performActualUpdate(updates, "1301", dbver))
return false;
}

return true;
}

Expand Down

0 comments on commit 0fcf963

Please sign in to comment.