Skip to content

Commit

Permalink
Remove now-redundant playlist pause feature
Browse files Browse the repository at this point in the history
  • Loading branch information
kommunarr committed Oct 14, 2024
1 parent 2b17208 commit 3a55565
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export default defineComponent({
shuffleEnabled: false,
loopEnabled: false,
reversePlaylist: false,
pauseOnCurrentVideo: false,
prevVideoBeforeDeletion: null,
channelName: '',
channelId: '',
Expand Down Expand Up @@ -294,16 +293,6 @@ export default defineComponent({
})
},

togglePauseOnCurrentVideo: function () {
if (this.pauseOnCurrentVideo) {
this.pauseOnCurrentVideo = false
showToast(this.$t('Playlist will not pause when current video is finished'))
} else {
this.pauseOnCurrentVideo = true
showToast(this.$t('Playlist will pause when current video is finished'))
}
},

playNextVideo: function () {
const playlistInfo = {
playlistId: this.playlistId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,6 @@
@keydown.enter.prevent="playNextVideo"
@keydown.space.prevent="playNextVideo"
/>
<font-awesome-icon
class="playlistIcon"
:class="{ playlistIconActive: pauseOnCurrentVideo }"
:icon="['fas', 'pause']"
:title="$t('Video.Pause on Current Video')"
role="button"
tabindex="0"
:aria-pressed="pauseOnCurrentVideo"
@click="togglePauseOnCurrentVideo"
@keydown.enter.prevent="togglePauseOnCurrentVideo"
@keydown.space.prevent="togglePauseOnCurrentVideo"
/>
</p>
<div
v-if="!isLoading"
Expand Down
2 changes: 0 additions & 2 deletions src/renderer/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ import {
faNetworkWired,
faNewspaper,
faPalette,
faPause,
faPhotoFilm,
faPlay,
faPlus,
Expand Down Expand Up @@ -185,7 +184,6 @@ library.add(
faNetworkWired,
faNewspaper,
faPalette,
faPause,
faPhotoFilm,
faPlay,
faPlus,
Expand Down
21 changes: 1 addition & 20 deletions src/renderer/views/Watch/Watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ export default defineComponent({
},
autoplayPossible: function () {
return (!this.watchingPlaylist && !this.hideRecommendedVideos && !!this.nextRecommendedVideo) ||
(this.watchingPlaylist && !this.getPlaylistPauseOnCurrent() && !this.$refs.watchVideoPlaylist?.shouldStopDueToPlaylistEnd)
(this.watchingPlaylist && !this.$refs.watchVideoPlaylist?.shouldStopDueToPlaylistEnd)
},
currentLocale: function () {
return this.$i18n.locale
Expand Down Expand Up @@ -1083,10 +1083,6 @@ export default defineComponent({
},

checkIfPlaylist: function () {
// On the off chance that user selected pause on current video
// Then clicks on another video in the playlist
this.disablePlaylistPauseOnCurrent()

if (this.$route.query == null) {
this.watchingPlaylist = false
return
Expand Down Expand Up @@ -1198,11 +1194,6 @@ export default defineComponent({
return
}

if (this.watchingPlaylist && this.getPlaylistPauseOnCurrent()) {
this.disablePlaylistPauseOnCurrent()
return
}

if (this.watchingPlaylist && this.$refs.watchVideoPlaylist?.shouldStopDueToPlaylistEnd) {
// Let `watchVideoPlaylist` handle end of playlist, no countdown needed
this.$refs.watchVideoPlaylist.playNextVideo()
Expand Down Expand Up @@ -1606,16 +1597,6 @@ export default defineComponent({
return this.$refs.watchVideoPlaylist ? this.$refs.watchVideoPlaylist.loopEnabled : false
},

getPlaylistPauseOnCurrent: function () {
return this.$refs.watchVideoPlaylist?.pauseOnCurrentVideo ?? false
},

disablePlaylistPauseOnCurrent: function () {
if (this.$refs.watchVideoPlaylist) {
this.$refs.watchVideoPlaylist.pauseOnCurrentVideo = false
}
},

updateTitle: function () {
document.title = `${this.videoTitle} - ${packageDetails.productName}`
},
Expand Down
4 changes: 0 additions & 4 deletions static/locales/en-GB.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1218,10 +1218,6 @@ Hashtag:
Hashtag: Hashtag
This hashtag does not currently have any videos: This hashtag does not currently
have any videos
Playlist will pause when current video is finished: Playlist will pause when current
video is finished
Playlist will not pause when current video is finished: Playlist will not pause when
current video is finished
Go to page: Go to {page}
Tag already exists: ‘{tagName}’ tag already exists
Close Banner: Close Banner
Expand Down
2 changes: 0 additions & 2 deletions static/locales/en-US.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1093,8 +1093,6 @@ Shuffle is now enabled: Shuffle is now enabled
The playlist has been reversed: The playlist has been reversed
Playing Next Video: Playing Next Video
Playing Previous Video: Playing Previous Video
Playlist will not pause when current video is finished: Playlist will not pause when current video is finished
Playlist will pause when current video is finished: Playlist will pause when current video is finished
Playing Next Video Interval: Playing next video in no time. Click to cancel. | Playing next video in {nextVideoInterval} second. Click to cancel. | Playing next video in {nextVideoInterval} seconds. Click to cancel.
Canceled next video autoplay: Canceled next video autoplay

Expand Down

0 comments on commit 3a55565

Please sign in to comment.