mirror of https://github.com/alexta69/metube
add `PUBLIC_HOST_URL` config key
parent
637f456de3
commit
e89da396cd
|
@ -24,6 +24,7 @@ class Config:
|
||||||
'DELETE_FILE_ON_TRASHCAN': 'false',
|
'DELETE_FILE_ON_TRASHCAN': 'false',
|
||||||
'STATE_DIR': '.',
|
'STATE_DIR': '.',
|
||||||
'URL_PREFIX': '',
|
'URL_PREFIX': '',
|
||||||
|
'PUBLIC_HOST_URL': 'download/',
|
||||||
'OUTPUT_TEMPLATE': '%(title)s.%(ext)s',
|
'OUTPUT_TEMPLATE': '%(title)s.%(ext)s',
|
||||||
'OUTPUT_TEMPLATE_CHAPTER': '%(title)s - %(section_number)s %(section_title)s.%(ext)s',
|
'OUTPUT_TEMPLATE_CHAPTER': '%(title)s - %(section_number)s %(section_title)s.%(ext)s',
|
||||||
'YTDL_OPTIONS': '{}',
|
'YTDL_OPTIONS': '{}',
|
||||||
|
|
|
@ -233,7 +233,7 @@ export class AppComponent implements AfterViewInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
buildDownloadLink(download: Download) {
|
buildDownloadLink(download: Download) {
|
||||||
let baseDir = 'download/';
|
let baseDir = this.downloads.configuration["PUBLIC_HOST_URL"] ?? 'download/';
|
||||||
if (download.quality == 'audio' || download.filename.endsWith('.mp3')) {
|
if (download.quality == 'audio' || download.filename.endsWith('.mp3')) {
|
||||||
baseDir = 'audio_download/';
|
baseDir = 'audio_download/';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue