ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Finished Programs

SOLVED: Tool to calculate file hashes and rename files according to those hashes

(1/2) > >>

FrankEBailey`:
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!

KodeZwerg:
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`:
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`:
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:
My PC running Sonarr renames the files according to my preferred naming scheme and sets them up ready for viewing in Kodi.
-FrankEBailey` (September 01, 2018, 02:18 AM)
--- End quote ---
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.

Navigation

[0] Message Index

[#] Next page

Go to full version