Skip to content

Commit

Permalink
Cache on server feature
Browse files Browse the repository at this point in the history
Server will download video from supported players and add as raw video to playlist (only youtube is supported for now).

Cache for YT player is available after installing optional dependencies, see readme. For cache size see `cacheStorageLimitGiB ` in config.

There is also minor ux improvement, latest checkbox states will be keeped in local storage now.
  • Loading branch information
RblSb committed Jan 16, 2025
1 parent f84fdc4 commit 6118f98
Show file tree
Hide file tree
Showing 24 changed files with 1,236 additions and 1,521 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Default channel example: https://synctube.onrender.com/

### Setup
- Open `4200` port in your router settings (port is customizable)
- `npm install ws` in this project folder ([NodeJS 14+](https://nodejs.org) required)
- `npm ci` in this project folder ([NodeJS 14+](https://nodejs.org) required)
- Run `node build/server.js`
- Open showed "Local" link for yourself and send "Global" link to friends

Expand All @@ -42,6 +42,14 @@ or
- (Docker container hides real local/global ips, so you need to checkout it manually)
### Optional dependencies
If you want to enable `Cache on server` feature for Youtube player, you can also run:
```shell
npm i @distube/ytdl-core@latest
```
And install `ffmpeg` on your server system. Default cache size is 3.0 GiB.

### Configuration
It's just works, but you can also check [user/ folder](/user/README.md) for server settings and additional customization.

Expand Down
1,800 changes: 686 additions & 1,114 deletions build/server.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions default-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"templateUrl": "https://youtube.com/playlist?list=PL9FiZUDVMu9tc_85frYognMOVFC_-VkSX",
"youtubeApiKey": "AIzaSyDTk1OPRI9cDkAK_BKsBcv10DQCHse-QaA",
"youtubePlaylistLimit": 50,
"cacheStorageLimitGiB": 3.0,
"permissions": {
"banned": [],
"guest": ["writeChat", "addVideo", "removeVideo", "changeOrder", "toggleItemType", "requestLeader", "rewind"],
Expand Down
Loading

0 comments on commit 6118f98

Please sign in to comment.