From dea4eba1099164c44858543140f28b58ec7cdc48 Mon Sep 17 00:00:00 2001
From: Preston
Date: Wed, 9 Sep 2020 18:58:35 -0400
Subject: [PATCH] Fix and add Locales. Add Reverse playlist functionality
---
.../components/data-settings/data-settings.js | 6 +++---
.../components/data-settings/data-settings.vue | 2 +-
.../ft-profile-selector/ft-profile-selector.vue | 2 +-
.../watch-video-playlist/watch-video-playlist.js | 14 ++++++++++++++
.../watch-video-playlist.vue | 11 +++++++++++
.../watch-video-recommendations.js | 2 +-
.../watch-video-recommendations.vue | 2 +-
src/renderer/main.js | 2 +-
.../views/Subscriptions/Subscriptions.js | 16 ++++++++++++----
src/renderer/views/Watch/Watch.js | 6 ++++--
src/renderer/views/Watch/Watch.vue | 2 +-
static/locales/en-US.yaml | 7 +++++++
12 files changed, 57 insertions(+), 15 deletions(-)
diff --git a/src/renderer/components/data-settings/data-settings.js b/src/renderer/components/data-settings/data-settings.js
index a31f054c..c8d2e521 100644
--- a/src/renderer/components/data-settings/data-settings.js
+++ b/src/renderer/components/data-settings/data-settings.js
@@ -422,7 +422,7 @@ export default Vue.extend({
}
this.showToast({
- message: this.$t('Settings.Data Settings.All subscriptions have been successfully exported')
+ message: this.$t('Settings.Data Settings.Subscriptions have been successfully exported')
})
})
})
@@ -489,7 +489,7 @@ export default Vue.extend({
}
this.showToast({
- message: this.$t('Settings.Data Settings.All subscriptions have been successfully exported')
+ message: this.$t('Settings.Data Settings.Subscriptions have been successfully exported')
})
})
})
@@ -557,7 +557,7 @@ export default Vue.extend({
}
this.showToast({
- message: this.$t('Settings.Data Settings.All subscriptions have been successfully exported')
+ message: this.$t('Settings.Data Settings.Subscriptions have been successfully exported')
})
})
})
diff --git a/src/renderer/components/data-settings/data-settings.vue b/src/renderer/components/data-settings/data-settings.vue
index faae68ff..1605f90e 100644
--- a/src/renderer/components/data-settings/data-settings.vue
+++ b/src/renderer/components/data-settings/data-settings.vue
@@ -19,7 +19,7 @@
@click="importHistory"
/>
diff --git a/src/renderer/components/ft-profile-selector/ft-profile-selector.vue b/src/renderer/components/ft-profile-selector/ft-profile-selector.vue
index 916f42f2..a263f8ae 100644
--- a/src/renderer/components/ft-profile-selector/ft-profile-selector.vue
+++ b/src/renderer/components/ft-profile-selector/ft-profile-selector.vue
@@ -18,7 +18,7 @@
- Profile Select
+ {{ $t("Profile.Profile Select") }}
{
+ this.isLoading = false
+ }, 1)
+ },
+
playNextVideo: function () {
const playlistInfo = {
playlistId: this.playlistId
diff --git a/src/renderer/components/watch-video-playlist/watch-video-playlist.vue b/src/renderer/components/watch-video-playlist/watch-video-playlist.vue
index 4eb4dcaf..94b6035f 100644
--- a/src/renderer/components/watch-video-playlist/watch-video-playlist.vue
+++ b/src/renderer/components/watch-video-playlist/watch-video-playlist.vue
@@ -28,22 +28,33 @@
class="playlistIcon"
:class="{ playlistIconActive: loopEnabled }"
icon="retweet"
+ :title="$t('Video.Loop Playlist')"
@click="toggleLoop"
/>
+
diff --git a/src/renderer/components/watch-video-recommendations/watch-video-recommendations.js b/src/renderer/components/watch-video-recommendations/watch-video-recommendations.js
index 1652c16e..b72b4db8 100644
--- a/src/renderer/components/watch-video-recommendations/watch-video-recommendations.js
+++ b/src/renderer/components/watch-video-recommendations/watch-video-recommendations.js
@@ -16,7 +16,7 @@ export default Vue.extend({
type: Array,
required: true
},
- watchingPlaylist: {
+ showAutoplay: {
type: Boolean,
default: false
}
diff --git a/src/renderer/components/watch-video-recommendations/watch-video-recommendations.vue b/src/renderer/components/watch-video-recommendations/watch-video-recommendations.vue
index 0c3a004a..0919674b 100644
--- a/src/renderer/components/watch-video-recommendations/watch-video-recommendations.vue
+++ b/src/renderer/components/watch-video-recommendations/watch-video-recommendations.vue
@@ -4,7 +4,7 @@
{{ $t("Up Next") }}
{
- resolve(await Promise.all(feed.items.map((video) => {
+ const items = await Promise.all(feed.items.map((video) => {
video.authorId = channelId
video.videoId = video.id.replace('yt:video:', '')
video.type = 'video'
- video.publishedDate = new Date(video.pubDate)
- video.publishedText = video.publishedDate.toLocaleString()
video.lengthSeconds = '0:00'
video.isRSS = true
+ video.publishedDate = new Date(video.pubDate)
+
+ if (video.publishedDate.toString() === 'Invalid Date') {
+ video.publishedDate = new Date(video.isoDate)
+ }
+
+ video.publishedText = video.publishedDate.toLocaleString()
+
return video
- })))
+ }))
+
+ resolve(items)
}).catch((err) => {
console.log(err)
const errorMessage = this.$t('Local API Error (Click to copy)')
diff --git a/src/renderer/views/Watch/Watch.js b/src/renderer/views/Watch/Watch.js
index 976badce..a99d4ce0 100644
--- a/src/renderer/views/Watch/Watch.js
+++ b/src/renderer/views/Watch/Watch.js
@@ -303,8 +303,10 @@ export default Vue.extend({
this.activeSourceList = this.videoSourceList
}
- const templateUrl = result.player_response.storyboards.playerStoryboardSpecRenderer.spec
- this.createLocalStoryboardUrls(templateUrl)
+ if (typeof result.player_response.storyboards !== 'undefined') {
+ const templateUrl = result.player_response.storyboards.playerStoryboardSpecRenderer.spec
+ this.createLocalStoryboardUrls(templateUrl)
+ }
}
this.isLoading = false
diff --git a/src/renderer/views/Watch/Watch.vue b/src/renderer/views/Watch/Watch.vue
index 531f1781..73f1b6f1 100644
--- a/src/renderer/views/Watch/Watch.vue
+++ b/src/renderer/views/Watch/Watch.vue
@@ -80,7 +80,7 @@
/>