diff --git a/src/renderer/components/distraction-settings/distraction-settings.js b/src/renderer/components/distraction-settings/distraction-settings.js
index 790368b4..891cf702 100644
--- a/src/renderer/components/distraction-settings/distraction-settings.js
+++ b/src/renderer/components/distraction-settings/distraction-settings.js
@@ -45,6 +45,18 @@ export default Vue.extend({
},
hideActiveSubscriptions: function () {
return this.$store.getters.getHideActiveSubscriptions
+ },
+ hideVideoDescription: function () {
+ return this.$store.getters.getHideVideoDescription
+ },
+ hideComments: function () {
+ return this.$store.getters.getHideComments
+ },
+ hideLiveStreams: function() {
+ return this.$store.getters.getHideLiveStreams
+ },
+ hideSharingActions: function() {
+ return this.$store.getters.getHideSharingActions
}
},
methods: {
@@ -68,7 +80,11 @@ export default Vue.extend({
'updateHideLiveChat',
'updateHideActiveSubscriptions',
'updatePlayNextVideo',
- 'updateDefaultTheatreMode'
+ 'updateDefaultTheatreMode',
+ 'updateHideVideoDescription',
+ 'updateHideComments',
+ 'updateHideLiveStreams',
+ 'updateHideSharingActions'
])
}
})
diff --git a/src/renderer/components/distraction-settings/distraction-settings.vue b/src/renderer/components/distraction-settings/distraction-settings.vue
index aef21062..4c59582d 100644
--- a/src/renderer/components/distraction-settings/distraction-settings.vue
+++ b/src/renderer/components/distraction-settings/distraction-settings.vue
@@ -38,6 +38,18 @@
:default-value="hideActiveSubscriptions"
@change="updateHideActiveSubscriptions"
/>
+
+
+
+
diff --git a/src/renderer/components/ft-age-restricted/ft-age-restricted.js b/src/renderer/components/ft-age-restricted/ft-age-restricted.js
new file mode 100644
index 00000000..5769012b
--- /dev/null
+++ b/src/renderer/components/ft-age-restricted/ft-age-restricted.js
@@ -0,0 +1,22 @@
+import Vue from 'vue'
+
+export default Vue.extend({
+ name: 'FtAgeRestricted',
+ props: {
+ contentTypeString: {
+ type: String,
+ required: true
+ }
+ },
+ computed: {
+ emoji: function () {
+ const emojis = ['đĩ', 'đĻ', 'đ', 'âšī¸', 'đĻ', 'đ¤Ģ', 'đ']
+ return emojis[Math.floor(Math.random() * emojis.length)]
+ },
+
+ restrictedMessage: function () {
+ const contentType = this.$t('Age Restricted.Type.' + this.contentTypeString)
+ return this.$t('Age Restricted.This $contentType is age restricted').replace('$contentType', contentType)
+ }
+ }
+})
diff --git a/src/renderer/components/ft-age-restricted/ft-age-restricted.sass b/src/renderer/components/ft-age-restricted/ft-age-restricted.sass
new file mode 100644
index 00000000..58d44107
--- /dev/null
+++ b/src/renderer/components/ft-age-restricted/ft-age-restricted.sass
@@ -0,0 +1,14 @@
+.ft-age-restricted
+ color: var(--primary-text-color)
+ h2
+ width: 100%
+ text-align: center
+ background-color: var(--card-bg-color)
+ padding: 10px 0
+ .frown
+ width: 100%
+ text-align: center
+ background-color: var(--card-bg-color)
+ font-size: 10em
+ padding: 20px 0
+ height: 100%
diff --git a/src/renderer/components/ft-age-restricted/ft-age-restricted.vue b/src/renderer/components/ft-age-restricted/ft-age-restricted.vue
new file mode 100644
index 00000000..abc2eac8
--- /dev/null
+++ b/src/renderer/components/ft-age-restricted/ft-age-restricted.vue
@@ -0,0 +1,15 @@
+
+
+
+ {{ restrictedMessage }}
+
+
+ {{ emoji }}
+
+
+
+
+
+
diff --git a/src/renderer/components/ft-list-lazy-wrapper/ft-list-lazy-wrapper.js b/src/renderer/components/ft-list-lazy-wrapper/ft-list-lazy-wrapper.js
index 5ff6c2f7..237ce32a 100644
--- a/src/renderer/components/ft-list-lazy-wrapper/ft-list-lazy-wrapper.js
+++ b/src/renderer/components/ft-list-lazy-wrapper/ft-list-lazy-wrapper.js
@@ -33,6 +33,11 @@ export default Vue.extend({
visible: this.firstScreen
}
},
+ computed: {
+ hideLiveStreams: function() {
+ return this.$store.getters.getHideLiveStreams
+ }
+ },
methods: {
onVisibilityChanged: function (visible) {
this.visible = visible
diff --git a/src/renderer/components/ft-list-lazy-wrapper/ft-list-lazy-wrapper.vue b/src/renderer/components/ft-list-lazy-wrapper/ft-list-lazy-wrapper.vue
index e49915e2..48f7057a 100644
--- a/src/renderer/components/ft-list-lazy-wrapper/ft-list-lazy-wrapper.vue
+++ b/src/renderer/components/ft-list-lazy-wrapper/ft-list-lazy-wrapper.vue
@@ -1,5 +1,6 @@
+
+
+
+ {{ $t("Settings.Parental Control Settings.Parental Control Settings") }}
+
+
+
+
+
+
+
+
+
diff --git a/src/renderer/components/playlist-info/playlist-info.js b/src/renderer/components/playlist-info/playlist-info.js
index d59c30a5..f6edc105 100644
--- a/src/renderer/components/playlist-info/playlist-info.js
+++ b/src/renderer/components/playlist-info/playlist-info.js
@@ -35,6 +35,10 @@ export default Vue.extend({
}
},
computed: {
+ hideSharingActions: function() {
+ return this.$store.getters.getHideSharingActions
+ },
+
currentInvidiousInstance: function () {
return this.$store.getters.getCurrentInvidiousInstance
},
diff --git a/src/renderer/components/playlist-info/playlist-info.vue b/src/renderer/components/playlist-info/playlist-info.vue
index 1fc1bfbf..b3361cd0 100644
--- a/src/renderer/components/playlist-info/playlist-info.vue
+++ b/src/renderer/components/playlist-info/playlist-info.vue
@@ -47,6 +47,7 @@
+
diff --git a/src/renderer/views/Search/Search.js b/src/renderer/views/Search/Search.js
index c7f93076..49509339 100644
--- a/src/renderer/views/Search/Search.js
+++ b/src/renderer/views/Search/Search.js
@@ -37,6 +37,13 @@ export default Vue.extend({
backendFallback: function () {
return this.$store.getters.getBackendFallback
+ },
+
+ hideLiveStreams: function() {
+ return this.$store.getters.getHideLiveStreams
+ },
+ showFamilyFriendlyOnly: function() {
+ return this.$store.getters.getShowFamilyFriendlyOnly
}
},
watch: {
@@ -94,6 +101,7 @@ export default Vue.extend({
if (sameSearch.length > 0) {
console.log(sameSearch)
+
// Replacing the data right away causes a strange error where the data
// Shown is mixed from 2 different search results. So we'll wait a moment
// Before showing the results.
@@ -118,6 +126,8 @@ export default Vue.extend({
payload.options.pages = 1
}
+ payload.options.safeSearch = this.showFamilyFriendlyOnly
+
this.ytSearch(payload).then((result) => {
console.log(result)
if (!result) {
diff --git a/src/renderer/views/Settings/Settings.js b/src/renderer/views/Settings/Settings.js
index df4a1b02..6cef643f 100644
--- a/src/renderer/views/Settings/Settings.js
+++ b/src/renderer/views/Settings/Settings.js
@@ -12,6 +12,7 @@ import DataSettings from '../../components/data-settings/data-settings.vue'
import DistractionSettings from '../../components/distraction-settings/distraction-settings.vue'
import ProxySettings from '../../components/proxy-settings/proxy-settings.vue'
import SponsorBlockSettings from '../../components/sponsor-block-settings/sponsor-block-settings.vue'
+import ParentControlSettings from '../../components/parental-control-settings/parental-control-settings.vue'
export default Vue.extend({
name: 'Settings',
@@ -28,7 +29,8 @@ export default Vue.extend({
'distraction-settings': DistractionSettings,
'proxy-settings': ProxySettings,
'sponsor-block-settings': SponsorBlockSettings,
- 'download-settings': DownloadSettings
+ 'download-settings': DownloadSettings,
+ 'parental-control-settings': ParentControlSettings
},
computed: {
usingElectron: function () {
diff --git a/src/renderer/views/Settings/Settings.vue b/src/renderer/views/Settings/Settings.vue
index e06e772e..0039eeac 100644
--- a/src/renderer/views/Settings/Settings.vue
+++ b/src/renderer/views/Settings/Settings.vue
@@ -20,6 +20,8 @@
+
+
diff --git a/src/renderer/views/Subscriptions/Subscriptions.js b/src/renderer/views/Subscriptions/Subscriptions.js
index 7400ba56..ec64b804 100644
--- a/src/renderer/views/Subscriptions/Subscriptions.js
+++ b/src/renderer/views/Subscriptions/Subscriptions.js
@@ -86,6 +86,10 @@ export default Vue.extend({
activeSubscriptionList: function () {
return this.activeProfile.subscriptions
+ },
+
+ hideLiveStreams: function() {
+ return this.$store.getters.getHideLiveStreams
}
},
watch: {
@@ -178,7 +182,11 @@ export default Vue.extend({
videoList = await Promise.all(videoList.sort((a, b) => {
return b.publishedDate - a.publishedDate
}))
-
+ if (this.hideLiveStreams) {
+ videoList = videoList.filter(item => {
+ return (!item.liveNow && !item.isUpcoming)
+ })
+ }
const profileSubscriptions = {
activeProfile: this.activeProfile._id,
videoList: videoList,
diff --git a/src/renderer/views/Watch/Watch.js b/src/renderer/views/Watch/Watch.js
index 436751ee..69ae3189 100644
--- a/src/renderer/views/Watch/Watch.js
+++ b/src/renderer/views/Watch/Watch.js
@@ -13,6 +13,7 @@ import WatchVideoComments from '../../components/watch-video-comments/watch-vide
import WatchVideoLiveChat from '../../components/watch-video-live-chat/watch-video-live-chat.vue'
import WatchVideoPlaylist from '../../components/watch-video-playlist/watch-video-playlist.vue'
import WatchVideoRecommendations from '../../components/watch-video-recommendations/watch-video-recommendations.vue'
+import FtAgeRestricted from '../../components/ft-age-restricted/ft-age-restricted.vue'
export default Vue.extend({
name: 'Watch',
@@ -26,7 +27,8 @@ export default Vue.extend({
'watch-video-comments': WatchVideoComments,
'watch-video-live-chat': WatchVideoLiveChat,
'watch-video-playlist': WatchVideoPlaylist,
- 'watch-video-recommendations': WatchVideoRecommendations
+ 'watch-video-recommendations': WatchVideoRecommendations,
+ 'ft-age-restricted': FtAgeRestricted
},
beforeRouteLeave: function (to, from, next) {
this.handleRouteChange(this.videoId)
@@ -42,6 +44,7 @@ export default Vue.extend({
showLegacyPlayer: false,
showYouTubeNoCookieEmbed: false,
hidePlayer: false,
+ isFamilyFriendly: false,
isLive: false,
isLiveContent: false,
isUpcoming: false,
@@ -134,6 +137,15 @@ export default Vue.extend({
hideLiveChat: function () {
return this.$store.getters.getHideLiveChat
},
+ hideComments: function () {
+ return this.$store.getters.getHideComments
+ },
+ hideVideoDescription: function () {
+ return this.$store.getters.getHideVideoDescription
+ },
+ showFamilyFriendlyOnly: function() {
+ return this.$store.getters.getShowFamilyFriendlyOnly
+ },
youtubeNoCookieEmbeddedFrame: function () {
return ``
@@ -300,6 +312,7 @@ export default Vue.extend({
break
}
+ this.isFamilyFriendly = result.videoDetails.isFamilySafe
this.recommendedVideos = result.related_videos.map((video) => {
video.videoId = video.id
video.authorId = video.author.id
@@ -586,6 +599,7 @@ export default Vue.extend({
return format
})
this.isLive = result.liveNow
+ this.isFamilyFriendly = result.isFamilyFriendly
this.captionHybridList = result.captions.map(caption => {
caption.url = this.currentInvidiousInstance + caption.url
caption.type = ''
diff --git a/src/renderer/views/Watch/Watch.sass b/src/renderer/views/Watch/Watch.sass
index 2c566255..ff97d47d 100644
--- a/src/renderer/views/Watch/Watch.sass
+++ b/src/renderer/views/Watch/Watch.sass
@@ -6,6 +6,12 @@
=single-column-template
grid-template: "video" auto "info" auto "sidebar" auto / auto
+.ageRestricted
+ max-width: calc(80vh * 1.78)
+ display: inline-block
+ +single-column-template
+ @media only screen and (min-width: 901px)
+ width: 300%
.videoLayout
display: grid
diff --git a/src/renderer/views/Watch/Watch.vue b/src/renderer/views/Watch/Watch.vue
index 91b4679b..db724a5f 100644
--- a/src/renderer/views/Watch/Watch.vue
+++ b/src/renderer/views/Watch/Watch.vue
@@ -11,7 +11,10 @@
v-if="isLoading"
:fullscreen="true"
/>
-