-
Notifications
You must be signed in to change notification settings - Fork 663
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved scene exceptions to be a TVShows table column in database.
Added SR API endpoints for scene exception retrieval. Added scene_exceptions and last_scene_exceptions_refresh properties to TVShow class. Added retrieval of scene exceptions method to TVShow class. Added get_scene_exception_by_name to TVShow class. Added get_scene_exception_by_season to TVShow class. Added update_scene_exceptions to TVShow class. Fixed charmap issue with AniDB.
- Loading branch information
Showing
20 changed files
with
144 additions
and
378 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
.../databases/main/db_repository/versions/011_Add_Scene_Exceptions_Column_To_TVShow_Table.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from sqlalchemy import * | ||
|
||
|
||
def upgrade(migrate_engine): | ||
meta = MetaData(bind=migrate_engine) | ||
tv_shows = Table('tv_shows', meta, autoload=True) | ||
if not hasattr(tv_shows.c, 'scene_exceptions'): | ||
scene_exceptions = Column('scene_exceptions', Text, default='') | ||
scene_exceptions.create(tv_shows) | ||
if not hasattr(tv_shows.c, 'last_scene_exceptions_refresh'): | ||
last_scene_exceptions_refresh = Column('last_scene_exceptions_refresh', Integer, default=0) | ||
last_scene_exceptions_refresh.create(tv_shows) | ||
|
||
|
||
def downgrade(migrate_engine): | ||
meta = MetaData(bind=migrate_engine) | ||
tv_shows = Table('tv_shows', meta, autoload=True) | ||
if hasattr(tv_shows.c, 'scene_exceptions'): | ||
tv_shows.c.scene_exceptions.drop() | ||
if hasattr(tv_shows.c, 'last_scene_exceptions_refresh'): | ||
tv_shows.c.scene_exceptions.drop() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.