yt2jellyfin 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/config.js +1 -1
- package/dist/jellyfin.js +3 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ Asked in the TUI on first run, saved to `~/.config/yt2jellyfin/config.json` (mod
|
|
|
37
37
|
{
|
|
38
38
|
"jellyfinUrl": "http://media.example.com:8096",
|
|
39
39
|
"jellyfinApiKey": "",
|
|
40
|
-
"jellyfinUploadDir": "/
|
|
40
|
+
"jellyfinUploadDir": "/data/music/YouTube",
|
|
41
41
|
"downloadDir": "~/Music/yt2jellyfin",
|
|
42
42
|
"ytDlpPath": "yt-dlp",
|
|
43
43
|
"ffmpegPath": "ffmpeg"
|
package/dist/config.js
CHANGED
|
@@ -5,7 +5,7 @@ const CONFIG_PATH = join(homedir(), '.config', 'yt2jellyfin', 'config.json');
|
|
|
5
5
|
const DEFAULT_CONFIG = {
|
|
6
6
|
jellyfinUrl: 'http://media.example.com:8096',
|
|
7
7
|
jellyfinApiKey: '',
|
|
8
|
-
jellyfinUploadDir: '/
|
|
8
|
+
jellyfinUploadDir: '/data/music/YouTube',
|
|
9
9
|
downloadDir: join(homedir(), 'Music', 'yt2jellyfin'),
|
|
10
10
|
ytDlpPath: 'yt-dlp',
|
|
11
11
|
ffmpegPath: 'ffmpeg',
|
package/dist/jellyfin.js
CHANGED
|
@@ -66,8 +66,9 @@ export async function uploadToServer(cfg, file) {
|
|
|
66
66
|
body: form,
|
|
67
67
|
});
|
|
68
68
|
if (!response.ok) {
|
|
69
|
-
const body = await response.text();
|
|
70
|
-
throw new Error(`upload failed (${response.status}): ${body}`
|
|
69
|
+
const body = (await response.text()).trim();
|
|
70
|
+
throw new Error(`upload failed (${response.status}): ${body || 'no body'} ` +
|
|
71
|
+
`(check that jellyfinUploadDir exists and is writable by the server)`);
|
|
71
72
|
}
|
|
72
73
|
}
|
|
73
74
|
}
|