Skip to content

Commit

Permalink
Merge pull request #656 from Stremio/feat/library-reverse-name-sort
Browse files Browse the repository at this point in the history
feat(library_with_filters): add NameReverse sort filter
  • Loading branch information
elpiel authored Mar 18, 2024
2 parents aee54a1 + b553397 commit 20f5277
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/models/library_with_filters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ pub enum Sort {
#[derivative(Default)]
LastWatched,
Name,
NameReverse,
TimesWatched,
Watched,
NotWatched,
Expand Down Expand Up @@ -86,6 +87,7 @@ impl Sort {
// same as `ctime`
.then(a.ctime.cmp(&b.ctime)),
Sort::Name => a.name.to_lowercase().cmp(&b.name.to_lowercase()),
Sort::NameReverse => b.name.to_lowercase().cmp(&a.name.to_lowercase()),
}
}
}
Expand Down

0 comments on commit 20f5277

Please sign in to comment.