-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new field watched to tv_episodes table and Episode class. #4825
Conversation
* Updated apiv2 to patch the watched field.
…d-episode-watched-status
medusa/databases/main_db.py
Outdated
'version, release_group, manually_searched, watched) ' | ||
'SELECT showid, indexerid, indexer, ' | ||
'name, season, episode, description, airdate, hasnfo, ' | ||
'hastbn, status, -1 AS quality, location, file_size, release_name, ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why you are changing the quality fields to -1
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thats a foobar
medusa/databases/main_db.py
Outdated
@@ -699,7 +699,7 @@ def execute(self): | |||
utils.backup_database(self.connection.path, self.connection.version) | |||
|
|||
log.info(u'Adding new quality field in the tv_episodes table') | |||
self.connection.action('DROP TABLE IF EXISTS old_tv_episodes;') | |||
self.connection.action('DROP TABLE IF EXISTS tmp_tv_episodes;') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this should have been renamed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trying to keep it consistant. Also tmp is a better description then old. As where not dealing with 'old' episodes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case you should also replace it in the next line.
medusa/databases/main_db.py
Outdated
'FROM tmp_tv_episodes;' | ||
) | ||
|
||
self.connection.action('DROP TABLE tmp_tv_episodes') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing semicolon for consistency.
CHANGELOG.md
Outdated
@@ -5,6 +5,7 @@ | |||
#### Improvements | |||
- Converted /config/postProcessing to a Vue component ([#4259](https://github.com/pymedusa/Medusa/pull/4259)) | |||
- Bundled the web application using Webpack ([#4692](https://github.com/pymedusa/Medusa/pull/4692)) | |||
- Add watched field to the tv_episodes db table. UI will be added in future. ([#4692](https://github.com/pymedusa/Medusa/pull/4825)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use past tense for consistency.
medusa/databases/main_db.py
Outdated
'hastbn, status, quality, location, file_size, release_name, ' | ||
'subtitles, subtitles_searchcount, subtitles_lastsearch, ' | ||
'is_proper, scene_season, scene_episode, absolute_number, ' | ||
'scene_absolute_number, version, release_group, manually_searched, 0 ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe 0 AS watched
to make it more explicit.
the idea of this feature, is provide users the ability to keep track of watched / unwatched episodes.
They'll be able to manually set the status from medusa. Or automate it through the medusa kodi addon.
For now this PR will be limited to introducing the watched field. A new PR will be used to make some UI changes. As to update the watched flag manually.
TODO: