Skip to content

Commit

Permalink
Increase size of channel.xmltvid.
Browse files Browse the repository at this point in the history
Some xmltvids are larger than 64 characters, due to strange encodings
used by some listings providers.  Change the xmltvid to be up to 255
characters, which should handle any xmltvid that may ever be created.
Thanks to Karl Dietz for the information on XMLTV design and the
suggestion to use 255 characters.
  • Loading branch information
sphery committed Jan 27, 2011
1 parent b68c614 commit ffbae3f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mythtv/bindings/perl/MythTV.pm
Original file line number Diff line number Diff line change
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 = "1267";
our $SCHEMA_VERSION = "1268";

# 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
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"""

OWN_VERSION = (0,25,-1,1)
SCHEMA_VERSION = 1267
SCHEMA_VERSION = 1268
NVSCHEMA_VERSION = 1007
MUSICSCHEMA_VERSION = 1018
PROTO_VERSION = '64'
Expand Down
12 changes: 11 additions & 1 deletion mythtv/libs/libmythtv/dbcheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ using namespace std;
mythtv/bindings/perl/MythTV.pm
*/
/// This is the DB schema version expected by the running MythTV instance.
const QString currentDatabaseVersion = "1267";
const QString currentDatabaseVersion = "1268";

static bool UpdateDBVersionNumber(const QString &newnumber, QString &dbver);
static bool performActualUpdate(
Expand Down Expand Up @@ -5562,6 +5562,16 @@ NULL
return false;
}

if (dbver == "1267")
{
const char *updates[] = {
"ALTER TABLE channel MODIFY xmltvid VARCHAR(255) NOT NULL DEFAULT '';",
NULL
};
if (!performActualUpdate(updates, "1268", dbver))
return false;
}

return true;
}

Expand Down

0 comments on commit ffbae3f

Please sign in to comment.