torrents.state mass change of saving places

General support for problems installing or using Deluge
Post Reply
Zethran
New User
New User
Posts: 6
Joined: Sat Sep 19, 2009 10:54 am

torrents.state mass change of saving places

Post by Zethran »

OS: GNU/Linux Xubuntu 14.04
Deluge 1.3.11

Hi.
I backuped my files to a new external hard drive because the old one had trouble with deluge. It was formated with NTFS. And often during torrent checking or uploading it stops was ejected or something like this. So I took another hard drive formated it with ext4 encrypted it with LUKS and mounted it to the same place as the old one. It worked quite well. No problems any more.

Now I'm thinking of an alternative way.Instead of mounting the new hard drive to the same spot as the old one can I just change the saving place for every torrent? But I don't want to do it manually for every torrent. I discovered the torrents.state file. If I would search and replace all occurences of the mountinpoint of my old HDD and replace them with the mounting point of my new HDD would it work?

Example:

Code: Select all

OLD HARD DRIVE /media/username/harddriveOLD - search for this term
NEW HARD DRIVE /media/username/harddribeNEW - replace every finding with this
Did I made myself understandable?

Thank you!
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: torrents.state mass change of saving places

Post by Cas »

You can, it would be safer to use a python script to unpack and modify the state file, I thought I had one for save_path but there is a tracker one here you could modify: https://gist.github.com/cas--/5326335
Zethran
New User
New User
Posts: 6
Joined: Sat Sep 19, 2009 10:54 am

Re: torrents.state mass change of saving places

Post by Zethran »

Thank you Cas! I'll just need to learn python first. I somehow can guess what is happening there but I would in no way trust myself to modify it.
Post Reply