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.
|
Spooty can be also build from source files on your own.
|
||||||
|
|
||||||
#### Requirements
|
#### 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
|
- Redis in memory cache
|
||||||
- Ffmpeg
|
- Ffmpeg
|
||||||
- Python3
|
- Python3
|
||||||
|
|
||||||
#### Process
|
#### 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`
|
- 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))
|
- 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:
|
- 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.
|
Some behaviour and settings of Spooty can be configured using environment variables and `.env` file.
|
||||||
|
|
||||||
Name | Default | Description |
|
Name | Default | Description |
|
||||||
----------------------|---------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
----------------------|---------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
DB_PATH | `./config/db.sqlite` (relative to backend) | Path where Spooty database will be stored |
|
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 |
|
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 |
|
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 |
|
PORT | 3000 | Port of Spooty server |
|
||||||
REDIS_PORT | 6379 | Port of Redis server |
|
REDIS_PORT | 6379 | Port of Redis server |
|
||||||
REDIS_HOST | localhost | Host of Redis server |
|
REDIS_HOST | localhost | Host of Redis server |
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ DB_PATH=./config/db.sqlite
|
|||||||
FE_PATH=../frontend/browser
|
FE_PATH=../frontend/browser
|
||||||
DOWNLOADS_PATH=./downloads
|
DOWNLOADS_PATH=./downloads
|
||||||
FORMAT=mp3
|
FORMAT=mp3
|
||||||
|
QUALITY=
|
||||||
PORT=3000
|
PORT=3000
|
||||||
REDIS_PORT=6379
|
REDIS_PORT=6379
|
||||||
REDIS_HOST=localhost
|
REDIS_HOST=localhost
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ export class YoutubeService {
|
|||||||
cookiesFromBrowser: this.configService.get<string>('YT_COOKIES'),
|
cookiesFromBrowser: this.configService.get<string>('YT_COOKIES'),
|
||||||
headers: HEADERS,
|
headers: HEADERS,
|
||||||
jsRuntime: 'node',
|
jsRuntime: 'node',
|
||||||
|
audioQuality: this.configService.get<string>('QUALITY'),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
this.logger.debug(
|
this.logger.debug(
|
||||||
|
|||||||
Reference in New Issue
Block a user