Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/renderer/components/WatchVideoInfo/WatchVideoInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,15 @@
:get-timestamp="getTimestamp"
:playlist-id="playlistId"
/>
<FtIconButton
class="navIconButton"
:title="t('Video.Reload Player')"
:icon="['fas', 'sync']"
:size="20"
:use-shadow="false"
theme="secondary"
@click="reloadPlayer"
/>
</span>
</div>
</div>
Expand Down Expand Up @@ -241,6 +250,7 @@ const emit = defineEmits([
'change-format',
'pause-player',
'save-watched-progress',
'reload-player',
])

const USING_ELECTRON = process.env.IS_ELECTRON
Expand Down Expand Up @@ -317,6 +327,10 @@ function changeFormat(value) {
emit('change-format', value)
}

function reloadPlayer() {
emit('reload-player')
}

const watchedProgressSavingInSemiAutoMode = computed(() => {
return store.getters.getWatchedProgressSavingMode === 'semi-auto'
})
Expand Down
14 changes: 11 additions & 3 deletions src/renderer/views/Watch/Watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -1972,9 +1972,7 @@ export default defineComponent({
this.startNextVideoInPip = uiState.startNextVideoInPip
},

async onPlayerReloadRequested() {
showToast('Reloading player according to SABR request')

async saveWatchProgressForReload() {
Comment thread
Shadorc marked this conversation as resolved.
const timestamp = this.getTimestamp()
if (timestamp > 0) {
// Reload at the middle should restart at current timestamp
Expand All @@ -1991,6 +1989,16 @@ export default defineComponent({
}
}
}
},

async onManualReloadReloadRequested() {
Comment thread
caetano-dev marked this conversation as resolved.
Outdated
await this.saveWatchProgressForReload()
await this.reloadView()
},

async onSabrReloadRequested() {
showToast('Reloading player according to SABR request')
await this.saveWatchProgressForReload()
await this.reloadView()
},

Expand Down
3 changes: 2 additions & 1 deletion src/renderer/views/Watch/Watch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
@playback-rate-updated="updatePlaybackRate"
@skip-to-next="handleSkipToNext"
@skip-to-prev="handleSkipToPrev"
@player-reload-requested="onPlayerReloadRequested"
@player-reload-requested="onSabrReloadRequested"
/>
<div
v-if="!isLoading && (isUpcoming || errorMessage)"
Expand Down Expand Up @@ -157,6 +157,7 @@
@change-format="handleFormatChange"
@pause-player="pausePlayer"
@save-watched-progress="handleWatchProgressManualSave"
@reload-player="onManualReloadReloadRequested"
/>
<watch-video-chapters
v-if="!hideChapters && !isLoading && videoChapters.length > 0"
Expand Down
1 change: 1 addition & 0 deletions static/locales/en-US.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,7 @@ Video:
Published on: Published on
Streamed on: Streamed on
Started streaming on: Started streaming on
Reload Player: Reload Player

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refresh page would probably be a more appropriate name as it refreshed everything except the playlist and comments.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it to Reload Page

DeArrow:
Show Original Details: Show Original Details
Show Modified Details: Show Modified Details
Expand Down
Loading