diff --git a/package-lock.json b/package-lock.json index d884fa015..18c99bf22 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "freetube", - "version": "0.8.0", + "version": "0.9.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -20568,9 +20568,9 @@ } }, "yt-channel-info": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/yt-channel-info/-/yt-channel-info-1.1.3.tgz", - "integrity": "sha512-qQ286btTvqBPL2VFHJa0WpKiHp62Jil5cwskGj8fSVeKjynr4QHDL24OmcZxQlqfP2WiB4Cz9DeK3JkN1KsVTw==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/yt-channel-info/-/yt-channel-info-1.1.4.tgz", + "integrity": "sha512-FQfttLEWMlVH4qXEkSxPQBkcg6RUquXeckoJtpJP8uMhv2HSRMQ6qND1kf/kQf6eThd8UaYTvXrsgWnIAOG44w==", "requires": { "axios": "^0.19.2", "querystring": "^0.2.0" diff --git a/package.json b/package.json index 80b2b4b7b..2af2a0e69 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "xml2json": "^0.12.0", "youtube-chat": "^1.1.0", "youtube-suggest": "^1.1.0", - "yt-channel-info": "^1.1.3", + "yt-channel-info": "^1.1.4", "yt-comment-scraper": "^1.3.4", "yt-dash-manifest-generator": "^1.1.0", "yt-trending-scraper": "^1.0.3", diff --git a/src/renderer/components/data-settings/data-settings.js b/src/renderer/components/data-settings/data-settings.js index a1e4f9348..776211589 100644 --- a/src/renderer/components/data-settings/data-settings.js +++ b/src/renderer/components/data-settings/data-settings.js @@ -110,12 +110,10 @@ export default Vue.extend({ textDecode.pop() textDecode = textDecode.map(data => JSON.parse(data)) - let importingOldFormat = false const firstEntry = textDecode[0] if (firstEntry.channelId && firstEntry.channelName && firstEntry.channelThumbnail && firstEntry._id && firstEntry.profile) { // Old FreeTube subscriptions format detected, so convert it to the new one: textDecode = await this.convertOldFreeTubeFormatToNew(textDecode) - importingOldFormat = true } const primaryProfile = JSON.parse(JSON.stringify(this.profileList[0])) diff --git a/src/renderer/components/ft-list-video/ft-list-video.js b/src/renderer/components/ft-list-video/ft-list-video.js index 6b0ca6ac9..77387cd58 100644 --- a/src/renderer/components/ft-list-video/ft-list-video.js +++ b/src/renderer/components/ft-list-video/ft-list-video.js @@ -41,6 +41,7 @@ export default Vue.extend({ publishedText: '', isLive: false, isFavorited: false, + isUpcoming: false, hideViews: false, optionsValues: [ 'history', @@ -254,18 +255,25 @@ export default Vue.extend({ this.duration = this.calculateVideoDuration(this.data.lengthSeconds) this.description = this.data.description this.isLive = this.data.liveNow + this.isUpcoming = this.data.isUpcoming || this.data.premiere this.viewCount = this.data.viewCount + if (typeof (this.data.premiereTimestamp) !== 'undefined') { + this.publishedText = new Date(this.data.premiereTimestamp * 1000).toLocaleString() + } else { + this.publishedText = this.data.publishedText + } + if (typeof (this.data.publishedText) !== 'undefined' && this.data.publishedText !== null && !this.isLive) { // produces a string according to the template in the locales string this.toLocalePublicationString({ - publishText: this.data.publishedText, + publishText: this.publishedText, templateString: this.$t('Video.Publicationtemplate'), timeStrings: this.$t('Video.Published'), liveStreamString: this.$t('Video.Watching'), upcomingString: this.$t('Video.Published.Upcoming'), isLive: this.isLive, - isUpcoming: this.data.isUpcoming, + isUpcoming: this.isUpcoming, isRSS: this.data.isRSS }).then((data) => { this.uploadedTime = data diff --git a/src/renderer/components/ft-list-video/ft-list-video.vue b/src/renderer/components/ft-list-video/ft-list-video.vue index a7de2114e..fa8588a04 100644 --- a/src/renderer/components/ft-list-video/ft-list-video.vue +++ b/src/renderer/components/ft-list-video/ft-list-video.vue @@ -78,7 +78,7 @@ > {{ channelName }} -