Jump to content

Share list of active torrents between differenOSes of the same machine


Plus

Recommended Posts

Hi everyone!

Can anyone tell, if I can use the same list of active torrents I have in uTorrent Windows in uTorrent Linux? Both OSes are installed on the same machine and they are never executed at once, only one after one.

I.e. I want that I could proceed my active torrents with their statuses from uTorrent Windows in uTorrent Linux and vise versa. Is that possible with uTorrent or BitTorrent?

Link to comment
Share on other sites

i think you can do this as long as everything is on the windows partition. you just have to mount the ntfs partition under linux and then create sym-links to the directories. then just point both utorrent (linux and windows) to the same folder.

the downside to this is that the ntfs partition will not have the same robustness against fragmentation that ext3/ext4 have.

Link to comment
Share on other sites

Ok, here's that script that I said I might write. It requires you to install the perl module Convert::Bencode and then edit the paths in the script itself before it will work. If you don't know how to do either of those, don't even try using this. Also, I have significant doubts as to whether it works with paths that have unicode characters in them but don't care enough to test and fix it.

That said, save it into the same directory as the resume.dat you want to convert, chmod a+x it, run it, and cp resume.dat.fixed /wherever/you/put/utserver/resume.dat That's all there is to it.

#!/usr/bin/perl 
# This is a VERY basic script to help those converting from using utorrent under wine
# to migrate to the new linux port. It's likely buggy as all hell and will probably set
# your house on fire. Back your shat up before playing with it.

use Convert::Bencode qw(bencode bdecode);

# Change these to suit your needs
# Yes, I'm a lazyass and just used . to match the annoying dos path bits rather than
# explicitly matching them.
my $oldbasedir = '...windows.profiles.bob.Desktop.torrents';
my $newbasedir = '/usr/share/torrents';

open(RESUME, '<resume.dat');
my $file_contents = do { local $/; <RESUME> };
close RESUME;

my $decoded = bdecode($file_contents);
my %outhash;
undef ${$decoded}{'.fileguard'};
foreach my $key (keys(%{$decoded})) {
next if $key eq '.fileguard';
my $fixedkey = $key;
$fixedkey =~ s/$oldbasedir/$newbasedir/i;
$fixedkey =~ s/\\/\//g;
$outhash{$fixedkey} = ${$decoded}{$key};
$outhash{$fixedkey}{path} =~ s/$oldbasedir/$newbasedir/i;
$outhash{$fixedkey}{path} =~ s/\\/\//g;
}

open(FIXED, '>resume.dat.fixed');
print FIXED bencode(\%outhash);
close FIXED;

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...