Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
PrestonN committed Jan 22, 2021
2 parents 2e23846 + 4135f50 commit cc780fa
Show file tree
Hide file tree
Showing 34 changed files with 1,418 additions and 365 deletions.
3 changes: 2 additions & 1 deletion _scripts/webpack.web.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ const config = {
fs: 'empty',
net: 'empty',
tls: 'empty',
child_process: 'empty'
child_process: 'empty',
dns: 'empty'
},
plugins: [
// new WriteFilePlugin(),
Expand Down
396 changes: 285 additions & 111 deletions package-lock.json

Large diffs are not rendered by default.

33 changes: 18 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
"bulma-pro": "^0.2.0",
"dateformat": "^4.4.1",
"electron-context-menu": "^2.4.0",
"http-proxy-agent": "^4.0.1",
"https-proxy-agent": "^5.0.0",
"jquery": "^3.5.1",
"js-yaml": "^4.0.0",
"lodash.debounce": "^4.0.8",
Expand All @@ -27,6 +29,7 @@
"nedb": "^1.8.0",
"opml-to-json": "1.0.1",
"rss-parser": "^3.10.0",
"socks-proxy-agent": "^5.0.0",
"video.js": "7.10.2",
"videojs-abloop": "^1.2.0",
"videojs-contrib-quality-levels": "^2.0.9",
Expand All @@ -36,21 +39,21 @@
"videojs-vtt-thumbnails-freetube": "0.0.15",
"vue": "^2.6.12",
"vue-electron": "^1.0.6",
"vue-i18n": "^8.22.3",
"vue-i18n": "^8.22.4",
"vue-observe-visibility": "^1.0.0",
"vue-router": "^3.4.9",
"vuex": "^3.6.0",
"xml2json": "^0.12.0",
"youtube-chat": "^1.1.0",
"youtube-suggest": "^1.1.0",
"yt-channel-info": "^1.2.0",
"yt-comment-scraper": "^1.3.11",
"yt-dash-manifest-generator": "^1.1.0",
"yt-trending-scraper": "1.0.4",
"yt-comment-scraper": "^2.0.0",
"yt-dash-manifest-generator": "1.1.0",
"yt-trending-scraper": "1.1.0",
"yt-xml2vtt": "^1.2.0",
"ytdl-core": "^4.4.3",
"ytdl-core": "^4.4.4",
"ytpl": "^2.0.4",
"ytsr": "^3.2.1"
"ytsr": "^3.2.2"
},
"description": "A private YouTube client",
"devDependencies": {
Expand All @@ -59,29 +62,29 @@
"@babel/plugin-proposal-object-rest-spread": "^7.12.1",
"@babel/preset-env": "^7.12.11",
"@babel/preset-typescript": "^7.12.7",
"@typescript-eslint/eslint-plugin": "^4.13.0",
"@typescript-eslint/parser": "^4.13.0",
"@typescript-eslint/eslint-plugin": "^4.14.0",
"@typescript-eslint/parser": "^4.14.0",
"acorn": "^8.0.4",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.2.2",
"copy-webpack-plugin": "6.4.0",
"css-loader": "^5.0.1",
"devtron": "^1.4.0",
"electron": "^11.1.1",
"electron": "11.1.1",
"electron-builder": "^22.9.1",
"electron-builder-squirrel-windows": "^22.10.4",
"electron-debug": "^3.2.0",
"electron-rebuild": "^2.3.4",
"eslint": "^7.17.0",
"eslint-config-prettier": "^7.1.0",
"eslint": "^7.18.0",
"eslint-config-prettier": "^7.2.0",
"eslint-config-standard": "^16.0.2",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^5.0.0",
"eslint-plugin-vue": "^7.4.1",
"fast-glob": "^3.2.4",
"fast-glob": "^3.2.5",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^4.5.1",
"jest": "^26.6.3",
Expand All @@ -90,14 +93,14 @@
"node-loader": "^1.0.2",
"npm-run-all": "^4.1.5",
"prettier": "^2.2.1",
"sass": "^1.32.4",
"sass": "^1.32.5",
"sass-loader": "^10.1.1",
"style-loader": "^2.0.0",
"tree-kill": "1.2.2",
"typescript": "^4.1.3",
"url-loader": "^4.1.1",
"vue-devtools": "^5.1.4",
"vue-eslint-parser": "^7.3.0",
"vue-eslint-parser": "^7.4.1",
"vue-loader": "^15.9.6",
"vue-style-loader": "^4.1.2",
"vue-template-compiler": "^2.6.12",
Expand Down Expand Up @@ -143,5 +146,5 @@
"test": "run-s rebuild:node pack:workers jest",
"test:watch": "run-s rebuild:node pack:workers jest:watch"
},
"version": "0.11.1"
"version": "0.11.2"
}
21 changes: 9 additions & 12 deletions src/renderer/components/data-settings/data-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import FtPrompt from '../ft-prompt/ft-prompt.vue'

import { remote } from 'electron'
import fs from 'fs'
import opmlToJson from 'opml-to-json'
import { opmlToJSON } from 'opml-to-json'
import ytch from 'yt-channel-info'

const app = remote.app
Expand Down Expand Up @@ -357,17 +357,7 @@ export default Vue.extend({
return
}

opmlToJson(data, async (err, json) => {
if (err) {
console.log(err)
console.log('error reading')
const message = this.$t('Settings.Data Settings.Invalid subscriptions file')
this.showToast({
message: `${message}: ${err}`
})
return
}

opmlToJSON(data).then((json) => {
let feedData = json.children[0].children

if (typeof feedData === 'undefined') {
Expand Down Expand Up @@ -442,6 +432,13 @@ export default Vue.extend({
this.updateShowProgressBar(false)
}
})
}).catch((err) => {
console.log(err)
console.log('error reading')
const message = this.$t('Settings.Data Settings.Invalid subscriptions file')
this.showToast({
message: `${message}: ${err}`
})
})
})
})
Expand Down
24 changes: 22 additions & 2 deletions src/renderer/components/ft-video-player/ft-video-player.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ export default Vue.extend({
maxFramerate: 0,
activeSourceList: [],
mouseTimeout: null,
touchTimeout: null,
lastTouchTime: null,
dataSetup: {
fluid: true,
nativeTextTracks: false,
Expand Down Expand Up @@ -116,7 +118,6 @@ export default Vue.extend({
2.25,
2.5,
2.75,
2.75,
3
]
}
Expand Down Expand Up @@ -284,7 +285,7 @@ export default Vue.extend({
return
}

if (videoWidth < videoHeight) {
if ((videoWidth - videoHeight) <= 240) {
this.player.fluid(false)
this.player.aspectRatio('16:9')
}
Expand Down Expand Up @@ -719,6 +720,25 @@ export default Vue.extend({
}
},

handleTouchStart: function (event) {
const v = this
this.touchPauseTimeout = setTimeout(() => {
v.togglePlayPause()
}, 1000)

const touchTime = new Date()

if (this.lastTouchTime !== null && (touchTime.getTime() - this.lastTouchTime.getTime()) < 250) {
this.toggleFullscreen()
}

this.lastTouchTime = touchTime
},

handleTouchEnd: function (event) {
clearTimeout(this.touchPauseTimeout)
},

keyboardShortcutHandler: function (event) {
const activeInputs = $('.ft-input')

Expand Down
2 changes: 2 additions & 0 deletions src/renderer/components/ft-video-player/ft-video-player.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
controls
preload="auto"
:data-setup="JSON.stringify(dataSetup)"
@touchstart="handleTouchStart"
@touchend="handleTouchEnd"
>
<source
v-for="(source, index) in activeSourceList"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export default Vue.extend({
}
},
mounted: function () {
const requestUrl = 'https://instances.invidio.us/instances.json'
const requestUrl = 'https://api.invidious.io/instances.json'
$.getJSON(requestUrl, (response) => {
console.log(response)
const instances = response.filter((instance) => {
Expand Down
7 changes: 7 additions & 0 deletions src/renderer/components/general-settings/general-settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@
@input="handleInvidiousInstanceInput"
/>
</ft-flex-box>
<ft-flex-box>
<a
href="https://api.invidious.io"
>
{{ $t('Settings.General Settings.View all Invidious instance information') }}
</a>
</ft-flex-box>
</ft-card>
</template>

Expand Down
Loading

0 comments on commit cc780fa

Please sign in to comment.