Skip to content
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

Fix article sort reversed #8532

Merged
merged 4 commits into from
Sep 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default {

const sortedShows = [...showsInLists];

const sortKey = title => (sortArticle ? title.replace(/^((?:the|a|an)\s)/i, '') : title).toLowerCase();
const sortKey = title => (sortArticle ? title : title.replace(/^((?:the|a|an)\s)/i, '')).toLowerCase();
const sortFn = (showA, showB) => {
const titleA = sortKey(showA.title);
const titleB = sortKey(showB.title);
Expand Down
2 changes: 1 addition & 1 deletion themes-default/slim/src/components/show-list/poster.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export default {
const { stateLayout } = this;
const { sortArticle } = stateLayout;

if (!sortArticle) {
if (sortArticle) {
return row.title;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ exports[`ShowSelector.test.js renders with articles(The|A|An) ignored in /home/d
label="Anime"
>
<option
value="tvdb360438"
value="tvdb300835"
>
A Certain Scientific Accelerator
Ajin
</option>
<option
value="tvdb300835"
value="tvdb360438"
>
Ajin
A Certain Scientific Accelerator
</option>
<option
value="tvdb313867"
Expand Down Expand Up @@ -121,14 +121,14 @@ exports[`ShowSelector.test.js renders with shows in /home/displayShow 1`] = `
label="Anime"
>
<option
value="tvdb300835"
value="tvdb360438"
>
Ajin
A Certain Scientific Accelerator
</option>
<option
value="tvdb360438"
value="tvdb300835"
>
A Certain Scientific Accelerator
Ajin
</option>
<option
value="tvdb313867"
Expand Down Expand Up @@ -182,14 +182,14 @@ exports[`ShowSelector.test.js renders with shows in /home/editShow 1`] = `
label="Anime"
>
<option
value="tvdb300835"
value="tvdb360438"
>
Ajin
A Certain Scientific Accelerator
</option>
<option
value="tvdb360438"
value="tvdb300835"
>
A Certain Scientific Accelerator
Ajin
</option>
<option
value="tvdb313867"
Expand Down Expand Up @@ -243,14 +243,14 @@ exports[`ShowSelector.test.js renders with split sections in /home/displayShow 1
label="Anime"
>
<option
value="tvdb300835"
value="tvdb360438"
>
Ajin
A Certain Scientific Accelerator
</option>
<option
value="tvdb360438"
value="tvdb300835"
>
A Certain Scientific Accelerator
Ajin
</option>
<option
value="tvdb313867"
Expand Down Expand Up @@ -298,14 +298,14 @@ exports[`ShowSelector.test.js renders without placeholder in /home/displayShow 1
label="Anime"
>
<option
value="tvdb300835"
value="tvdb360438"
>
Ajin
A Certain Scientific Accelerator
</option>
<option
value="tvdb360438"
value="tvdb300835"
>
A Certain Scientific Accelerator
Ajin
</option>
<option
value="tvdb313867"
Expand Down
4 changes: 2 additions & 2 deletions themes/dark/assets/js/medusa-runtime.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions themes/light/assets/js/medusa-runtime.js

Large diffs are not rendered by default.