mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-11 14:30:20 -05:00
[web] Fix for items not displaying because of their name
Albums, artists, composers, genres, and any other items listed on page where they appear sorted by names are now all displayed properly.
This commit is contained in:
@@ -80,7 +80,7 @@ import ListAlbums from '@/components/ListAlbums.vue'
|
||||
import DropdownMenu from '@/components/DropdownMenu.vue'
|
||||
import webapi from '@/webapi'
|
||||
import * as types from '@/store/mutation_types'
|
||||
import { bySortName, byYear, GroupByList } from '@/lib/GroupByList'
|
||||
import { byName, byYear, GroupByList } from '@/lib/GroupByList'
|
||||
|
||||
const dataObject = {
|
||||
load: function (to) {
|
||||
@@ -123,28 +123,24 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
albums_list: new GroupByList(),
|
||||
|
||||
// List of group by/sort options for itemsGroupByList
|
||||
groupby_options: [
|
||||
{
|
||||
id: 1,
|
||||
name: this.$t('page.albums.sort-by.name'),
|
||||
options: bySortName('name_sort')
|
||||
options: byName('name_sort', true)
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: this.$t('page.albums.sort-by.recently-added'),
|
||||
options: byYear('time_added', {
|
||||
direction: 'desc',
|
||||
defaultValue: '0000'
|
||||
direction: 'desc'
|
||||
})
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: this.$t('page.albums.sort-by.recently-released'),
|
||||
options: byYear('date_released', {
|
||||
direction: 'desc',
|
||||
defaultValue: '0000'
|
||||
direction: 'desc'
|
||||
})
|
||||
}
|
||||
]
|
||||
|
||||
@@ -61,7 +61,7 @@ import ModalDialogArtist from '@/components/ModalDialogArtist.vue'
|
||||
import DropdownMenu from '@/components/DropdownMenu.vue'
|
||||
import webapi from '@/webapi'
|
||||
import * as types from '@/store/mutation_types'
|
||||
import { bySortName, byYear, GroupByList } from '@/lib/GroupByList'
|
||||
import { byName, byYear, GroupByList } from '@/lib/GroupByList'
|
||||
|
||||
const dataObject = {
|
||||
load: function (to) {
|
||||
@@ -103,24 +103,20 @@ export default {
|
||||
return {
|
||||
artist: {},
|
||||
albums_list: new GroupByList(),
|
||||
|
||||
// List of group by/sort options for itemsGroupByList
|
||||
groupby_options: [
|
||||
{
|
||||
id: 1,
|
||||
name: this.$t('page.artist.sort-by.name'),
|
||||
options: bySortName('name_sort')
|
||||
options: byName('name_sort', true)
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: this.$t('page.artist.sort-by.release-date'),
|
||||
options: byYear('date_released', {
|
||||
direction: 'asc',
|
||||
defaultValue: '0000'
|
||||
direction: 'asc'
|
||||
})
|
||||
}
|
||||
],
|
||||
|
||||
show_artist_details_modal: false
|
||||
}
|
||||
},
|
||||
|
||||
@@ -80,7 +80,7 @@ import ListArtists from '@/components/ListArtists.vue'
|
||||
import DropdownMenu from '@/components/DropdownMenu.vue'
|
||||
import webapi from '@/webapi'
|
||||
import * as types from '@/store/mutation_types'
|
||||
import { bySortName, byYear, GroupByList } from '@/lib/GroupByList'
|
||||
import { byName, byYear, GroupByList } from '@/lib/GroupByList'
|
||||
|
||||
const dataObject = {
|
||||
load: function (to) {
|
||||
@@ -122,22 +122,18 @@ export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
// Original data from API call
|
||||
artists_list: new GroupByList(),
|
||||
|
||||
// List of group by/sort options for itemsGroupByList
|
||||
groupby_options: [
|
||||
{
|
||||
id: 1,
|
||||
name: this.$t('page.artists.sort-by.name'),
|
||||
options: bySortName('name_sort')
|
||||
options: byName('name_sort', true)
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: this.$t('page.artists.sort-by.recently-added'),
|
||||
options: byYear('time_added', {
|
||||
direction: 'desc',
|
||||
defaultValue: '0000'
|
||||
direction: 'desc'
|
||||
})
|
||||
}
|
||||
]
|
||||
|
||||
@@ -25,7 +25,7 @@ import IndexButtonList from '@/components/IndexButtonList.vue'
|
||||
import ContentWithHeading from '@/templates/ContentWithHeading.vue'
|
||||
import ListAlbums from '@/components/ListAlbums.vue'
|
||||
import webapi from '@/webapi'
|
||||
import { bySortName, GroupByList } from '@/lib/GroupByList'
|
||||
import { byName, GroupByList } from '@/lib/GroupByList'
|
||||
|
||||
const dataObject = {
|
||||
load: function (to) {
|
||||
@@ -34,7 +34,7 @@ const dataObject = {
|
||||
|
||||
set: function (vm, response) {
|
||||
vm.albums = new GroupByList(response.data)
|
||||
vm.albums.group(bySortName('name_sort'))
|
||||
vm.albums.group(byName('name_sort', true))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import TabsAudiobooks from '@/components/TabsAudiobooks.vue'
|
||||
import IndexButtonList from '@/components/IndexButtonList.vue'
|
||||
import ListArtists from '@/components/ListArtists.vue'
|
||||
import webapi from '@/webapi'
|
||||
import { bySortName, GroupByList } from '@/lib/GroupByList'
|
||||
import { byName, GroupByList } from '@/lib/GroupByList'
|
||||
|
||||
const dataObject = {
|
||||
load: function (to) {
|
||||
@@ -76,7 +76,7 @@ export default {
|
||||
if (!this.artists_list) {
|
||||
return []
|
||||
}
|
||||
this.artists_list.group(bySortName('name_sort'))
|
||||
this.artists_list.group(byName('name_sort', true))
|
||||
return this.artists_list
|
||||
}
|
||||
},
|
||||
|
||||
@@ -36,8 +36,7 @@ const dataObject = {
|
||||
vm.recently_added = new GroupByList(response.data.albums)
|
||||
vm.recently_added.group(
|
||||
byDateSinceToday('time_added', {
|
||||
direction: 'desc',
|
||||
defaultValue: '0000'
|
||||
direction: 'desc'
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ import IndexButtonList from '@/components/IndexButtonList.vue'
|
||||
import ListAlbums from '@/components/ListAlbums.vue'
|
||||
import ModalDialogGenre from '@/components/ModalDialogGenre.vue'
|
||||
import webapi from '@/webapi'
|
||||
import { bySortName, GroupByList } from '@/lib/GroupByList'
|
||||
import { byName, GroupByList } from '@/lib/GroupByList'
|
||||
|
||||
const dataObject = {
|
||||
load: function (to) {
|
||||
@@ -65,7 +65,7 @@ const dataObject = {
|
||||
set: function (vm, response) {
|
||||
vm.genre = response[0].data
|
||||
vm.albums_list = new GroupByList(response[1].data.albums)
|
||||
vm.albums_list.group(bySortName('name_sort'))
|
||||
vm.albums_list.group(byName('name_sort', true))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user