Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelveldt committed Jul 8, 2024
1 parent bcf1200 commit c13b1b5
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 18 deletions.
25 changes: 15 additions & 10 deletions src/components/ItemsListing.vue
Original file line number Diff line number Diff line change
Expand Up @@ -971,28 +971,33 @@ const getFilteredItems = function (
}
// sort
if (params.sortBy == 'name') {
result.sort((a, b) => getSortName(a).localeCompare(
getSortName(b), undefined, {numeric: true}
));
result.sort((a, b) =>
getSortName(a).localeCompare(getSortName(b), undefined, {
numeric: true,
}),
);
}
if (params.sortBy == 'sort_name') {
result.sort((a, b) =>
getSortName(a, true).localeCompare(
getSortName(b, true), undefined, {numeric: true}
),
getSortName(a, true).localeCompare(getSortName(b, true), undefined, {
numeric: true,
}),
);
}
if (params.sortBy == 'name_desc') {
result.sort((a, b) => getSortName(b).localeCompare(
getSortName(a), undefined, {numeric: true}
));
result.sort((a, b) =>
getSortName(b).localeCompare(getSortName(a), undefined, {
numeric: true,
}),
);
}

if (params.sortBy == 'album') {
result.sort((a, b) =>
getSortName((a as Track).album).localeCompare(
getSortName((b as Track).album),
undefined, {numeric: true}
undefined,
{ numeric: true },
),
);
}
Expand Down
10 changes: 2 additions & 8 deletions src/components/ListviewItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,14 @@
• {{ item.album.name }}
</v-item>
<v-item
v-if="
showDiscNumber &&
'disc_number' in item &&
item.disc_number != null
"
v-if="showDiscNumber && 'disc_number' in item && item.disc_number"
>
<v-icon style="margin-left: 5px" icon="md:album" />
{{ item.disc_number }}
</v-item>
<v-item
v-if="
showTrackNumber &&
'track_number' in item &&
item.track_number != null
showTrackNumber && 'track_number' in item && item.track_number
"
>
<v-icon style="margin-left: 5px" icon="mdi-music-circle-outline" />
Expand Down
7 changes: 7 additions & 0 deletions src/components/MediaItemThumb.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,13 @@ export const getMediaItemImage = function (
// handle regular image within mediaitem
if ('metadata' in mediaItem && mediaItem.metadata.images) {
for (const img of mediaItem.metadata.images) {
if (
!img.remotely_accessible &&
!api.getProvider(img.provider)?.available
) {
// skip local images if not remotely accessible
continue;
}
if (img.type == type) return img;
}
}
Expand Down

0 comments on commit c13b1b5

Please sign in to comment.