anidl / multi-downloader-nx

Downloader for Crunchyroll, Hidive, AnimeOnegai, and AnimationDigitalNetwork with CLI and GUI
MIT License
253 stars 41 forks source link

[BUG]: creates unused directories #733

Open BlastBolt5 opened 1 month ago

BlastBolt5 commented 1 month ago

Program version

5.1.4

Operating System

Linux

Type

CLI

Service

Crunchyroll

Command used

aniDL --service crunchy --dubLang eng --episode GX9UQE4JZ --force n --fileName ./temp/./anime/en-US/That Time I Got Reincarnated as a Slime/Season 03/That Time I Got Reincarnated as a Slime - S03E01 - Demons and Strategies

Show ID

GYZJ43JMR

Episode

GX9UQE4JZ

Console Output

=== Multi Downloader NX 5.1.4 ===

USER: <removed>
Your Country: <removed>

Requested object ID: GX9UQE4JZ
 ✓[S:G609CX7ZE|E:GX9UQE4JZ|EPI.927780] That Time I Got Reincarnated as a Slime Season 3 (English Dub) - 49 - Demons and Strategies [24m30s, SUB, DUB, STREAM]
    - Subtitles: en

Requesting: [E:GX9UQE4JZ] That Time I Got Reincarnated as a Slime Season 3 (English Dub) - 49 - Demons and Strategies
Chapter request successful
Selecting raw stream
Full stream found! (✓1: adaptive_chrome_dash_drm/eng/- )
Downloading video...
Playlists URL: https://cr-play-service.prd.crunchyrollsvc.com/v1/manifest/GX9UQE4JZ/evs3/b875d710c4ed428caf97027f65b7daf4/assets/p/125a440704fa29771d35b43f797041a3_,5517041.mp4,5517042.mp4,5517040.mp4,5517038.mp4,5517039.mp4,4207.txt,.urlset/manifest.mpd?playbackGuid=0e-a81684a4-2e02-4e92-9396-b6de06ac6b4c&accountid=25e2f192-51d8-558e-a8f3-64d310785a25 (adaptive_chrome_dash_drm/eng/-)
Servers available:
    a-vrv.akamaized.net
Available Video Qualities:
    [1] 428x240 (485KiB/s)
    [2] 640x360 (972KiB/s)
    [3] 848x480 (1942KiB/s)
    [4] 1280x720 (3896KiB/s)
    [5] 1920x1080 (7803KiB/s)
Available Audio Qualities:
    [1] 64kB/s
    [2] 96kB/s
    [3] 128kB/s
Selected quality: 
    Video: 1920x1080 (7803KiB/s)
    Audio: 128kB/s
    Server: a-vrv.akamaized.net
Stream URL: https://a-vrv.akamaized.net/evs3/b875d710c4ed428caf97027f65b7daf4/assets/p/125a440704fa29771d35b43f797041a3_,5517041.mp4,5517042.mp4,5517040.mp4,5517038.mp4,5517039.mp4,4207.txt
Total parts in video stream: 367 (37*10)
Saving stream to «/home/blastbolt5/anime/temp-GX9UQE4JZ.video.enc.m4s»...
Download and save init part...
Init part downloaded.
10 of 367 parts downloaded [3%] (59s | 25Mb/s)
20 of 367 parts downloaded [5%] (46s | 31Mb/s)
30 of 367 parts downloaded [8%] (38s | 38Mb/s)
40 of 367 parts downloaded [11%] (35s | 42Mb/s)
50 of 367 parts downloaded [14%] (34s | 44Mb/s)
60 of 367 parts downloaded [16%] (32s | 44Mb/s)
70 of 367 parts downloaded [19%] (32s | 41Mb/s)
80 of 367 parts downloaded [22%] (30s | 41Mb/s)
90 of 367 parts downloaded [25%] (28s | 41Mb/s)
100 of 367 parts downloaded [27%] (30s | 37Mb/s)
110 of 367 parts downloaded [30%] (28s | 38Mb/s)
120 of 367 parts downloaded [33%] (26s | 39Mb/s)
130 of 367 parts downloaded [35%] (26s | 37Mb/s)
140 of 367 parts downloaded [38%] (24s | 38Mb/s)
150 of 367 parts downloaded [41%] (23s | 37Mb/s)
160 of 367 parts downloaded [44%] (22s | 37Mb/s)
170 of 367 parts downloaded [46%] (21s | 38Mb/s)
180 of 367 parts downloaded [49%] (20s | 38Mb/s)
190 of 367 parts downloaded [52%] (18s | 39Mb/s)
200 of 367 parts downloaded [54%] (17s | 38Mb/s)
210 of 367 parts downloaded [57%] (16s | 38Mb/s)
220 of 367 parts downloaded [60%] (15s | 38Mb/s)
230 of 367 parts downloaded [63%] (14s | 39Mb/s)
240 of 367 parts downloaded [65%] (13s | 39Mb/s)
250 of 367 parts downloaded [68%] (12s | 40Mb/s)
260 of 367 parts downloaded [71%] (11s | 39Mb/s)
270 of 367 parts downloaded [74%] (10s | 39Mb/s)
280 of 367 parts downloaded [76%] (9s | 39Mb/s)
290 of 367 parts downloaded [79%] (8s | 39Mb/s)
300 of 367 parts downloaded [82%] (7s | 38Mb/s)
310 of 367 parts downloaded [84%] (6s | 38Mb/s)
320 of 367 parts downloaded [87%] (5s | 38Mb/s)
330 of 367 parts downloaded [90%] (4s | 38Mb/s)
340 of 367 parts downloaded [93%] (3s | 38Mb/s)
350 of 367 parts downloaded [95%] (2s | 38Mb/s)
360 of 367 parts downloaded [98%] (1s | 38Mb/s)
367 of 367 parts downloaded [100%] (0s | 38Mb/s)
Total parts in audio stream: 367 (37*10)
Saving stream to «/home/blastbolt5/anime/temp-GX9UQE4JZ.audio.enc.m4s»...
Download and save init part...
Init part downloaded.
10 of 367 parts downloaded [3%] (9s | 2.7Mb/s)
20 of 367 parts downloaded [5%] (11s | 2.2Mb/s)
30 of 367 parts downloaded [8%] (10s | 2.2Mb/s)
40 of 367 parts downloaded [11%] (11s | 2.1Mb/s)
50 of 367 parts downloaded [14%] (11s | 2.0Mb/s)
60 of 367 parts downloaded [16%] (11s | 1.9Mb/s)
70 of 367 parts downloaded [19%] (10s | 1.9Mb/s)
80 of 367 parts downloaded [22%] (9s | 2.0Mb/s)
90 of 367 parts downloaded [25%] (9s | 2.0Mb/s)
100 of 367 parts downloaded [27%] (9s | 2.0Mb/s)
110 of 367 parts downloaded [30%] (9s | 1.9Mb/s)
120 of 367 parts downloaded [33%] (9s | 1.9Mb/s)
130 of 367 parts downloaded [35%] (8s | 1.9Mb/s)
140 of 367 parts downloaded [38%] (8s | 2.0Mb/s)
150 of 367 parts downloaded [41%] (7s | 2.0Mb/s)
160 of 367 parts downloaded [44%] (7s | 2.0Mb/s)
170 of 367 parts downloaded [46%] (6s | 2.1Mb/s)
180 of 367 parts downloaded [49%] (6s | 2.0Mb/s)
190 of 367 parts downloaded [52%] (6s | 2.0Mb/s)
200 of 367 parts downloaded [54%] (6s | 2.0Mb/s)
210 of 367 parts downloaded [57%] (5s | 1.9Mb/s)
220 of 367 parts downloaded [60%] (5s | 1.9Mb/s)
230 of 367 parts downloaded [63%] (5s | 2.0Mb/s)
240 of 367 parts downloaded [65%] (4s | 2.0Mb/s)
250 of 367 parts downloaded [68%] (4s | 2.0Mb/s)
260 of 367 parts downloaded [71%] (4s | 2.0Mb/s)
270 of 367 parts downloaded [74%] (3s | 2.0Mb/s)
280 of 367 parts downloaded [76%] (3s | 2.0Mb/s)
290 of 367 parts downloaded [79%] (3s | 1.9Mb/s)
300 of 367 parts downloaded [82%] (2s | 1.9Mb/s)
310 of 367 parts downloaded [84%] (2s | 1.9Mb/s)
320 of 367 parts downloaded [87%] (2s | 1.9Mb/s)
330 of 367 parts downloaded [90%] (1s | 1.9Mb/s)
340 of 367 parts downloaded [93%] (1s | 1.9Mb/s)
350 of 367 parts downloaded [95%] (1s | 1.9Mb/s)
360 of 367 parts downloaded [98%] (0s | 1.9Mb/s)
367 of 367 parts downloaded [100%] (0s | 1.9Mb/s)
Decryption Needed, attempting to decrypt
Started decrypting video

> "mp4decrypt" --show-progress --key <removed> "/home/blastbolt5/anime/temp-GX9UQE4JZ.video.enc.m4s" "/home/blastbolt5/anime/temp-GX9UQE4JZ.video.m4s"
Decryption done for video
Started decrypting audio

> "mp4decrypt" --show-progress --key <removed> "/home/blastbolt5/anime/temp-GX9UQE4JZ.audio.enc.m4s" "/home/blastbolt5/anime/temp-GX9UQE4JZ.audio.m4s"
Decryption done for audio
Subtitle downloaded: ./temp/./anime/en-US/That Time I Got Reincarnated as a Slime/Season 03/That Time I Got Reincarnated as a Slime - S03E01 - Demons and Strategies.01.eng.English.signs.ass
[WARN] VTT2ASS: Can't properly parse text-shadow: text-shadow: #000000ff -2px 0px 2px, #000000ff 0px 2px 2px, #000000ff 0px -2px 2px, #000000ff 2px 0px 2px
Subtitle downloaded: ./temp/./anime/en-US/That Time I Got Reincarnated as a Slime/Season 03/That Time I Got Reincarnated as a Slime - S03E01 - Demons and Strategies.02.eng.English.cc.ass

Subtitles: en, en (Total: 2)
Required fonts: Arial, Trebuchet MS, Times New Roman, Georgia (Total: 4)
[mkvmerge] Started merging

> "mkvmerge" -o "/home/blastbolt5/anime/temp/anime/en-US/That Time I Got Reincarnated as a Slime/Season 03/That Time I Got Reincarnated as a Slime - S03E01 - Demons and Strategies.mkv" --no-date --disable-track-statistics-tags --engage no_variable_data --video-tracks 0 --no-audio --track-name 0:"English [Uncut]" --language 0:eng "/home/blastbolt5/anime/temp/anime/en-US/That Time I Got Reincarnated as a Slime/Season 03/That Time I Got Reincarnated as a Slime - S03E01 - Demons and Strategies.English.video.m4s" --track-name 0:"English" --language 0:eng --no-video --audio-tracks 0 --default-track 0 "/home/blastbolt5/anime/temp/anime/en-US/That Time I Got Reincarnated as a Slime/Season 03/That Time I Got Reincarnated as a Slime - S03E01 - Demons and Strategies.English.audio.m4s" --track-name 0:"English Signs" --language 0:"eng" --default-track 0 "/home/blastbolt5/anime/temp/anime/en-US/That Time I Got Reincarnated as a Slime/Season 03/That Time I Got Reincarnated as a Slime - S03E01 - Demons and Strategies.01.eng.English.signs.ass" --track-name 0:"English cc" --language 0:"eng" --default-track 0:0 "/home/blastbolt5/anime/temp/anime/en-US/That Time I Got Reincarnated as a Slime/Season 03/That Time I Got Reincarnated as a Slime - S03E01 - Demons and Strategies.02.eng.English.cc.vtt" --no-attachments --chapters "/home/blastbolt5/anime/temp/anime/en-US/That Time I Got Reincarnated as a Slime/Season 03/That Time I Got Reincarnated as a Slime - S03E01 - Demons and Strategies.undefined.txt"
mkvmerge v65.0.0 ('Too Much') 64-bit
'/home/blastbolt5/anime/temp/anime/en-US/That Time I Got Reincarnated as a Slime/Season 03/That Time I Got Reincarnated as a Slime - S03E01 - Demons and Strategies.English.video.m4s': Using the demultiplexer for the format 'QuickTime/MP4'.
'/home/blastbolt5/anime/temp/anime/en-US/That Time I Got Reincarnated as a Slime/Season 03/That Time I Got Reincarnated as a Slime - S03E01 - Demons and Strategies.English.audio.m4s': Using the demultiplexer for the format 'QuickTime/MP4'.
'/home/blastbolt5/anime/temp/anime/en-US/That Time I Got Reincarnated as a Slime/Season 03/That Time I Got Reincarnated as a Slime - S03E01 - Demons and Strategies.01.eng.English.signs.ass': Using the demultiplexer for the format 'SSA/ASS subtitles'.
'/home/blastbolt5/anime/temp/anime/en-US/That Time I Got Reincarnated as a Slime/Season 03/That Time I Got Reincarnated as a Slime - S03E01 - Demons and Strategies.02.eng.English.cc.vtt': Using the demultiplexer for the format 'SSA/ASS subtitles'.
'/home/blastbolt5/anime/temp/anime/en-US/That Time I Got Reincarnated as a Slime/Season 03/That Time I Got Reincarnated as a Slime - S03E01 - Demons and Strategies.English.video.m4s' track 0: Using the output module for the format 'AVC/H.264'.
'/home/blastbolt5/anime/temp/anime/en-US/That Time I Got Reincarnated as a Slime/Season 03/That Time I Got Reincarnated as a Slime - S03E01 - Demons and Strategies.English.audio.m4s' track 0: Using the output module for the format 'AAC'.
'/home/blastbolt5/anime/temp/anime/en-US/That Time I Got Reincarnated as a Slime/Season 03/That Time I Got Reincarnated as a Slime - S03E01 - Demons and Strategies.01.eng.English.signs.ass' track 0: Using the output module for the format 'SSA/ASS text subtitles'.
'/home/blastbolt5/anime/temp/anime/en-US/That Time I Got Reincarnated as a Slime/Season 03/That Time I Got Reincarnated as a Slime - S03E01 - Demons and Strategies.02.eng.English.cc.vtt' track 0: Using the output module for the format 'SSA/ASS text subtitles'.
The file '/home/blastbolt5/anime/temp/anime/en-US/That Time I Got Reincarnated as a Slime/Season 03/That Time I Got Reincarnated as a Slime - S03E01 - Demons and Strategies.mkv' has been opened for writing.
'/home/blastbolt5/anime/temp/anime/en-US/That Time I Got Reincarnated as a Slime/Season 03/That Time I Got Reincarnated as a Slime - S03E01 - Demons and Strategies.English.video.m4s' track 0: Extracted the aspect ratio information from the MPEG-4 layer 10 (AVC) video data and set the display dimensions to 1920/1080.
Progress: 100%
The cue entries (the index) are being written...
Multiplexing took 3 seconds.
[mkvmerge Done]

Additional Information

It creates a random directory at

/home/blastbolt5/anime/home/blastbolt5/anime/temp/anime/en-US/That Time I Got Reincarnated as a Slime/Season 03/

no that is not accidentally put in there twice, it just seems to try to create that directory as well even tho it saves the final file to just

/home/blastbolt5/anime/temp/anime/en-US/That Time I Got Reincarnated as a Slime/Season 03/

It's just trying to create the folder structure at two locations, one in the proper spot, the other using the proper full path but starting at the directory specified in the dir-path.yml

Jaynator495 commented 1 month ago

I suspect this is because of the extra dot in your command line, presumably this fileName should work fine: ./temp/anime/en-US/That Time I Got Reincarnated as a Slime/Season 03/That Time I Got Reincarnated as a Slime - S03E01 - Demons and Strategies

I should see if I can throw an error for cases like this

BlastBolt5 commented 1 month ago

changing the filename still leaves me with that random directory in the directory specified in the dir-path.yml ("/home/blastbolt5/anime" in this case) the extra ./ was a left over from the temp fix I mentioned in #732

Jaynator495 commented 1 month ago

Just for testing sake, what if you remove the "." at the start of the fileName option ?

BlastBolt5 commented 1 month ago
--fileName "/temp/anime/en-US/That Time I Got Reincarnated as a Slime/Season 03/That Time I Got Reincarnated as a Slime - S03E01 - Demons and Strategies"

Errors out trying to write it straight to the root of the filesystem

node:fs:1032
  binding.rename(
          ^

Error: ENOENT: no such file or directory, rename '/home/blastbolt5/anime/temp-GX9UQE4JZ.video.m4s' -> '/temp/anime/en-US/That Time I Got Reincarnated as a Slime/Season 03/That Time I Got Reincarnated as a Slime - S03E01 - Demons and Strategies.English.video.m4s'
    at Object.renameSync (node:fs:1032:11)
    at eIe.<anonymous> (/snapshot/_builds/index.cjs)
    at Generator.next (<anonymous>)
    at fulfilled (/snapshot/_builds/index.cjs)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'rename',
  path: '/home/blastbolt5/anime/temp-GX9UQE4JZ.video.m4s',
  dest: '/temp/anime/en-US/That Time I Got Reincarnated as a Slime/Season 03/That Time I Got Reincarnated as a Slime - S03E01 - Demons and Strategies.English.video.m4s'
}
BlastBolt5 commented 1 month ago

Using the full direct path for the fileName option

--fileName "/home/blastbolt5/anime/temp/anime/en-US/That Time I Got Reincarnated as a Slime/Season 03/That Time I Got Reincarnated as a Slime - S03E01 - Demons and Strategies"

Created this mess at /home/blastbolt5/anime/ image Still with nothing in them, the video went to the folder it was supposed to