Skip to content

Commit

Permalink
Remove unlikely-to-be-implemented 'Date published' sorting options
Browse files Browse the repository at this point in the history
Context from absidue: 'I don't think we should even attempt to support it, due to all of the situations where it wouldn't be possible.'
  • Loading branch information
kommunarr committed Apr 11, 2024
1 parent 9db7e48 commit 95a6403
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
11 changes: 0 additions & 11 deletions src/renderer/views/Playlist/Playlist.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ import { extractNumberFromString, setPublishedTimestampsInvidious, showToast } f
import { invidiousGetPlaylistInfo, youtubeImageUrlToInvidious } from '../../helpers/api/invidious'

const SORT_BY_VALUES = {
// TODO: store video.published for user playlists
// DatePublishedNewest: 'date_published_newest',
// DatePublishedOldest: 'date_published_oldest',
DateAddedNewest: 'date_added_descending',
DateAddedOldest: 'date_added_ascending',
AuthorAscending: 'author_ascending',
Expand Down Expand Up @@ -180,10 +177,6 @@ export default defineComponent({
return b.timeAdded - a.timeAdded
case SORT_BY_VALUES.DateAddedOldest:
return a.timeAdded - b.timeAdded
case SORT_BY_VALUES.DatePublishedNewest:
return b.published - a.published
case SORT_BY_VALUES.DatePublishedOldest:
return a.published - b.published
case SORT_BY_VALUES.VideoTitleAscending:
return a.title.localeCompare(b.title, this.currentLocale)
case SORT_BY_VALUES.VideoTitleDescending:
Expand Down Expand Up @@ -222,10 +215,6 @@ export default defineComponent({
return this.$t('Playlist.Sort By.DateAddedNewest')
case SORT_BY_VALUES.DateAddedOldest:
return this.$t('Playlist.Sort By.DateAddedOldest')
case SORT_BY_VALUES.DatePublishedNewest:
return this.$t('Playlist.Sort By.DatePublishedNewest')
case SORT_BY_VALUES.DatePublishedOldest:
return this.$t('Playlist.Sort By.DatePublishedOldest')
case SORT_BY_VALUES.VideoTitleAscending:
return this.$t('Playlist.Sort By.VideoTitleAscending')
case SORT_BY_VALUES.VideoTitleDescending:
Expand Down
2 changes: 0 additions & 2 deletions static/locales/en-US.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -874,8 +874,6 @@ Playlist:
Sort By: Sort By
DateAddedNewest: Latest added first
DateAddedOldest: Earliest added first
DatePublishedNewest: Latest published first
DatePublishedOldest: Earliest published first
AuthorAscending: Author (A-Z)
AuthorDescending: Author (Z-A)
VideoTitleAscending: Title (A-Z)
Expand Down

0 comments on commit 95a6403

Please sign in to comment.