mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-08 11:03:38 +00:00
Add show overview from indexers to the database
This commit is contained in:
parent
c1fe671a82
commit
94d0ce3e44
4 changed files with 21 additions and 3 deletions
|
@ -74,6 +74,7 @@
|
||||||
* Add option to collapse seasons and leave current season open on displayShow (disabled)
|
* Add option to collapse seasons and leave current season open on displayShow (disabled)
|
||||||
* Add filesize to episode location qtip on displayShow
|
* Add filesize to episode location qtip on displayShow
|
||||||
* Change selected options from editShow will only show when enabled now on displayShow
|
* Change selected options from editShow will only show when enabled now on displayShow
|
||||||
|
* Add show overview from indexers to the database
|
||||||
|
|
||||||
[develop changelog]
|
[develop changelog]
|
||||||
* Fix traceback error when using the menu item Manage/Update Kodi
|
* Fix traceback error when using the menu item Manage/Update Kodi
|
||||||
|
|
|
@ -27,7 +27,7 @@ from sickbeard import encodingKludge as ek
|
||||||
from sickbeard.name_parser.parser import NameParser, InvalidNameException, InvalidShowException
|
from sickbeard.name_parser.parser import NameParser, InvalidNameException, InvalidShowException
|
||||||
|
|
||||||
MIN_DB_VERSION = 9 # oldest db version we support migrating from
|
MIN_DB_VERSION = 9 # oldest db version we support migrating from
|
||||||
MAX_DB_VERSION = 20001
|
MAX_DB_VERSION = 20002
|
||||||
|
|
||||||
|
|
||||||
class MainSanityCheck(db.DBSanityCheck):
|
class MainSanityCheck(db.DBSanityCheck):
|
||||||
|
@ -960,6 +960,16 @@ class DBIncreaseTo20001(db.SchemaUpgrade):
|
||||||
return self.checkDBVersion()
|
return self.checkDBVersion()
|
||||||
|
|
||||||
|
|
||||||
|
class AddTvShowOverview(db.SchemaUpgrade):
|
||||||
|
def execute(self):
|
||||||
|
backup_database(self.checkDBVersion())
|
||||||
|
|
||||||
|
logger.log(u'Adding column overview to tv_shows')
|
||||||
|
self.addColumn('tv_shows', 'overview', 'TEXT', '')
|
||||||
|
|
||||||
|
self.setDBVersion(20002)
|
||||||
|
return self.checkDBVersion()
|
||||||
|
|
||||||
# 10001 -> 10000
|
# 10001 -> 10000
|
||||||
class RemoveDefaultEpStatusFromTvShows(db.SchemaUpgrade):
|
class RemoveDefaultEpStatusFromTvShows(db.SchemaUpgrade):
|
||||||
def execute(self):
|
def execute(self):
|
||||||
|
|
|
@ -412,7 +412,7 @@ def MigrationCode(myDB):
|
||||||
10001: sickbeard.mainDB.RemoveDefaultEpStatusFromTvShows,
|
10001: sickbeard.mainDB.RemoveDefaultEpStatusFromTvShows,
|
||||||
|
|
||||||
20000: sickbeard.mainDB.DBIncreaseTo20001,
|
20000: sickbeard.mainDB.DBIncreaseTo20001,
|
||||||
# 20001: sickbeard.mainDB.AddCoolSickGearFeature2,
|
20001: sickbeard.mainDB.AddTvShowOverview,
|
||||||
# 20002: sickbeard.mainDB.AddCoolSickGearFeature3,
|
# 20002: sickbeard.mainDB.AddCoolSickGearFeature3,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -98,6 +98,7 @@ class TVShow(object):
|
||||||
self._scene = 0
|
self._scene = 0
|
||||||
self._rls_ignore_words = ""
|
self._rls_ignore_words = ""
|
||||||
self._rls_require_words = ""
|
self._rls_require_words = ""
|
||||||
|
self._overview = ''
|
||||||
|
|
||||||
self.dirty = True
|
self.dirty = True
|
||||||
|
|
||||||
|
@ -141,6 +142,7 @@ class TVShow(object):
|
||||||
scene = property(lambda self: self._scene, dirty_setter("_scene"))
|
scene = property(lambda self: self._scene, dirty_setter("_scene"))
|
||||||
rls_ignore_words = property(lambda self: self._rls_ignore_words, dirty_setter("_rls_ignore_words"))
|
rls_ignore_words = property(lambda self: self._rls_ignore_words, dirty_setter("_rls_ignore_words"))
|
||||||
rls_require_words = property(lambda self: self._rls_require_words, dirty_setter("_rls_require_words"))
|
rls_require_words = property(lambda self: self._rls_require_words, dirty_setter("_rls_require_words"))
|
||||||
|
overview = property(lambda self: self._overview, dirty_setter('_overview'))
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_anime(self):
|
def is_anime(self):
|
||||||
|
@ -832,6 +834,9 @@ class TVShow(object):
|
||||||
if self.is_anime:
|
if self.is_anime:
|
||||||
self.release_groups = BlackAndWhiteList(self.indexerid)
|
self.release_groups = BlackAndWhiteList(self.indexerid)
|
||||||
|
|
||||||
|
if not self.overview:
|
||||||
|
self.overview = sqlResults[0]['overview']
|
||||||
|
|
||||||
logger.log(str(self.indexerid) + u': Show info [%s] loaded from database' % self.name)
|
logger.log(str(self.indexerid) + u': Show info [%s] loaded from database' % self.name)
|
||||||
|
|
||||||
# Get IMDb_info from database
|
# Get IMDb_info from database
|
||||||
|
@ -895,6 +900,7 @@ class TVShow(object):
|
||||||
self.startyear = int(str(myEp["firstaired"]).split('-')[0])
|
self.startyear = int(str(myEp["firstaired"]).split('-')[0])
|
||||||
|
|
||||||
self.status = getattr(myEp, 'status', '')
|
self.status = getattr(myEp, 'status', '')
|
||||||
|
self.overview = getattr(myEp, 'overview', '')
|
||||||
|
|
||||||
def load_imdb_info(self):
|
def load_imdb_info(self):
|
||||||
|
|
||||||
|
@ -1184,7 +1190,8 @@ class TVShow(object):
|
||||||
"imdb_id": self.imdbid,
|
"imdb_id": self.imdbid,
|
||||||
"last_update_indexer": self.last_update_indexer,
|
"last_update_indexer": self.last_update_indexer,
|
||||||
"rls_ignore_words": self.rls_ignore_words,
|
"rls_ignore_words": self.rls_ignore_words,
|
||||||
"rls_require_words": self.rls_require_words
|
'rls_require_words': self.rls_require_words,
|
||||||
|
'overview': self.overview
|
||||||
}
|
}
|
||||||
|
|
||||||
myDB = db.DBConnection()
|
myDB = db.DBConnection()
|
||||||
|
|
Loading…
Reference in a new issue