Skip to content

Commit

Permalink
Fix incorrect identifier on changeEpisodeStatuses
Browse files Browse the repository at this point in the history
Fixes #4776
  • Loading branch information
sharkykh committed Jul 28, 2018
1 parent dfe63ec commit 7a209fc
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
10 changes: 8 additions & 2 deletions medusa/server/web/manage/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,16 @@ def changeEpisodeStatuses(self, oldStatus, newStatus, *args, **kwargs):
status_list + [cur_indexer_id, cur_series_id]
)

all_eps = ['{season}x{episode}'.format(season=x[b'season'], episode=x[b'episode']) for x in all_eps_results]
all_eps = ['s{season}e{episode}'.format(season=x[b'season'], episode=x[b'episode']) for x in all_eps_results]
to_change[cur_indexer_id, cur_series_id] = all_eps

self.setStatus(indexer_id_to_name(int(cur_indexer_id)), cur_series_id, '|'.join(to_change[(cur_indexer_id, cur_series_id)]), newStatus, direct=True)
self.setStatus(
indexername=indexer_id_to_name(int(cur_indexer_id)),
seriesid=cur_series_id,
eps='|'.join(to_change[(cur_indexer_id, cur_series_id)]),
status=newStatus,
direct=True
)

return self.redirect('/manage/episodeStatuses/')

Expand Down
2 changes: 1 addition & 1 deletion themes-default/slim/static/js/manage/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ MEDUSA.manage.init = function() {
const series = indexerId + '-' + seriesId;

row += ' <tr class="' + $('#row_class').val() + ' show-' + series + '">';
row += ' <td class="tableleft" align="center"><input type="checkbox" class="' + series + '-epcheck" name="' + series + '-' + season + 'x' + episode + '"' + (checked ? ' checked' : '') + '></td>';
row += ' <td class="tableleft" align="center"><input type="checkbox" class="' + series + '-epcheck" name="' + series + '-s' + season + 'e' + episode + '"' + (checked ? ' checked' : '') + '></td>';
row += ' <td>' + season + 'x' + episode + '</td>';
row += ' <td class="tableright" style="width: 100%">' + name + '</td>';
row += ' </tr>';
Expand Down
2 changes: 1 addition & 1 deletion themes/dark/assets/js/manage/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ MEDUSA.manage.init = function() {
const series = indexerId + '-' + seriesId;

row += ' <tr class="' + $('#row_class').val() + ' show-' + series + '">';
row += ' <td class="tableleft" align="center"><input type="checkbox" class="' + series + '-epcheck" name="' + series + '-' + season + 'x' + episode + '"' + (checked ? ' checked' : '') + '></td>';
row += ' <td class="tableleft" align="center"><input type="checkbox" class="' + series + '-epcheck" name="' + series + '-s' + season + 'e' + episode + '"' + (checked ? ' checked' : '') + '></td>';
row += ' <td>' + season + 'x' + episode + '</td>';
row += ' <td class="tableright" style="width: 100%">' + name + '</td>';
row += ' </tr>';
Expand Down
2 changes: 1 addition & 1 deletion themes/dark/assets/js/manage/init.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion themes/light/assets/js/manage/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ MEDUSA.manage.init = function() {
const series = indexerId + '-' + seriesId;

row += ' <tr class="' + $('#row_class').val() + ' show-' + series + '">';
row += ' <td class="tableleft" align="center"><input type="checkbox" class="' + series + '-epcheck" name="' + series + '-' + season + 'x' + episode + '"' + (checked ? ' checked' : '') + '></td>';
row += ' <td class="tableleft" align="center"><input type="checkbox" class="' + series + '-epcheck" name="' + series + '-s' + season + 'e' + episode + '"' + (checked ? ' checked' : '') + '></td>';
row += ' <td>' + season + 'x' + episode + '</td>';
row += ' <td class="tableright" style="width: 100%">' + name + '</td>';
row += ' </tr>';
Expand Down
2 changes: 1 addition & 1 deletion themes/light/assets/js/manage/init.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7a209fc

Please sign in to comment.