diff --git a/.github/workflows/flatpak.yml b/.github/workflows/flatpak.yml index 452a24229154..4a20d973c723 100644 --- a/.github/workflows/flatpak.yml +++ b/.github/workflows/flatpak.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@v3 with: repository: flathub/io.freetubeapp.FreeTube - token: ${{ secrets.PUSH_TOKEN }} + token: ${{ secrets.FLATHUB_TOKEN }} - name: GitHub API exec action uses: moustacheful/github-api-exec-action@v0 id: api_results @@ -77,22 +77,22 @@ jobs: date +"%Y-%m-%d" >> $GITHUB_ENV echo 'EOF' >> $GITHUB_ENV - name: Update x64 File Location in yml File - uses: mikefarah/yq@v4.27.5 + uses: mikefarah/yq@v4.28.1 with: # The Command which should be run cmd: yq w -i io.freetubeapp.FreeTube.yml modules[0].sources[0].url 'https://github.com/FreeTubeApp/FreeTube/releases/download/v${{ steps.sub.outputs.result }}-beta/freetube-${{ steps.sub.outputs.result }}-linux-portable-x64.zip' - name: Update x64 Hash in yml File - uses: mikefarah/yq@v4.27.5 + uses: mikefarah/yq@v4.28.1 with: # The Command which should be run cmd: yq w -i io.freetubeapp.FreeTube.yml modules[0].sources[0].sha256 ${{ env.HASH_X64 }} - name: Update ARM File Location in yml File - uses: mikefarah/yq@v4.27.5 + uses: mikefarah/yq@v4.28.1 with: # The Command which should be run cmd: yq w -i io.freetubeapp.FreeTube.yml modules[0].sources[1].url 'https://github.com/FreeTubeApp/FreeTube/releases/download/v${{ steps.sub.outputs.result }}-beta/freetube-${{ steps.sub.outputs.result }}-linux-portable-arm64.zip' - name: Update ARM Hash in yml File - uses: mikefarah/yq@v4.27.5 + uses: mikefarah/yq@v4.28.1 with: # The Command which should be run cmd: yq w -i io.freetubeapp.FreeTube.yml modules[0].sources[1].sha256 ${{ env.HASH_ARM64 }} @@ -108,7 +108,7 @@ jobs: # Optional but recommended # Defaults to "Apply automatic changes" commit_message: Update files for v${{ steps.sub.outputs.result }} - token: ${{ secrets.PUSH_TOKEN }} + token: ${{ secrets.FLATHUB_TOKEN }} # Optional options appended to `git-commit` # See https://git-scm.com/docs/git-commit for a list of available options @@ -118,7 +118,7 @@ jobs: skip_dirty_check: true - name: Create PR run: | - echo ${{ secrets.PUSH_TOKEN }} >> auth.txt + echo ${{ secrets.FLATHUB_TOKEN }} >> auth.txt gh auth login --with-token < auth.txt rm auth.txt gh pr create --title "Release v${{ steps.sub.outputs.result }}" --body "This is an automated PR for the v${{ steps.sub.outputs.result }} release. This PR will be updated and merged once testing is complete." diff --git a/.github/workflows/report.yml b/.github/workflows/report.yml index c66c891512c3..34cb3099dcb4 100644 --- a/.github/workflows/report.yml +++ b/.github/workflows/report.yml @@ -4,7 +4,7 @@ name: Project Board Automation on: issues: - types: [labeled, unlabeled, closed, deleted] + types: [closed, deleted, reopened, opened] jobs: assign-issues-to-projects: @@ -14,37 +14,57 @@ jobs: # For bug reports - name: New bug issue uses: alex-page/github-project-automation-plus@v0.8.1 - if: github.event.action == 'labeled' && contains(github.event.issue.labels.*.name, 'bug') + if: contains(github.event.issue.labels.*.name, 'bug') && github.event.action == 'opened' with: project: Bug Reports column: To assign repo-token: ${{ secrets.PUSH_TOKEN }} action: update - - - name: Bug label removed + + - name: Bug issue closed uses: alex-page/github-project-automation-plus@v0.8.1 - if: github.event.action == 'unlabeled' || github.event.action == 'closed' || github.event.action == 'deleted' + if: github.event.action == 'closed' || github.event.action == 'deleted' with: action: delete project: Bug Reports column: To assign repo-token: ${{ secrets.PUSH_TOKEN }} + + - name: Bug issue reopened + uses: alex-page/github-project-automation-plus@v0.8.1 + if: contains(github.event.issue.labels.*.name, 'bug') && github.event.action == 'reopened' + with: + project: Bug Reports + column: To assign + repo-token: ${{ secrets.PUSH_TOKEN }} + action: update # For feature requests - name: New feature issue uses: alex-page/github-project-automation-plus@v0.8.1 - if: github.event.action == 'labeled' && contains(github.event.issue.labels.*.name, 'enhancement') + if: contains(github.event.issue.labels.*.name, 'enhancement') && github.event.action == 'opened' with: project: Feature Requests column: To assign repo-token: ${{ secrets.PUSH_TOKEN }} action: update - - name: Feature request label removed + - name: Feature request issue closed uses: alex-page/github-project-automation-plus@v0.8.1 - if: github.event.action == 'unlabeled' || github.event.action == 'closed' || github.event.action == 'deleted' + if: github.event.action == 'closed' || github.event.action == 'deleted' with: action: delete project: Feature Requests column: To assign repo-token: ${{ secrets.PUSH_TOKEN }} + + - name: Feature request issue reopened + uses: alex-page/github-project-automation-plus@v0.8.1 + if: contains(github.event.issue.labels.*.name, 'enhancement') && github.event.action == 'reopened' + with: + project: Feature Requests + column: To assign + repo-token: ${{ secrets.PUSH_TOKEN }} + action: update + + diff --git a/package.json b/package.json index ece86c007f2e..f10d4110425a 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "vue-router": "^3.6.5", "vuex": "^3.6.2", "youtube-suggest": "^1.2.0", - "yt-channel-info": "^3.1.0", + "yt-channel-info": "^3.1.1", "yt-dash-manifest-generator": "1.1.0", "ytdl-core": "^4.11.2", "ytpl": "^2.3.0", @@ -112,8 +112,8 @@ "html-webpack-plugin": "^5.3.2", "js-yaml": "^4.1.0", "json-minimizer-webpack-plugin": "^4.0.0", - "lefthook": "^1.1.1", - "mini-css-extract-plugin": "^2.2.2", + "lefthook": "^1.1.2", + "mini-css-extract-plugin": "^2.6.1", "npm-run-all": "^4.1.5", "prettier": "^2.3.2", "rimraf": "^3.0.2", diff --git a/src/renderer/components/data-settings/data-settings.js b/src/renderer/components/data-settings/data-settings.js index d85c03d34eb4..c64c4b5c2cb4 100644 --- a/src/renderer/components/data-settings/data-settings.js +++ b/src/renderer/components/data-settings/data-settings.js @@ -11,6 +11,7 @@ import { MAIN_PROFILE_ID } from '../../../constants' import fs from 'fs' import { opmlToJSON } from 'opml-to-json' import ytch from 'yt-channel-info' +import { calculateColorLuminance } from '../../helpers/utils' // FIXME: Missing web logic branching @@ -1092,7 +1093,7 @@ export default Vue.extend({ let index = convertedData.findIndex(p => p.name === profile.value) if (index === -1) { // profile doesn't exist yet const randomBgColor = await this.getRandomColor() - const contrastyTextColor = await this.calculateColorLuminance(randomBgColor) + const contrastyTextColor = calculateColorLuminance(randomBgColor) convertedData.push({ name: profile.value, bgColor: randomBgColor, @@ -1241,7 +1242,6 @@ export default Vue.extend({ 'compactHistory', 'showToast', 'getRandomColor', - 'calculateColorLuminance', 'showOpenDialog', 'readFileFromDialog', 'showSaveDialog', diff --git a/src/renderer/components/ft-profile-edit/ft-profile-edit.js b/src/renderer/components/ft-profile-edit/ft-profile-edit.js index 29544729e8d8..a2c02d0aee79 100644 --- a/src/renderer/components/ft-profile-edit/ft-profile-edit.js +++ b/src/renderer/components/ft-profile-edit/ft-profile-edit.js @@ -6,6 +6,7 @@ import FtFlexBox from '../../components/ft-flex-box/ft-flex-box.vue' import FtInput from '../../components/ft-input/ft-input.vue' import FtButton from '../../components/ft-button/ft-button.vue' import { MAIN_PROFILE_ID } from '../../../constants' +import { calculateColorLuminance } from '../../helpers/utils' export default Vue.extend({ name: 'FtProfileEdit', @@ -70,8 +71,8 @@ export default Vue.extend({ } }, watch: { - profileBgColor: async function (val) { - this.profileTextColor = await this.calculateColorLuminance(val) + profileBgColor: function (val) { + this.profileTextColor = calculateColorLuminance(val) } }, created: function () { @@ -163,8 +164,7 @@ export default Vue.extend({ 'updateProfile', 'removeProfile', 'updateDefaultProfile', - 'updateActiveProfile', - 'calculateColorLuminance' + 'updateActiveProfile' ]) } }) diff --git a/src/renderer/components/ft-video-player/ft-video-player.js b/src/renderer/components/ft-video-player/ft-video-player.js index 307146a416a9..e889964a7272 100644 --- a/src/renderer/components/ft-video-player/ft-video-player.js +++ b/src/renderer/components/ft-video-player/ft-video-player.js @@ -14,6 +14,7 @@ import 'videojs-http-source-selector' import { IpcChannels } from '../../../constants' import { sponsorBlockSkipSegments } from '../../helpers/sponsorblock' +import { calculateColorLuminance } from '../../helpers/utils' export default Vue.extend({ name: 'FtVideoPlayer', @@ -1175,7 +1176,7 @@ export default Vue.extend({ videojs.registerComponent('loopButton', loopButton) }, - toggleVideoLoop: async function () { + toggleVideoLoop: function () { const loopButton = document.getElementById('loopButton') if (!this.player.loop()) { @@ -1187,7 +1188,7 @@ export default Vue.extend({ return color === currentTheme }) - const themeTextColor = await this.calculateColorLuminance(colorValues[nameIndex]) + const themeTextColor = calculateColorLuminance(colorValues[nameIndex]) loopButton.classList.add('vjs-icon-loop-active') @@ -1923,7 +1924,6 @@ export default Vue.extend({ }, ...mapActions([ - 'calculateColorLuminance', 'updateDefaultCaptionSettings', 'showToast', 'parseScreenshotCustomFileName', diff --git a/src/renderer/helpers/utils.js b/src/renderer/helpers/utils.js new file mode 100644 index 000000000000..46fb35678fe3 --- /dev/null +++ b/src/renderer/helpers/utils.js @@ -0,0 +1,103 @@ +export function calculateColorLuminance(colorValue) { + const cutHex = colorValue.substring(1, 7) + const colorValueR = parseInt(cutHex.substring(0, 2), 16) + const colorValueG = parseInt(cutHex.substring(2, 4), 16) + const colorValueB = parseInt(cutHex.substring(4, 6), 16) + + const luminance = (0.299 * colorValueR + 0.587 * colorValueG + 0.114 * colorValueB) / 255 + + if (luminance > 0.5) { + return '#000000' + } else { + return '#FFFFFF' + } +} + +export function calculatePublishedDate(publishedText) { + const date = new Date() + if (publishedText === 'Live') { + return publishedText + } + + const textSplit = publishedText.split(' ') + + if (textSplit[0].toLowerCase() === 'streamed') { + textSplit.shift() + } + + const timeFrame = textSplit[1] + const timeAmount = parseInt(textSplit[0]) + let timeSpan = null + + if (timeFrame.indexOf('second') > -1) { + timeSpan = timeAmount * 1000 + } else if (timeFrame.indexOf('minute') > -1) { + timeSpan = timeAmount * 60000 + } else if (timeFrame.indexOf('hour') > -1) { + timeSpan = timeAmount * 3600000 + } else if (timeFrame.indexOf('day') > -1) { + timeSpan = timeAmount * 86400000 + } else if (timeFrame.indexOf('week') > -1) { + timeSpan = timeAmount * 604800000 + } else if (timeFrame.indexOf('month') > -1) { + timeSpan = timeAmount * 2592000000 + } else if (timeFrame.indexOf('year') > -1) { + timeSpan = timeAmount * 31556952000 + } + + return date.getTime() - timeSpan +} + +export function buildVTTFileLocally(storyboard) { + let vttString = 'WEBVTT\n\n' + // how many images are in one image + const numberOfSubImagesPerImage = storyboard.sWidth * storyboard.sHeight + // the number of storyboard images + const numberOfImages = Math.ceil(storyboard.count / numberOfSubImagesPerImage) + const intervalInSeconds = storyboard.interval / 1000 + let currentUrl = storyboard.url + let startHours = 0 + let startMinutes = 0 + let startSeconds = 0 + let endHours = 0 + let endMinutes = 0 + let endSeconds = intervalInSeconds + for (let i = 0; i < numberOfImages; i++) { + let xCoord = 0 + let yCoord = 0 + for (let j = 0; j < numberOfSubImagesPerImage; j++) { + // add the timestamp information + const paddedStartHours = startHours.toString().padStart(2, '0') + const paddedStartMinutes = startMinutes.toString().padStart(2, '0') + const paddedStartSeconds = startSeconds.toString().padStart(2, '0') + const paddedEndHours = endHours.toString().padStart(2, '0') + const paddedEndMinutes = endMinutes.toString().padStart(2, '0') + const paddedEndSeconds = endSeconds.toString().padStart(2, '0') + vttString += `${paddedStartHours}:${paddedStartMinutes}:${paddedStartSeconds}.000 --> ${paddedEndHours}:${paddedEndMinutes}:${paddedEndSeconds}.000\n` + // add the current image url as well as the x, y, width, height information + vttString += currentUrl + `#xywh=${xCoord},${yCoord},${storyboard.width},${storyboard.height}\n\n` + // update the variables + startHours = endHours + startMinutes = endMinutes + startSeconds = endSeconds + endSeconds += intervalInSeconds + if (endSeconds >= 60) { + endSeconds -= 60 + endMinutes += 1 + } + if (endMinutes >= 60) { + endMinutes -= 60 + endHours += 1 + } + // x coordinate can only be smaller than the width of one subimage * the number of subimages per row + xCoord = (xCoord + storyboard.width) % (storyboard.width * storyboard.sWidth) + // only if the x coordinate is , so in a new row, we have to update the y coordinate + if (xCoord === 0) { + yCoord += storyboard.height + } + } + // make sure that there is no value like M0 or M1 in the parameters that gets replaced + currentUrl = currentUrl.replace('M' + i.toString() + '.jpg', 'M' + (i + 1).toString() + '.jpg') + } + return vttString +} diff --git a/src/renderer/store/modules/profiles.js b/src/renderer/store/modules/profiles.js index 046f3224b565..7c189f55440b 100644 --- a/src/renderer/store/modules/profiles.js +++ b/src/renderer/store/modules/profiles.js @@ -1,5 +1,6 @@ import { MAIN_PROFILE_ID } from '../../../constants' import { DBProfileHandlers } from '../../../datastores/handlers/index' +import { calculateColorLuminance } from '../../helpers/utils' const state = { profileList: [{ @@ -53,7 +54,7 @@ const actions = { if (profiles.length === 0) { // Create a default profile and persist it const randomColor = await dispatch('getRandomColor') - const textColor = await dispatch('calculateColorLuminance', randomColor) + const textColor = calculateColorLuminance(randomColor) const defaultProfile = { _id: MAIN_PROFILE_ID, name: defaultName, diff --git a/src/renderer/store/modules/utils.js b/src/renderer/store/modules/utils.js index 7cd1d8cceb1d..d9073c9e737b 100644 --- a/src/renderer/store/modules/utils.js +++ b/src/renderer/store/modules/utils.js @@ -569,57 +569,6 @@ const actions = { commit('setRegionValues', regionValues) }, - calculateColorLuminance (_, colorValue) { - const cutHex = colorValue.substring(1, 7) - const colorValueR = parseInt(cutHex.substring(0, 2), 16) - const colorValueG = parseInt(cutHex.substring(2, 4), 16) - const colorValueB = parseInt(cutHex.substring(4, 6), 16) - - const luminance = (0.299 * colorValueR + 0.587 * colorValueG + 0.114 * colorValueB) / 255 - - if (luminance > 0.5) { - return '#000000' - } else { - return '#FFFFFF' - } - }, - - calculatePublishedDate(_, publishedText) { - const date = new Date() - - if (publishedText === 'Live') { - return publishedText - } - - const textSplit = publishedText.split(' ') - - if (textSplit[0].toLowerCase() === 'streamed') { - textSplit.shift() - } - - const timeFrame = textSplit[1] - const timeAmount = parseInt(textSplit[0]) - let timeSpan = null - - if (timeFrame.indexOf('second') > -1) { - timeSpan = timeAmount * 1000 - } else if (timeFrame.indexOf('minute') > -1) { - timeSpan = timeAmount * 60000 - } else if (timeFrame.indexOf('hour') > -1) { - timeSpan = timeAmount * 3600000 - } else if (timeFrame.indexOf('day') > -1) { - timeSpan = timeAmount * 86400000 - } else if (timeFrame.indexOf('week') > -1) { - timeSpan = timeAmount * 604800000 - } else if (timeFrame.indexOf('month') > -1) { - timeSpan = timeAmount * 2592000000 - } else if (timeFrame.indexOf('year') > -1) { - timeSpan = timeAmount * 31556952000 - } - - return date.getTime() - timeSpan - }, - getVideoParamsFromUrl (_, url) { /** @type {URL} */ let urlObject @@ -861,86 +810,6 @@ const actions = { } }, - padNumberWithLeadingZeros(_, payload) { - let numberString = payload.number.toString() - while (numberString.length < payload.length) { - numberString = '0' + numberString - } - return numberString - }, - - async buildVTTFileLocally ({ dispatch }, Storyboard) { - let vttString = 'WEBVTT\n\n' - // how many images are in one image - const numberOfSubImagesPerImage = Storyboard.sWidth * Storyboard.sHeight - // the number of storyboard images - const numberOfImages = Math.ceil(Storyboard.count / numberOfSubImagesPerImage) - const intervalInSeconds = Storyboard.interval / 1000 - let currentUrl = Storyboard.url - let startHours = 0 - let startMinutes = 0 - let startSeconds = 0 - let endHours = 0 - let endMinutes = 0 - let endSeconds = intervalInSeconds - for (let i = 0; i < numberOfImages; i++) { - let xCoord = 0 - let yCoord = 0 - for (let j = 0; j < numberOfSubImagesPerImage; j++) { - // add the timestamp information - const paddedStartHours = await dispatch('padNumberWithLeadingZeros', { - number: startHours, - length: 2 - }) - const paddedStartMinutes = await dispatch('padNumberWithLeadingZeros', { - number: startMinutes, - length: 2 - }) - const paddedStartSeconds = await dispatch('padNumberWithLeadingZeros', { - number: startSeconds, - length: 2 - }) - const paddedEndHours = await dispatch('padNumberWithLeadingZeros', { - number: endHours, - length: 2 - }) - const paddedEndMinutes = await dispatch('padNumberWithLeadingZeros', { - number: endMinutes, - length: 2 - }) - const paddedEndSeconds = await dispatch('padNumberWithLeadingZeros', { - number: endSeconds, - length: 2 - }) - vttString += `${paddedStartHours}:${paddedStartMinutes}:${paddedStartSeconds}.000 --> ${paddedEndHours}:${paddedEndMinutes}:${paddedEndSeconds}.000\n` - // add the current image url as well as the x, y, width, height information - vttString += currentUrl + `#xywh=${xCoord},${yCoord},${Storyboard.width},${Storyboard.height}\n\n` - // update the variables - startHours = endHours - startMinutes = endMinutes - startSeconds = endSeconds - endSeconds += intervalInSeconds - if (endSeconds >= 60) { - endSeconds -= 60 - endMinutes += 1 - } - if (endMinutes >= 60) { - endMinutes -= 60 - endHours += 1 - } - // x coordinate can only be smaller than the width of one subimage * the number of subimages per row - xCoord = (xCoord + Storyboard.width) % (Storyboard.width * Storyboard.sWidth) - // only if the x coordinate is , so in a new row, we have to update the y coordinate - if (xCoord === 0) { - yCoord += Storyboard.height - } - } - // make sure that there is no value like M0 or M1 in the parameters that gets replaced - currentUrl = currentUrl.replace('M' + i.toString() + '.jpg', 'M' + (i + 1).toString() + '.jpg') - } - return vttString - }, - toLocalePublicationString ({ dispatch }, payload) { if (payload.isLive) { return '0' + payload.liveStreamString diff --git a/src/renderer/views/ProfileEdit/ProfileEdit.js b/src/renderer/views/ProfileEdit/ProfileEdit.js index 1ffb531b2df8..6034fd1b0b03 100644 --- a/src/renderer/views/ProfileEdit/ProfileEdit.js +++ b/src/renderer/views/ProfileEdit/ProfileEdit.js @@ -5,6 +5,7 @@ import FtProfileEdit from '../../components/ft-profile-edit/ft-profile-edit.vue' import FtProfileChannelList from '../../components/ft-profile-channel-list/ft-profile-channel-list.vue' import FtProfileFilterChannelsList from '../../components/ft-profile-filter-channels-list/ft-profile-filter-channels-list.vue' import { MAIN_PROFILE_ID } from '../../../constants' +import { calculateColorLuminance } from '../../helpers/utils' export default Vue.extend({ name: 'ProfileEdit', @@ -60,7 +61,7 @@ export default Vue.extend({ if (profileType === 'newProfile') { this.isNew = true const bgColor = await this.getRandomColor() - const textColor = await this.calculateColorLuminance(bgColor) + const textColor = calculateColorLuminance(bgColor) this.profile = { name: '', bgColor: bgColor, @@ -88,8 +89,7 @@ export default Vue.extend({ methods: { ...mapActions([ 'showToast', - 'getRandomColor', - 'calculateColorLuminance' + 'getRandomColor' ]) } }) diff --git a/src/renderer/views/Subscriptions/Subscriptions.js b/src/renderer/views/Subscriptions/Subscriptions.js index 9c8f5f0ce61a..8ac29f6b94d5 100644 --- a/src/renderer/views/Subscriptions/Subscriptions.js +++ b/src/renderer/views/Subscriptions/Subscriptions.js @@ -11,6 +11,7 @@ import FtChannelBubble from '../../components/ft-channel-bubble/ft-channel-bubbl import ytch from 'yt-channel-info' import Parser from 'rss-parser' import { MAIN_PROFILE_ID } from '../../../constants' +import { calculatePublishedDate } from '../../helpers/utils' export default Vue.extend({ name: 'Subscriptions', @@ -254,20 +255,20 @@ export default Vue.extend({ getChannelVideosLocalScraper: function (channel, failedAttempts = 0) { return new Promise((resolve, reject) => { - ytch.getChannelVideos({ channelId: channel.id, sortBy: 'latest' }).then(async (response) => { + ytch.getChannelVideos({ channelId: channel.id, sortBy: 'latest' }).then((response) => { if (response.alertMessage) { this.errorChannels.push(channel) resolve([]) return } - const videos = await Promise.all(response.items.map(async (video) => { + const videos = response.items.map((video) => { if (video.liveNow) { video.publishedDate = new Date().getTime() } else { - video.publishedDate = await this.calculatePublishedDate(video.publishedText) + video.publishedDate = calculatePublishedDate(video.publishedText) } return video - })) + }) resolve(videos) }).catch((err) => { @@ -497,7 +498,6 @@ export default Vue.extend({ 'updateShowProgressBar', 'updateProfileSubscriptions', 'updateAllSubscriptionsList', - 'calculatePublishedDate', 'copyToClipboard' ]), diff --git a/src/renderer/views/Watch/Watch.js b/src/renderer/views/Watch/Watch.js index b68393451de8..f56ec2b0da3c 100644 --- a/src/renderer/views/Watch/Watch.js +++ b/src/renderer/views/Watch/Watch.js @@ -15,6 +15,7 @@ import WatchVideoPlaylist from '../../components/watch-video-playlist/watch-vide import WatchVideoRecommendations from '../../components/watch-video-recommendations/watch-video-recommendations.vue' import FtAgeRestricted from '../../components/ft-age-restricted/ft-age-restricted.vue' import i18n from '../../i18n/index' +import { buildVTTFileLocally } from '../../helpers/utils' const isDev = process.env.NODE_ENV === 'development' @@ -1347,8 +1348,8 @@ export default Vue.extend({ }) }) // TODO: MAKE A VARIABLE WHICH CAN CHOOSE BETWEEN STORYBOARD ARRAY ELEMENTS - this.buildVTTFileLocally(storyboardArray[1]).then(async (results) => { - const userData = await this.getUserDataPath() + const results = buildVTTFileLocally(storyboardArray[1]) + this.getUserDataPath().then((userData) => { let fileLocation let uriSchema @@ -1536,7 +1537,6 @@ export default Vue.extend({ ...mapActions([ 'showToast', - 'buildVTTFileLocally', 'updateHistory', 'updateWatchProgress', 'getUserDataPath', diff --git a/yarn.lock b/yarn.lock index 5c9b8cc33d1a..46cad1db61fc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6237,47 +6237,47 @@ lazystream@^1.0.0: dependencies: readable-stream "^2.0.5" -lefthook-darwin-arm64@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/lefthook-darwin-arm64/-/lefthook-darwin-arm64-1.1.1.tgz#2731ebbeea9ab6ba2e64e6aa77ab9ebc45ab1ba9" - integrity sha512-Vs+3kRgC8S8Vz4Xxug6u3wV24BpO3IG/R1D8mZYolHyrS60Nx24ZadV267BjYp7OPe+mwC4xZFwj388YJGF2Ew== +lefthook-darwin-arm64@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/lefthook-darwin-arm64/-/lefthook-darwin-arm64-1.1.2.tgz#4e55ca15d57b2fa1b227f6e7f4784baaf04d5c25" + integrity sha512-Pl9zj6zH8baREF7h0xlmDThsqYzH/MvuADxDAkec6AFKTdt879N8sNdOi9JwwvnlnlV5dcgk54JeUpiNOHSOig== -lefthook-darwin-x64@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/lefthook-darwin-x64/-/lefthook-darwin-x64-1.1.1.tgz#9a9273774a238a9e63ec922130836f912b6a3ba4" - integrity sha512-wrkg2NYBW/y5pnpiTplkn7mbvCe5hkoAUhag+xw6xVyti4GcS5uMFZEJdKzq+LajOK50DhfdmZ2nEud2XM6FQQ== +lefthook-darwin-x64@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/lefthook-darwin-x64/-/lefthook-darwin-x64-1.1.2.tgz#0d786c40bd27062578046e91c4ab4fdc3a931cac" + integrity sha512-Q7hn9babpYc3f8mk+0Q1Rrw4Tjgdof9UyMpnKbDJRIgLlIIEieDQPCXSon7zvSIRgt19km716bB5kkXeCGTldg== -lefthook-linux-arm64@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/lefthook-linux-arm64/-/lefthook-linux-arm64-1.1.1.tgz#2abe1fd01ab9429029618be7d1a7a7734a0c56ce" - integrity sha512-CkGPQroJ9jBnW4fwnuHimbKNgR1vbSqBEdQXyZxRg3VGoKoN6Np1LGzcLGu3ySMshaYNqnavGdkp6F86deN5qA== +lefthook-linux-arm64@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/lefthook-linux-arm64/-/lefthook-linux-arm64-1.1.2.tgz#7ff416acf3fd070d3683d8dca2f12689d9cf5e9c" + integrity sha512-qwXMpwm2a4nQqCokOpZ9Qq+eq0mO3Rt7eq5tmeXkm5+LyUjn0VBlDbcJiDyFsUHr9LtDGdgx2+izZusx672jbw== -lefthook-linux-x64@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/lefthook-linux-x64/-/lefthook-linux-x64-1.1.1.tgz#b50f9c7fca669bdac728bd2241c85eeaebcc5730" - integrity sha512-dmETuxz1Jja2wg2G+NOCKwbrNKanjWkFd1XVSfIisX4tYMLbCesqL7ZosL9rI06SOEDulTZHdmfNj7aEDUPpog== +lefthook-linux-x64@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/lefthook-linux-x64/-/lefthook-linux-x64-1.1.2.tgz#f8ae79407b55a4b79c15a37a2a740aa203ac4999" + integrity sha512-eSyiOv4ux19EawgRa6z0K/xQnaHf+9q+qvMjtruDAOVXPRGM1+9LUmKQc5YrW9xN64iMUfN9twn0XoQYM3EPOA== -lefthook-windows-arm64@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/lefthook-windows-arm64/-/lefthook-windows-arm64-1.1.1.tgz#b9cb52a8f893eda420663d5a3d687be74f8d01fa" - integrity sha512-RaAJFATYuWmbLaHZlcfXR1JsiDu6KCuaXb8W1pJVI+3vXNx9bueVL4ps6KZGxSwnktrdH3pFjbYs88qmsQ5zBw== +lefthook-windows-arm64@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/lefthook-windows-arm64/-/lefthook-windows-arm64-1.1.2.tgz#afa6e29f7298568c87c00bf4d5a576816c5cd575" + integrity sha512-wXp9/NjjOPjO/eES6rcCt3F0Zg3ETSJmV7niu9640CiNhoR99OjgVLq5WMOsS7qkVP8AU8X1M4qsv+Gsle6xYQ== -lefthook-windows-x64@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/lefthook-windows-x64/-/lefthook-windows-x64-1.1.1.tgz#440268207d61d11e6a51375266737d18728f1f27" - integrity sha512-zOI1iCnc5U7LS7nHj2raneeviSYHLXzgksrV7Ain+W1F6bYpS+1k5PqCQuLfEspsQYfJGiJo1SeueIcoIzqtiQ== +lefthook-windows-x64@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/lefthook-windows-x64/-/lefthook-windows-x64-1.1.2.tgz#7adefc1f9eeb9c4ca4483dff5dda1b25e3c20979" + integrity sha512-tiTeS0OkHSMj1bp0yznw6dCTiofjb02E2i9K7Cice+3fTooxvem8F1oUFXL07Rmlgj/rZwAMzVRUGB7l8UMwXg== -lefthook@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/lefthook/-/lefthook-1.1.1.tgz#4439d12da0a83833254c52fb74a0bec591b1c45b" - integrity sha512-IRhJHWEwLlN+FHJnIBamgaIcr53C4iskN+uZ3yzqhoFcaO7kWtmzW3DIPCB48mzlCIOFnjfPvVLX0SyPdkWQCw== +lefthook@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/lefthook/-/lefthook-1.1.2.tgz#738000fcda47a8400df613e792552d0f552acc51" + integrity sha512-iAci+XquzXG87RWtTUxbbeY9MEu9MeIWARRr2ZbyP41Wm/QYx38BWUNzmxdc4qBEqP14gnrAqw8JoXkP4rW3qQ== optionalDependencies: - lefthook-darwin-arm64 "1.1.1" - lefthook-darwin-x64 "1.1.1" - lefthook-linux-arm64 "1.1.1" - lefthook-linux-x64 "1.1.1" - lefthook-windows-arm64 "1.1.1" - lefthook-windows-x64 "1.1.1" + lefthook-darwin-arm64 "1.1.2" + lefthook-darwin-x64 "1.1.2" + lefthook-linux-arm64 "1.1.2" + lefthook-linux-x64 "1.1.2" + lefthook-windows-arm64 "1.1.2" + lefthook-windows-x64 "1.1.2" levn@^0.4.1: version "0.4.1" @@ -6666,10 +6666,10 @@ min-document@^2.19.0: dependencies: dom-walk "^0.1.0" -mini-css-extract-plugin@^2.2.2: - version "2.6.0" - resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-2.6.0.tgz#578aebc7fc14d32c0ad304c2c34f08af44673f5e" - integrity sha512-ndG8nxCEnAemsg4FSgS+yNyHKgkTB4nPKqCOgh65j3/30qqC5RaSQQXMm++Y6sb6E1zRSxPkztj9fqxhS1Eo6w== +mini-css-extract-plugin@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-2.6.1.tgz#9a1251d15f2035c342d99a468ab9da7a0451b71e" + integrity sha512-wd+SD57/K6DiV7jIR34P+s3uckTRuQvx0tKPcvjFlrEylk6P4mQ2KSWk1hblj1Kxaqok7LogKOieygXqBczNlg== dependencies: schema-utils "^4.0.0" @@ -10203,10 +10203,10 @@ youtube-suggest@^1.2.0: node-fetch "^2.6.0" smol-jsonp "^1.0.0" -yt-channel-info@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/yt-channel-info/-/yt-channel-info-3.1.0.tgz#a37c98838d78a9643e7d1efc3a7fdb3b51a6b3bd" - integrity sha512-XofGVuocgXxzIDVgEFQw4ZOs4e1hIobmBKnv51YMARg+/RBjSO3sU5AQHgcG43n5apuzAb0k0XnEN+/DyYWC2A== +yt-channel-info@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yt-channel-info/-/yt-channel-info-3.1.1.tgz#6ffc9c2fbbaa677600828cb511bff88eee6391f1" + integrity sha512-Of2ED2DM7eJOMY0wVDKwxvSo4xFDcvuuVSCf5jKgQON0XwdREVofxPjzCGC1Fh5ubK1pxZbnjhamMvbxvxyWIA== dependencies: axios "^0.27.2"