-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lots of small tweaks regarding player(groups)
- Loading branch information
1 parent
487d345
commit 256f9e5
Showing
20 changed files
with
171 additions
and
261 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
{ | ||
"folders": [ | ||
{ | ||
"path": "." | ||
} | ||
] | ||
"folders": [ | ||
{ | ||
"path": ".", | ||
}, | ||
], | ||
"settings": { | ||
, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 24 additions & 9 deletions
33
src/layouts/default/PlayerOSD/PlayerControlBtn/NextBtn.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,48 @@ | ||
<template> | ||
<!-- next button --> | ||
<ResponsiveIcon | ||
v-if="isVisible" | ||
v-if="isVisible && player" | ||
v-bind="icon" | ||
:disabled=" | ||
!store.activePlayerQueue || | ||
!store.activePlayerQueue?.active || | ||
store.activePlayerQueue?.items <= 1 | ||
" | ||
:disabled="!queueHasNext && !playerHasNext" | ||
icon="mdi-skip-next-outline" | ||
:type="'btn'" | ||
@clicked="api.queueCommandNext(store.activePlayerQueue!.queue_id)" | ||
@click="api.playerCommandNext(player.player_id)" | ||
/> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import api from "@/plugins/api"; | ||
import { store } from "@/plugins/store"; | ||
import { Player, PlayerFeature, PlayerQueue } from "@/plugins/api/interfaces"; | ||
import ResponsiveIcon, { | ||
ResponsiveIconProps, | ||
} from "@/components/mods/ResponsiveIcon.vue"; | ||
import { computed } from "vue"; | ||
// properties | ||
export interface Props { | ||
player: Player | undefined; | ||
playerQueue?: PlayerQueue; | ||
isVisible?: boolean; | ||
icon?: ResponsiveIconProps; | ||
} | ||
withDefaults(defineProps<Props>(), { | ||
const compProps = withDefaults(defineProps<Props>(), { | ||
playerQueue: undefined, | ||
isVisible: true, | ||
icon: undefined, | ||
}); | ||
const queueHasNext = computed(() => { | ||
if (!compProps.playerQueue?.active) return false; | ||
return ( | ||
(compProps.playerQueue.current_index || 0) < compProps.playerQueue.items - 1 | ||
); | ||
}); | ||
const playerHasNext = computed(() => { | ||
if (!compProps.player) return false; | ||
if (compProps.playerQueue?.active) return false; | ||
if (!compProps.player.current_media) return false; | ||
return compProps.player.supported_features.includes( | ||
PlayerFeature.NEXT_PREVIOUS, | ||
); | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.