DevYukine / red_oxide

A CLI helping with uploading to Redacted, inspired by REDBetter
MIT License
114 stars 21 forks source link

Skipping due to encountered error: Failed to create torrent #20

Open gravelfreeman opened 9 months ago

gravelfreeman commented 9 months ago

I spent hours setting up this script and it's not working despite all the efforts I've tried. First thing I want to point out is that --debug flag is useless and doesn't provide a debug.log file or doesn't show debug info in shell either. It makes it very complicated and frustrating to troubleshoot.

I'm running the script from my home folder at /home/***/Data/red_oxide

All of the files are in that folder except the torrent directory which is on an NFS share. I made sure that my user have read and write permissions to that share by creating and deleting a folder.

Here's my configuration file:

{
  "api_key": "***",
  "torrent_directory": "/home/***/Data/red_oxide/torrent",
  "content_directory": "/mnt/red_oxide", # NFS SHARE
  "transcode_directory": "/home/***/Data/red_oxide/transcode",
  "spectrogram_directory": "/home/***/Data/red_oxide/spectrogram",
  "move_transcode_to_content": true,
  "automatic_upload": true,
  "skip_hash_check": false,
  "skip_spectrogram": false,
  "allowed_transcode_formats": ["Flac", "Mp3320", "Mp3V0"],
  "concurrency": 16
}

Here's the shell output with the Failed to create torrent:

***@ubuntu:~/Data/red_oxide$ ./red_oxide transcode https://redacted.ch/torrents.php?id\=***\&torrentid\=***\#torrent***
[✅] Logged in as *** on the Redacted API
[✅] Got torrent *** from group ***
[✅] Found missing format(s) MP3 320,MP3 V0, for torrent *** in group ***
[✅] Local file torrent hash check succeeded for torrent *** in group ***
[⏸️] Created Spectrograms at /home/***/Data/red_oxide/spectrogram/***, please manual check if FLAC is lossless before continuing!
Do those spectrograms look good? yes
[✅] Transcoding Done!
[❌] Skipping due to encountered error: Failed to create torrent

I got intermodal, sox, flac and lame installed and added to path. I confirmed this by entering their name in console and I could see their version and information for each app.

I believe the script is broken. My friend who used the script successfully tried for the past 3 hours and wasn't able to figure out why I'm getting this error.

Please help me out, thank you!

DevYukine commented 9 months ago

Hey,

yes as you already noticed the --debug flag currently doesn't add more logs, this is also on my TODO but i've not had much time recently to work on red_oxide and improve it in these areas.

I'll add some debug logs when calling dependencies such as intermodal, sox, flac fail and see if we can figure out what is going on this way :)

Tharic99 commented 7 months ago

@gravelfreeman Have you tried putting trailing / onto your paths in your config.json file? I ran into that issue myself and it needed the trailing slash

gravelfreeman commented 6 months ago

@gravelfreeman Have you tried putting trailing / onto your paths in your config.json file? I ran into that issue myself and it needed the trailing slash

Yes and BTW this is very time consuming, I wish this will be patched. I kinda goes against the whole point of automation.

DrowningWhale commented 6 months ago

@gravelfreeman I actually encountered a similar problem to yours. I am running all the directories off of an SMB share and ran into a plethora of problems. There seems to be something wrong with permissions over shared drives.

Try opening 2 Windows Explorers and drag files across your content_directory and torrent_directory or anywhere between your share and computer. I had a pop-up saying "These files might be harmful to your computer." It allows you to bypass with a button, but I'm assuming the code isn't given an option. I fixed this by adding the address of the share to Internet Properties->Security->Local intranet->Sites->Advanced and rebooting.

Edit: I also got this error if the torrent_directory is incorrect and/or does not exist.

Hyphen-H commented 1 month ago

I figured it out: it is because the 2 torrents (mp3,v0) already exists in the torrent_directory named in the config.json. Clean everything that redb generated, and try again, it just runs smooth~ Also remember to clean the mp3320/v0 content in the previous failed commands. This program seems do not overwrite previous failed-command-generated files (spectrums, generated mp3320/v0, torrents), during the redb process and therefore causes error @DevYukine @gravelfreeman