Skip to content

Commit

Permalink
Replace tmdb.py with tmdb3.py
Browse files Browse the repository at this point in the history
This replaces tmdb.py with tmdb3.py as the default grabber for Movie
metadata. It also updates the database schema to force the change for
existing users. The web API tmdb.py uses will be shut down after
2013-09-15, so this is a necessary change for 0.27, and will likely need
to be done for 0.26 once tmdb3.py gets a bit wider testing.
  • Loading branch information
wagnerrp committed Jul 6, 2013
1 parent f47beff commit 9be80b7
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion mythtv/bindings/perl/MythTV.pm
Expand Up @@ -115,7 +115,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 = "1314";
our $SCHEMA_VERSION = "1315";

# 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/dataheap.py
Expand Up @@ -1170,7 +1170,7 @@ class VideoGrabber( Grabber ):
def __init__(self, mode, lang='en', db=None):
dbvalue = {'tv':'TelevisionGrabber', 'movie':'MovieGrabber'}
path = {'tv':'metadata/Television/ttvdb.py',
'movie':'metadata/Movie/tmdb.py'}
'movie':'metadata/Movie/tmdb3.py'}
self.mode = mode.lower()
try:
Grabber.__init__(self, setting=dbvalue[self.mode], db=db,
Expand Down
2 changes: 1 addition & 1 deletion mythtv/bindings/python/MythTV/static.py
Expand Up @@ -5,7 +5,7 @@
"""

OWN_VERSION = (0,27,-1,0)
SCHEMA_VERSION = 1314
SCHEMA_VERSION = 1315
NVSCHEMA_VERSION = 1007
MUSICSCHEMA_VERSION = 1018
PROTO_VERSION = '77'
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythbase/mythversion.h
Expand Up @@ -61,7 +61,7 @@
* mythtv/bindings/php/MythBackend.php
#endif

#define MYTH_DATABASE_VERSION "1314"
#define MYTH_DATABASE_VERSION "1315"


MBASE_PUBLIC const char *GetMythSourceVersion();
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythmetadata/metadatadownload.cpp
Expand Up @@ -278,7 +278,7 @@ MetadataLookupList MetadataDownload::runGrabber(QString cmd, QStringList args,

QString MetadataDownload::GetMovieGrabber()
{
QString def_cmd = "metadata/Movie/tmdb.py";
QString def_cmd = "metadata/Movie/tmdb3.py";
QString db_cmd = gCoreContext->GetSetting("MovieGrabber", def_cmd);

return QDir::cleanPath(QString("%1/%2")
Expand Down
13 changes: 13 additions & 0 deletions mythtv/libs/libmythtv/dbcheck.cpp
Expand Up @@ -2437,6 +2437,19 @@ NULL
return false;
}

if (dbver == "1314")
{
// Migrate users from tmdb.py to tmdb3.py
// The web interface tmdb.py uses will be shut down 2013-09-15
const char *updates[] = {
"UPDATE settings SET data=REPLACE(data, 'tmdb.py', 'tmdb3.py') "
"WHERE value='MovieGrabber'",
NULL
};
if (!performActualUpdate(&updates[0], "1315", dbver))
return false;
}

return true;
}

Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythfrontend/grabbersettings.cpp
Expand Up @@ -227,7 +227,7 @@ void GrabberSettings::Init(void)
QString currentTVGrabber = gCoreContext->GetSetting("TelevisionGrabber",
"metadata/Television/ttvdb.py");
QString currentMovieGrabber = gCoreContext->GetSetting("MovieGrabber",
"metadata/Movie/tmdb.py");
"metadata/Movie/tmdb3.py");
QString currentGameGrabber = gCoreContext->GetSetting("mythgame.MetadataGrabber",
"metadata/Game/giantbomb.py");

Expand Down

0 comments on commit 9be80b7

Please sign in to comment.