topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday March 29, 2024, 2:51 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: SOLVED: Tool to calculate file hashes and rename files according to those hashes  (Read 8281 times)

FrankEBailey`

  • Participant
  • Joined in 2008
  • *
  • Posts: 20
  • I am a maniac
    • View Profile
    • Donate to Member
Hi folks, I do a lot of downloading of old TV shows from various torrent sites. My PC running Sonarr renames the files according to my preferred naming scheme and sets them up ready for viewing in Kodi. So far, so good. However sometimes the torrent sites request that I help to seed a show that has no seeders, so I have to manually rename the files to match the original filenames in the torrent, which can be cumbersome if it's a whole series with lots of episodes.

So what I have envisioned is a tool that, when a new show has just been downloaded, can be run to make a CRC-based snapshot of the files and folders in the torrent, which can be saved to file. Then, if I need to seed that show back, I can run the tool again, load up the file, point it at the folder where my renamed episodes are, and it'll create a copy of the folder with the original filenames and any subfolders if there were any present.

If such a tool exists already, I'd love to hear about it. Otherwise, if someone would possibly like to work on building such a tool, I'll help as much as I can.

EDIT: MultiPAR can do this!
« Last Edit: September 02, 2018, 12:10 PM by FrankEBailey`, Reason: Found a solution »

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 718
    • View Profile
    • Donate to Member
If your vision tells you to save one extra file to your video file, where some sort of hash is stored, why not just save in there the current filename?

FrankEBailey`

  • Participant
  • Joined in 2008
  • *
  • Posts: 20
  • I am a maniac
    • View Profile
    • Donate to Member
I'm thinking more to have this tool save one file that contains the hashes of all the files in the folder and its subfolders, along with the original filenames. This file, let's call it a .TFH (Torrent Filename Hash) file, could then be archived somewhere for later access. When the time comes to have to seed back on that torrent, I load the TFH file into the utility, point it at the folder where the organized and renamed files now live, and the utility makes a copy of the files, organized into their original names and folders, at a location of my choice.

A second use for a tool like this would be to preserve the filenames and structure of ripped Xbox ISOs, recently I had an issue where my FAT32 external drive I use for my XBox 360 had a filesystem error and running CHKDSK on it caused most of the files to renamed into 8.3 DOS format, so long filenames were lost and the games were ruined. If I had a tool like the one I've described, this could've been prevented, because I could just run the tool against the TFH files I would've made earlier and get all the original filenames back and made the damaged games once again playable.

FrankEBailey`

  • Participant
  • Joined in 2008
  • *
  • Posts: 20
  • I am a maniac
    • View Profile
    • Donate to Member
It seems like the most sensible thing to do is use an SFV file creator as the first part of the process, and do one per TV Show, or one per game folder. The second step (I can't find a tool that does this) would be to read the SFV file in and rename the files according to the filenames for the detected CRC in the SFV.

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
My PC running Sonarr renames the files according to my preferred naming scheme and sets them up ready for viewing in Kodi.
Tackle the issue at the source: Can't Sonarr store the original filenames (during the rename process), with the new filenames, in a file that is kept in the same folder as the media files? That way you can quite easily create an extra copy to re-seed. You might want/need to do a feature request for Sonarr, I can imagine more people to have the same need.

FrankEBailey`

  • Participant
  • Joined in 2008
  • *
  • Posts: 20
  • I am a maniac
    • View Profile
    • Donate to Member
Okay after rummaging through the sock drawers of the Internet, I can now state that MultiPar (https://multipar.eu/) does exactly what I need it to, including the renaming and moving of files based on a PAR2 file created for the show or game.
« Last Edit: September 02, 2018, 06:38 AM by FrankEBailey` »

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
 :Thmbsup: