feat(files): add possibility to set the audio quality of downloaded files
it is possible now to se audio quality of files using environment variables (QUALITY) close #39
This commit is contained in:
@@ -79,13 +79,13 @@ services:
|
||||
Spooty can be also build from source files on your own.
|
||||
|
||||
#### Requirements
|
||||
- Node v18.19.1 (it is recommended to use `nvm` node version manager to install proper version of node)
|
||||
- Node v20.20.0 (it is recommended to use `nvm` node version manager to install proper version of node)
|
||||
- Redis in memory cache
|
||||
- Ffmpeg
|
||||
- Python3
|
||||
|
||||
#### Process
|
||||
- install Node v18.19.1 using `nvm install` and use that node version `nvm use`
|
||||
- install Node v20.20.0 using `nvm install` and use that node version `nvm use`
|
||||
- from project root install all dependencies using `npm install`
|
||||
- copy `.env.default` as `.env` in `src/backend` folder and modify desired environment properties (see [environment variables](#environment-variables))
|
||||
- add your Spotify application credentials to the `.env` file:
|
||||
@@ -102,11 +102,12 @@ Spooty can be also build from source files on your own.
|
||||
Some behaviour and settings of Spooty can be configured using environment variables and `.env` file.
|
||||
|
||||
Name | Default | Description |
|
||||
----------------------|---------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
----------------------|---------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
DB_PATH | `./config/db.sqlite` (relative to backend) | Path where Spooty database will be stored |
|
||||
FE_PATH | `../frontend/browser` (relative to backend) | Path to frontend part of application |
|
||||
DOWNLOADS_PATH | `./downloads` (relative to backend) | Path where downaloded files will be stored |
|
||||
FORMAT | `mp3` | Format of downloaded files (currently fully supported only `mp3` but you can try whatever you want from [ffmpeg](https://ffmpeg.org/ffmpeg-formats.html#Muxers)) |
|
||||
FORMAT | `mp3` | Format of downloaded files ('aac', 'flac', 'mp3', 'm4a', 'opus', 'vorbis', 'wav', 'alac') |
|
||||
QUALITY | undefined | Audio quality (0-9 VBR or specific bitrate) of downloaded files |
|
||||
PORT | 3000 | Port of Spooty server |
|
||||
REDIS_PORT | 6379 | Port of Redis server |
|
||||
REDIS_HOST | localhost | Host of Redis server |
|
||||
|
||||
@@ -2,6 +2,7 @@ DB_PATH=./config/db.sqlite
|
||||
FE_PATH=../frontend/browser
|
||||
DOWNLOADS_PATH=./downloads
|
||||
FORMAT=mp3
|
||||
QUALITY=
|
||||
PORT=3000
|
||||
REDIS_PORT=6379
|
||||
REDIS_HOST=localhost
|
||||
|
||||
@@ -42,6 +42,7 @@ export class YoutubeService {
|
||||
cookiesFromBrowser: this.configService.get<string>('YT_COOKIES'),
|
||||
headers: HEADERS,
|
||||
jsRuntime: 'node',
|
||||
audioQuality: this.configService.get<string>('QUALITY'),
|
||||
},
|
||||
);
|
||||
this.logger.debug(
|
||||
|
||||
Reference in New Issue
Block a user