-
Notifications
You must be signed in to change notification settings - Fork 278
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start on changes for changeIndexer page. (#9862)
* Start on changes for changeIndexer page. * Separated new-show into new-show and new-show-search.vue. * Added components: - change-indexer.vue - change-indexer-row.vue - select-indexer.vue * Add ChangeIndexer QueueItem * Added ChangeIndexer queueitem * implement the api * Conntect frontend / backend. Enabled mass updating indexers. * yarn dev * Added menu item. * Fixed merge conflicts * Allow change episode status from SKIPPED to DOWNLOADED. This is the case when we quickly remove/add a show with existing episodes. * Remove a removed show from recentShows. * Fix linting issues * Fix tests. The specific test should result in a different new status now. * yarn dev * update snapshot * Update changelog
- Loading branch information
Showing
36 changed files
with
2,147 additions
and
544 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# coding=utf-8 | ||
"""Request handler for series assets.""" | ||
from __future__ import unicode_literals | ||
|
||
from medusa import app | ||
from medusa.server.api.v2.base import BaseRequestHandler | ||
from medusa.tv.series import Series, SeriesIdentifier | ||
|
||
from tornado.escape import json_decode | ||
|
||
|
||
class SeriesChangeIndexer(BaseRequestHandler): | ||
"""Change shows indexer.""" | ||
|
||
#: resource name | ||
name = 'changeindexer' | ||
#: identifier | ||
identifier = None | ||
#: allowed HTTP methods | ||
allowed_methods = ('POST', ) | ||
|
||
def post(self): | ||
"""Change an existing show's indexer to another.""" | ||
data = json_decode(self.request.body) | ||
old_slug = data.get('oldSlug') | ||
new_slug = data.get('newSlug') | ||
|
||
identifier = SeriesIdentifier.from_slug(old_slug) | ||
series_obj = Series.find_by_identifier(identifier) | ||
if not series_obj: | ||
return self._not_found(f'Could not find a show to change indexer with slug {old_slug}') | ||
|
||
queue_item_obj = app.show_queue_scheduler.action.changeIndexer(old_slug, new_slug) | ||
|
||
return self._created(data=queue_item_obj.to_json) |
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.