Skip to content

Commit

Permalink
Merge branch 'development' into feature/history/remember-search-query
Browse files Browse the repository at this point in the history
* development: (120 commits)
  Update version number to v0.21.0
  Remove limited donation methods (#5290)
  Translated using Weblate (Portuguese)
  Translated using Weblate (Portuguese (Portugal))
  Avoid cloning all profiles when subscribing and unsubscribing (#5289)
  Fix arrow keys not working in the Create New Playlist prompt (#5243)
  Bump ws from 8.16.0 to 8.17.1 (#5291)
  Remove a few bits of unused code (#5287)
  Update About page to display correct Freetube logo based on currently set theme (#5126)
  Translated using Weblate (Croatian)
  * Update playlist page titles (#5271)
  Update Invidious instances list (#5288)
  Translated using Weblate (Polish)
  Bump the eslint group with 2 updates (#5275)
  Bump marked from 12.0.2 to 13.0.0 (#5276)
  Bump sass from 1.77.4 to 1.77.5 (#5277)
  Bump lefthook from 1.6.15 to 1.6.16 (#5279)
  Bump webpack from 5.91.0 to 5.92.0 (#5278)
  Update Flatpak PR Workflow to work with updated module (#5270)
  Translated using Weblate (Portuguese)
  ...
  • Loading branch information
PikachuEXE committed Jun 20, 2024
2 parents cfbda54 + f40876c commit 3c71c71
Show file tree
Hide file tree
Showing 87 changed files with 2,738 additions and 1,608 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ module.exports = {
ignoreText: ['-', '•', '/', 'YouTube', 'Invidious', 'FreeTube']
}
],
// Only applicable when we upgrade to Vue 3 and vue-i18n 9+
'@intlify/vue-i18n/no-deprecated-tc': 'off',

'vue/require-explicit-emits': 'error',
'vue/no-unused-emit-declarations': 'error',
},
Expand Down
3 changes: 0 additions & 3 deletions .github/FUNDING.yml

This file was deleted.

16 changes: 8 additions & 8 deletions .github/workflows/flatpak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,25 +77,25 @@ jobs:
date +"%Y-%m-%d" >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- name: Update x64 File Location in yml File
uses: mikefarah/yq@4.0.0-beta1
uses: mikefarah/yq@v4.44.2
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'
cmd: yq -i '.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"' io.freetubeapp.FreeTube.yml
- name: Update x64 Hash in yml File
uses: mikefarah/yq@4.0.0-beta1
uses: mikefarah/yq@v4.44.2
with:
# The Command which should be run
cmd: yq w -i io.freetubeapp.FreeTube.yml modules[0].sources[0].sha256 ${{ env.HASH_X64 }}
cmd: yq -i '.modules[0].sources[0].sha256 = "${{ env.HASH_X64 }}"' io.freetubeapp.FreeTube.yml
- name: Update ARM File Location in yml File
uses: mikefarah/yq@4.0.0-beta1
uses: mikefarah/yq@v4.44.2
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'
cmd: yq -i '.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"' io.freetubeapp.FreeTube.yml
- name: Update ARM Hash in yml File
uses: mikefarah/yq@4.0.0-beta1
uses: mikefarah/yq@v4.44.2
with:
# The Command which should be run
cmd: yq w -i io.freetubeapp.FreeTube.yml modules[0].sources[1].sha256 ${{ env.HASH_ARM64 }}
cmd: yq -i '.modules[0].sources[1].sha256 = "${{ env.HASH_ARM64 }}"' io.freetubeapp.FreeTube.yml
- name: Add Patch Notes to XML File
run: xmlstarlet ed -L -i /application/releases/release[1] -t elem -n releaseTMP -v "" -i //releaseTMP -t attr -n version -v "${{ steps.sub.outputs.result }} Beta" -i //releaseTMP -t attr -n date -v "${{ env.CURRENT_DATE }}" -s //releaseTMP -t elem -n url -v "" -s //releaseTMP/url -t text -n "" -v "https://github.com/FreeTubeApp/FreeTube/releases/tag/v${{ steps.sub.outputs.result }}-beta" -r //releaseTMP -v "release" io.freetubeapp.FreeTube.metainfo.xml
- name: Remove Release Files
Expand Down
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,10 @@ If you ever have any questions, feel free to ask it on our [Discussions](https:/
> Don't forget to check out the [rules](https://docs.freetubeapp.io/community/matrix/) before joining.
## Donate
If you enjoy using FreeTube, you're welcome to leave a donation using the following methods.

* [FreeTube on Liberapay](https://liberapay.com/FreeTube)
If you enjoy using FreeTube, you're welcome to leave a donation using the following method.

* Bitcoin Address: `1Lih7Ho5gnxb1CwPD4o59ss78pwo2T91eS`

* Monero Address: `48WyAPdjwc6VokeXACxSZCFeKEXBiYPV6GjfvBsfg4CrUJ95LLCQSfpM9pvNKy5GE5H4hNaw99P8RZyzmaU9kb1pD7kzhCB`

While your donations are much appreciated, only donate if you really want to. Donations are used for keeping the website up and running and eventual code signing costs.

> [!TIP]
Expand Down
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "freetube",
"productName": "FreeTube",
"description": "A private YouTube client",
"version": "0.20.0",
"version": "0.21.0",
"license": "AGPL-3.0-or-later",
"main": "./dist/main.js",
"private": true,
Expand Down Expand Up @@ -63,11 +63,11 @@
"autolinker": "^4.0.0",
"electron-context-menu": "^4.0.0",
"lodash.debounce": "^4.0.8",
"marked": "^12.0.2",
"marked": "^13.0.0",
"path-browserify": "^1.0.1",
"portal-vue": "^2.1.7",
"process": "^0.11.10",
"swiper": "^11.1.3",
"swiper": "^11.1.4",
"video.js": "7.21.5",
"videojs-contrib-quality-levels": "^3.0.0",
"videojs-http-source-selector": "^1.1.6",
Expand All @@ -79,55 +79,55 @@
"vue-observe-visibility": "^1.0.0",
"vue-router": "^3.6.5",
"vuex": "^3.6.2",
"youtubei.js": "^9.4.0"
"youtubei.js": "^10.0.0"
},
"devDependencies": {
"@babel/core": "^7.24.6",
"@babel/eslint-parser": "^7.24.6",
"@babel/core": "^7.24.7",
"@babel/eslint-parser": "^7.24.7",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/preset-env": "^7.24.6",
"@babel/preset-env": "^7.24.7",
"@double-great/stylelint-a11y": "^3.0.2",
"@intlify/eslint-plugin-vue-i18n": "^2.0.0",
"@intlify/eslint-plugin-vue-i18n": "^3.0.0",
"babel-loader": "^9.1.3",
"copy-webpack-plugin": "^12.0.2",
"css-loader": "^7.1.2",
"css-minimizer-webpack-plugin": "^7.0.0",
"electron": "^30.0.8",
"electron": "^31.0.1",
"electron-builder": "^24.13.3",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsonc": "^2.16.0",
"eslint-plugin-n": "^17.7.0",
"eslint-plugin-n": "^17.9.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-unicorn": "^53.0.0",
"eslint-plugin-promise": "^6.2.0",
"eslint-plugin-unicorn": "^54.0.0",
"eslint-plugin-vue": "^9.26.0",
"eslint-plugin-vuejs-accessibility": "^2.3.0",
"eslint-plugin-yml": "^1.14.0",
"html-webpack-plugin": "^5.6.0",
"js-yaml": "^4.1.0",
"json-minimizer-webpack-plugin": "^5.0.0",
"lefthook": "^1.6.13",
"lefthook": "^1.6.16",
"mini-css-extract-plugin": "^2.9.0",
"npm-run-all2": "^6.2.0",
"postcss": "^8.4.38",
"postcss-scss": "^4.0.9",
"prettier": "^2.8.8",
"rimraf": "^5.0.7",
"sass": "^1.77.2",
"sass": "^1.77.5",
"sass-loader": "^14.2.1",
"stylelint": "^16.6.0",
"stylelint": "^16.6.1",
"stylelint-config-sass-guidelines": "^11.1.0",
"stylelint-config-standard": "^36.0.0",
"stylelint-high-performance-animation": "^1.10.0",
"stylelint-use-logical-spec": "^5.0.1",
"tree-kill": "1.2.2",
"vue-devtools": "^5.1.4",
"vue-eslint-parser": "^9.4.2",
"vue-eslint-parser": "^9.4.3",
"vue-loader": "^15.10.0",
"webpack": "^5.91.0",
"webpack": "^5.92.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.0.4",
"yaml-eslint-parser": "^1.2.3"
Expand Down
26 changes: 25 additions & 1 deletion src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ const IpcChannels = {
CREATE_NEW_WINDOW: 'create-new-window',
OPEN_IN_EXTERNAL_PLAYER: 'open-in-external-player',
NATIVE_THEME_UPDATE: 'native-theme-update',
APP_READY: 'app-ready',
RELAUNCH_REQUEST: 'relaunch-request',

SEARCH_INPUT_HANDLING_READY: 'search-input-handling-ready',
UPDATE_SEARCH_INPUT_TEXT: 'update-search-input-text',

OPEN_URL: 'open-url',
CHANGE_VIEW: 'change-view',

DB_SETTINGS: 'db-settings',
DB_HISTORY: 'db-history',
Expand All @@ -26,6 +34,8 @@ const IpcChannels = {
GET_REPLACE_HTTP_CACHE: 'get-replace-http-cache',
TOGGLE_REPLACE_HTTP_CACHE: 'toggle-replace-http-cache',

SHOW_VIDEO_STATISTICS: 'show-video-statistics',

PLAYER_CACHE_GET: 'player-cache-get',
PLAYER_CACHE_SET: 'player-cache-set'
}
Expand All @@ -45,6 +55,11 @@ const DBActions = {
UPDATE_PLAYLIST: 'db-action-history-update-playlist',
},

PROFILES: {
ADD_CHANNEL: 'db-action-profiles-add-channel',
REMOVE_CHANNEL: 'db-action-profiles-remove-channel'
},

PLAYLISTS: {
UPSERT_VIDEO: 'db-action-playlists-upsert-video-by-playlist-name',
UPSERT_VIDEOS: 'db-action-playlists-upsert-videos-by-playlist-name',
Expand All @@ -67,6 +82,11 @@ const SyncEvents = {
UPDATE_PLAYLIST: 'sync-history-update-playlist',
},

PROFILES: {
ADD_CHANNEL: 'sync-profiles-add-channel',
REMOVE_CHANNEL: 'sync-profiles-remove-channel'
},

PLAYLISTS: {
UPSERT_VIDEO: 'sync-playlists-upsert-video',
DELETE_VIDEO: 'sync-playlists-delete-video',
Expand All @@ -85,12 +105,16 @@ const PLAYLIST_HEIGHT_FORCE_LIST_THRESHOLD = 500
// YouTube search character limit is 100 characters
const SEARCH_CHAR_LIMIT = 100

// Displayed on the about page and used in the main.js file to only allow bitcoin URLs with this wallet address to be opened
const ABOUT_BITCOIN_ADDRESS = '1Lih7Ho5gnxb1CwPD4o59ss78pwo2T91eS'

export {
IpcChannels,
DBActions,
SyncEvents,
MAIN_PROFILE_ID,
MOBILE_WIDTH_THRESHOLD,
PLAYLIST_HEIGHT_FORCE_LIST_THRESHOLD,
SEARCH_CHAR_LIMIT
SEARCH_CHAR_LIMIT,
ABOUT_BITCOIN_ADDRESS,
}
30 changes: 30 additions & 0 deletions src/datastores/handlers/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,36 @@ class Profiles {
return db.profiles.updateAsync({ _id: profile._id }, profile, { upsert: true })
}

static addChannelToProfiles(channel, profileIds) {
if (profileIds.length === 1) {
return db.profiles.updateAsync(
{ _id: profileIds[0] },
{ $push: { subscriptions: channel } }
)
} else {
return db.profiles.updateAsync(
{ _id: { $in: profileIds } },
{ $push: { subscriptions: channel } },
{ multi: true }
)
}
}

static removeChannelFromProfiles(channelId, profileIds) {
if (profileIds.length === 1) {
return db.profiles.updateAsync(
{ _id: profileIds[0] },
{ $pull: { subscriptions: { id: channelId } } }
)
} else {
return db.profiles.updateAsync(
{ _id: { $in: profileIds } },
{ $pull: { subscriptions: { id: channelId } } },
{ multi: true }
)
}
}

static delete(id) {
return db.profiles.removeAsync({ _id: id })
}
Expand Down
20 changes: 20 additions & 0 deletions src/datastores/handlers/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,26 @@ class Profiles {
)
}

static addChannelToProfiles(channel, profileIds) {
return ipcRenderer.invoke(
IpcChannels.DB_PROFILES,
{
action: DBActions.PROFILES.ADD_CHANNEL,
data: { channel, profileIds }
}
)
}

static removeChannelFromProfiles(channelId, profileIds) {
return ipcRenderer.invoke(
IpcChannels.DB_PROFILES,
{
action: DBActions.PROFILES.REMOVE_CHANNEL,
data: { channelId, profileIds }
}
)
}

static delete(id) {
return ipcRenderer.invoke(
IpcChannels.DB_PROFILES,
Expand Down
8 changes: 8 additions & 0 deletions src/datastores/handlers/web.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ class Profiles {
return baseHandlers.profiles.upsert(profile)
}

static addChannelToProfiles(channel, profileIds) {
return baseHandlers.profiles.addChannelToProfiles(channel, profileIds)
}

static removeChannelFromProfiles(channelId, profileIds) {
return baseHandlers.profiles.removeChannelFromProfiles(channelId, profileIds)
}

static delete(id) {
return baseHandlers.profiles.delete(id)
}
Expand Down
Loading

0 comments on commit 3c71c71

Please sign in to comment.