Skip to content

Commit 5fd154f

Browse files
committed
Merge branch 'development'
2 parents cc06999 + 0cd8dc6 commit 5fd154f

File tree

111 files changed

+4668
-948
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+4668
-948
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ jobs:
147147
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
148148
with:
149149
upload_url: https://uploads.github.com/repos/FreeTubeApp/FreeTube/releases/${{ secrets.UPLOAD_ID }}/assets{?name,label}
150-
asset_name: freetube-${{ env.PACKAGE_VERSION }}-win-x64-portable
150+
asset_name: freetube-${{ env.PACKAGE_VERSION }}-win-x64-portable.zip
151151
asset_path: build/freetube-${{ env.PACKAGE_VERSION }}-win.zip
152152
asset_content_type: application/zip
153153

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ coverage
2020
__coverage__
2121
csak-timelog.json
2222
.idea/
23+
debug/

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ addressed.
1414

1515
### Browser Extension
1616

17-
Download our browser extension so that you can click on videos in your browser and have them automatically open up in FreeTube.
17+
FreeTube is supported by the [Privacy Redirect](https://github.com/SimonBrazell/privacy-redirect) extension, which will allow you to open YouTube links into FreeTube. You must enable the option within the advanced settings for it to work.
1818

19-
[Download for Firefox](https://addons.mozilla.org/en-US/firefox/addon/freetube-redirect/)
19+
Download Privacy Redirect for [Firefox](https://addons.mozilla.org/en-US/firefox/addon/privacy-redirect/) or [Google Chrome](https://chrome.google.com/webstore/detail/privacy-redirect/pmcmeagblkinmogikoikkdjiligflglb).
2020

21-
[Instructions for Google Chrome](https://github.com/FreeTubeApp/FreeTube/wiki/Browser-Extension)
21+
If you have issues with the extension working with FreeTube, please create an issue in this repository instead of the extension repository.
2222

2323
## How does it work?
2424
FreeTube uses a built in extractor to grab and serve data / videos. The [Invidious API](https://github.com/iv-org/invidious) can also optionally be used. FreeTube does not use any official APIs to obtain data. While YouTube can still see your video requests, it can no
@@ -34,6 +34,7 @@ to hide your IP while using FreeTube.
3434
* Two extractor APIs to choose from (Built in or Invidious)
3535
* Subscribe to channels without an account
3636
* Local subscriptions, history, and saved videos
37+
* Organize your subscriptions into "Profiles" to create a more focused feed
3738
* Export & import subscriptions
3839
* Open videos from your browser directly into FreeTube (with extension)
3940
* Mini Player
@@ -47,12 +48,12 @@ to hide your IP while using FreeTube.
4748

4849
[FreeTube Website](https://freetubeapp.io/#download)
4950

51+
Flatpak on Flathub: [Download](https://flathub.org/apps/details/io.freetubeapp.FreeTube) [Source](https://github.com/flathub/io.freetubeapp.FreeTube)
52+
5053
### Unofficial Downloads
5154

5255
These builds are maintained by the community. While they should be safe, download at your own risk. There may be issues with using these versus the official builds. Any issues specific with these builds should be sent to their respective maintainer.
5356

54-
Flatpak on Flathub: [Download](https://flathub.org/apps/details/io.freetubeapp.FreeTube) [Source](https://github.com/flathub/io.freetubeapp.FreeTube)
55-
5657
Arch User Repository (AUR): [Download](https://aur.archlinux.org/packages/freetube-bin/)
5758

5859
Chocolatey: [Download](https://chocolatey.org/packages/freetube/)
@@ -87,7 +88,7 @@ We are actively looking for translations! We use Weblate to make it easy for tr
8788

8889
## Contact
8990

90-
If you ever have any questions, feel free to make an issue here on GitHub. Alternatively, you can email me at [email protected] or you can join our [Matrix Community](https://riot.im/app/#/group/+freetube:matrix.org). Don't forget to check out the [rules](https://github.com/FreeTubeApp/FreeTube/wiki/Matrix-Server-Info-&-Rules) before joining.
91+
If you ever have any questions, feel free to make an issue here on GitHub. Alternatively, you can email me at [email protected] or you can join our [Matrix Community](https://matrix.to/#/+freetube:matrix.org). Don't forget to check out the [rules](https://github.com/FreeTubeApp/FreeTube/wiki/Matrix-Server-Info-&-Rules) before joining.
9192

9293
You can also stay up to date by reading the [FreeTube Blog](https://write.as/freetube/). [View the welcome blog](https://write.as/freetube/welcome-to-freetube-blogs).
9394

package-lock.json

Lines changed: 933 additions & 509 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,24 @@
88
"url": "https://github.com/FreeTubeApp/FreeTube/issues"
99
},
1010
"dependencies": {
11-
"@fortawesome/fontawesome-svg-core": "^1.2.32",
12-
"@fortawesome/free-solid-svg-icons": "^5.15.1",
13-
"@fortawesome/vue-fontawesome": "^2.0.0",
11+
"@fortawesome/fontawesome-svg-core": "^1.2.34",
12+
"@fortawesome/free-brands-svg-icons": "^5.15.2",
13+
"@fortawesome/free-solid-svg-icons": "^5.15.2",
14+
"@fortawesome/vue-fontawesome": "^2.0.2",
1415
"@silvermine/videojs-quality-selector": "^1.2.4",
1516
"autolinker": "^3.14.2",
1617
"bulma-pro": "^0.2.0",
17-
"dateformat": "^4.3.1",
18-
"electron-context-menu": "^2.3.0",
18+
"dateformat": "^4.4.1",
19+
"electron-context-menu": "^2.4.0",
1920
"jquery": "^3.5.1",
20-
"js-yaml": "^3.14.1",
21+
"js-yaml": "^4.0.0",
2122
"lodash.debounce": "^4.0.8",
2223
"lodash.isequal": "^4.5.0",
2324
"lodash.uniqwith": "^4.5.0",
2425
"markdown": "^0.5.0",
2526
"material-design-icons": "^3.0.1",
2627
"nedb": "^1.8.0",
27-
"opml-to-json": "0.0.3",
28+
"opml-to-json": "1.0.1",
2829
"rss-parser": "^3.10.0",
2930
"video.js": "7.10.2",
3031
"videojs-abloop": "^1.2.0",
@@ -35,74 +36,74 @@
3536
"videojs-vtt-thumbnails-freetube": "0.0.15",
3637
"vue": "^2.6.12",
3738
"vue-electron": "^1.0.6",
38-
"vue-i18n": "^8.22.2",
39-
"vue-observe-visibility": "^0.4.6",
39+
"vue-i18n": "^8.22.3",
40+
"vue-observe-visibility": "^1.0.0",
4041
"vue-router": "^3.4.9",
4142
"vuex": "^3.6.0",
4243
"xml2json": "^0.12.0",
4344
"youtube-chat": "^1.1.0",
4445
"youtube-suggest": "^1.1.0",
45-
"yt-channel-info": "^1.1.4",
46-
"yt-comment-scraper": "^1.3.10",
46+
"yt-channel-info": "^1.2.0",
47+
"yt-comment-scraper": "^1.3.11",
4748
"yt-dash-manifest-generator": "^1.1.0",
48-
"yt-trending-scraper": "^1.0.4",
49-
"yt-xml2vtt": "^1.1.3",
50-
"ytdl-core": "^4.2.0",
51-
"ytpl": "^2.0.3",
52-
"ytsr": "^3.0.0"
49+
"yt-trending-scraper": "^1.0.5",
50+
"yt-xml2vtt": "^1.2.0",
51+
"ytdl-core": "^4.4.3",
52+
"ytpl": "^2.0.4",
53+
"ytsr": "^3.2.1"
5354
},
5455
"description": "A private YouTube client",
5556
"devDependencies": {
5657
"@babel/core": "^7.12.10",
5758
"@babel/plugin-proposal-class-properties": "^7.12.1",
5859
"@babel/plugin-proposal-object-rest-spread": "^7.12.1",
59-
"@babel/preset-env": "^7.12.10",
60+
"@babel/preset-env": "^7.12.11",
6061
"@babel/preset-typescript": "^7.12.7",
61-
"@typescript-eslint/eslint-plugin": "^4.10.0",
62-
"@typescript-eslint/parser": "^4.10.0",
62+
"@typescript-eslint/eslint-plugin": "^4.13.0",
63+
"@typescript-eslint/parser": "^4.13.0",
6364
"acorn": "^8.0.4",
6465
"babel-eslint": "^10.1.0",
6566
"babel-loader": "^8.2.2",
6667
"copy-webpack-plugin": "6.4.0",
6768
"css-loader": "^5.0.1",
6869
"devtron": "^1.4.0",
69-
"electron": "^11.1.0",
70+
"electron": "^11.1.1",
7071
"electron-builder": "^22.9.1",
71-
"electron-builder-squirrel-windows": "^22.10.3",
72-
"electron-debug": "^3.1.0",
72+
"electron-builder-squirrel-windows": "^22.10.4",
73+
"electron-debug": "^3.2.0",
7374
"electron-rebuild": "^2.3.4",
74-
"eslint": "^7.15.0",
75-
"eslint-config-prettier": "^7.0.0",
75+
"eslint": "^7.17.0",
76+
"eslint-config-prettier": "^7.1.0",
7677
"eslint-config-standard": "^16.0.2",
7778
"eslint-plugin-import": "^2.22.1",
7879
"eslint-plugin-node": "^11.1.0",
79-
"eslint-plugin-prettier": "^3.3.0",
80+
"eslint-plugin-prettier": "^3.3.1",
8081
"eslint-plugin-promise": "^4.2.1",
8182
"eslint-plugin-standard": "^5.0.0",
82-
"eslint-plugin-vue": "^7.2.0",
83+
"eslint-plugin-vue": "^7.4.1",
8384
"fast-glob": "^3.2.4",
8485
"file-loader": "^6.2.0",
85-
"html-webpack-plugin": "^4.5.0",
86+
"html-webpack-plugin": "^4.5.1",
8687
"jest": "^26.6.3",
87-
"mini-css-extract-plugin": "^1.3.3",
88+
"mini-css-extract-plugin": "^1.3.4",
8889
"node-abi": "^2.19.3",
8990
"node-loader": "^1.0.2",
9091
"npm-run-all": "^4.1.5",
9192
"prettier": "^2.2.1",
92-
"sass": "^1.30.0",
93-
"sass-loader": "^10.1.0",
93+
"sass": "^1.32.4",
94+
"sass-loader": "^10.1.1",
9495
"style-loader": "^2.0.0",
9596
"tree-kill": "1.2.2",
9697
"typescript": "^4.1.3",
9798
"url-loader": "^4.1.1",
9899
"vue-devtools": "^5.1.4",
99100
"vue-eslint-parser": "^7.3.0",
100-
"vue-loader": "^15.9.5",
101+
"vue-loader": "^15.9.6",
101102
"vue-style-loader": "^4.1.2",
102103
"vue-template-compiler": "^2.6.12",
103104
"webpack": "4.44.2",
104105
"webpack-cli": "3.3.12",
105-
"webpack-dev-server": "^3.11.0"
106+
"webpack-dev-server": "^3.11.2"
106107
},
107108
"license": "AGPL-3.0-or-later",
108109
"main": "./dist/main.js",
@@ -142,5 +143,5 @@
142143
"test": "run-s rebuild:node pack:workers jest",
143144
"test:watch": "run-s rebuild:node pack:workers jest:watch"
144145
},
145-
"version": "0.10.0"
146+
"version": "0.11.0"
146147
}

src/main/index.js

Lines changed: 104 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -65,21 +65,57 @@ if (!isDev) {
6565
})
6666

6767
app.on('ready', (event, commandLine, workingDirectory) => {
68-
settingsDb.findOne({
69-
_id: 'disableSmoothScrolling'
68+
settingsDb.find({
69+
$or: [
70+
{ _id: 'disableSmoothScrolling' },
71+
{ _id: 'useProxy' },
72+
{ _id: 'proxyProtocol' },
73+
{ _id: 'proxyHostname' },
74+
{ _id: 'proxyPort' }
75+
]
7076
}, function (err, doc) {
7177
if (err) {
7278
app.exit(0)
7379
return
7480
}
7581

76-
if (doc !== null && doc.value) {
82+
let disableSmoothScrolling = false
83+
let useProxy = false
84+
let proxyProtocol = 'socks5'
85+
let proxyHostname = '127.0.0.1'
86+
let proxyPort = '9050'
87+
88+
if (typeof doc === 'object' && doc.length > 0) {
89+
doc.forEach((dbItem) => {
90+
switch (dbItem._id) {
91+
case 'disableSmoothScrolling':
92+
disableSmoothScrolling = dbItem.value
93+
break
94+
case 'useProxy':
95+
useProxy = dbItem.value
96+
break
97+
case 'proxyProtocol':
98+
proxyProtocol = dbItem.value
99+
break
100+
case 'proxyHostname':
101+
proxyHostname = dbItem.value
102+
break
103+
case 'proxyPort':
104+
proxyPort = dbItem.value
105+
break
106+
}
107+
})
108+
}
109+
110+
if (disableSmoothScrolling) {
77111
app.commandLine.appendSwitch('disable-smooth-scrolling')
78112
} else {
79113
app.commandLine.appendSwitch('enable-smooth-scrolling')
80114
}
81115

82-
createWindow()
116+
const proxyUrl = `${proxyProtocol}://${proxyHostname}:${proxyPort}`
117+
118+
createWindow(useProxy, proxyUrl)
83119

84120
if (isDev) {
85121
installDevTools()
@@ -99,21 +135,57 @@ if (!isDev) {
99135
})
100136

101137
app.on('ready', () => {
102-
settingsDb.findOne({
103-
_id: 'disableSmoothScrolling'
138+
settingsDb.find({
139+
$or: [
140+
{ _id: 'disableSmoothScrolling' },
141+
{ _id: 'useProxy' },
142+
{ _id: 'proxyProtocol' },
143+
{ _id: 'proxyHostname' },
144+
{ _id: 'proxyPort' }
145+
]
104146
}, function (err, doc) {
105147
if (err) {
106148
app.exit(0)
107149
return
108150
}
109151

110-
if (doc !== null && doc.value) {
152+
let disableSmoothScrolling = false
153+
let useProxy = false
154+
let proxyProtocol = 'socks5'
155+
let proxyHostname = '127.0.0.1'
156+
let proxyPort = '9050'
157+
158+
if (typeof doc === 'object' && doc.length > 0) {
159+
doc.forEach((dbItem) => {
160+
switch (dbItem._id) {
161+
case 'disableSmoothScrolling':
162+
disableSmoothScrolling = dbItem.value
163+
break
164+
case 'useProxy':
165+
useProxy = dbItem.value
166+
break
167+
case 'proxyProtocol':
168+
proxyProtocol = dbItem.value
169+
break
170+
case 'proxyHostname':
171+
proxyHostname = dbItem.value
172+
break
173+
case 'proxyPort':
174+
proxyPort = dbItem.value
175+
break
176+
}
177+
})
178+
}
179+
180+
if (disableSmoothScrolling) {
111181
app.commandLine.appendSwitch('disable-smooth-scrolling')
112182
} else {
113183
app.commandLine.appendSwitch('enable-smooth-scrolling')
114184
}
115185

116-
createWindow()
186+
const proxyUrl = `${proxyProtocol}://${proxyHostname}:${proxyPort}`
187+
188+
createWindow(useProxy, proxyUrl)
117189

118190
if (isDev) {
119191
installDevTools()
@@ -137,7 +209,7 @@ async function installDevTools () {
137209
}
138210
}
139211

140-
function createWindow () {
212+
function createWindow (useProxy = false, proxyUrl = '') {
141213
/**
142214
* Initial window options
143215
*/
@@ -164,6 +236,12 @@ function createWindow () {
164236
height: 800
165237
})
166238

239+
if (useProxy) {
240+
mainWindow.webContents.session.setProxy({
241+
proxyRules: proxyUrl
242+
})
243+
}
244+
167245
settingsDb.findOne({
168246
_id: 'bounds'
169247
}, function (err, doc) {
@@ -264,6 +342,17 @@ function createWindow () {
264342
mainWindow.close()
265343
createWindow()
266344
})
345+
346+
ipcMain.on('enableProxy', (event, url) => {
347+
console.log(url)
348+
mainWindow.webContents.session.setProxy({
349+
proxyRules: url
350+
})
351+
})
352+
353+
ipcMain.on('disableProxy', () => {
354+
mainWindow.webContents.session.setProxy({})
355+
})
267356
}
268357

269358
app.on('window-all-closed', () => {
@@ -306,7 +395,8 @@ app.on('open-url', (event, url) => {
306395
})
307396

308397
/*
309-
* Check if we were passed a freetube:// URL on process startup (linux/win)
398+
* Check if an argument was passed and send it over to the GUI (Linux / Windows).
399+
* Remove freetube:// protocol if present
310400
*/
311401
const url = getLinkUrl(process.argv)
312402
if (url) {
@@ -318,12 +408,11 @@ function baseUrl(arg) {
318408
}
319409

320410
function getLinkUrl(argv) {
321-
for (const arg of argv) {
322-
if (arg.indexOf('freetube://') !== -1) {
323-
return baseUrl(arg)
324-
}
411+
if (argv.length > 1) {
412+
return baseUrl(argv[argv.length - 1])
413+
} else {
414+
return null
325415
}
326-
return null
327416
}
328417

329418
/**

0 commit comments

Comments
 (0)