Skip to content

Commit

Permalink
fix: apply reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
ThibaultNocchi committed Jan 28, 2023
1 parent cff9c5b commit 474aace
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 18 deletions.
4 changes: 2 additions & 2 deletions frontend/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@
"episodeNumber": "Episode {episodeNumber}",
"errors": {
"anErrorHappened": "An error happened",
"cantPlayItem": "This item can't be played",
"messages": {
"errorCode": "Error code: {errorCode}",
"videoPlayerError": "The video player encountered an unrecoverable error."
},
"unauthorized": "You're not authorized to access this page",
"cantPlayItem": "This item can't be played"
"unauthorized": "You're not authorized to access this page"
},
"failedRetrievingDisplayPreferences": "Unable to get display preferences. Using last known settings.",
"failedSettingDisplayPreferences": "Unable to update display preferences.",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Layout/AudioControls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
:to="getItemDetailsLink(artist, 'MusicArtist')"
custom>
<span
class="text--secondary text-caption text-truncate link"
class="font-weight-light text-caption text-truncate link"
@click="navigate">
{{ artist.Name }}
</span>
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/Layout/TimeSlider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import { ticksToMs, formatTime } from '@/utils/time';
const playbackManager = playbackManagerStore();
const currentInput = ref(0);
const clicked = ref(false);
const runtime = computed(() => {
return ticksToMs(playbackManager.currentItem?.RunTimeTicks) / 1000;
});
const runtime = computed(
() => ticksToMs(playbackManager.currentItem?.RunTimeTicks) / 1000
);
const sliderValue = computed({
get() {
return clicked.value ? currentInput.value : playbackManager.currentTime;
Expand Down
14 changes: 7 additions & 7 deletions frontend/src/components/Playback/PlayerElement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,17 @@ const mediaElement = computed<'audio' | 'video' | undefined>(() => {
/**
* If the player is a video element and we're
*/
const teleportTarget = computed<'body' | '.video-container'>(() => {
return mediaElement.value === 'audio' ? 'body' : '.video-container';
});
const teleportTarget = computed<'body' | '.video-container'>(() =>
mediaElement.value === 'audio' ? 'body' : '.video-container'
);
const posterUrl = computed<string>(() => {
return !isNil(playbackManager.currentItem) && mediaElement.value === 'video'
const posterUrl = computed<string>(() =>
!isNil(playbackManager.currentItem) && mediaElement.value === 'video'
? getImageInfo(playbackManager.currentItem, {
preferBackdrop: true
}).url || ''
: '';
});
: ''
);
const isLoopingOnce = computed(
() => playbackManager.repeatMode === RepeatMode.RepeatOne
Expand Down
6 changes: 1 addition & 5 deletions frontend/src/store/items.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,7 @@ class ItemsStore {
* == GETTERS ==
*/
public getItemById = (id: string | undefined): BaseItemDto | undefined => {
return computed(() => {
if (id) {
return state.value.byId[id];
}
}).value;
return computed(() => (id ? state.value.byId[id] : undefined)).value;
};

public getItemsById = (ids: string[]): BaseItemDto[] => {
Expand Down

0 comments on commit 474aace

Please sign in to comment.