mikedld / bt-migrate

Torrent state migration tool
GNU General Public License v3.0
89 stars 15 forks source link

Can't migrate from uTorrent #2

Closed waltercruz closed 4 years ago

waltercruz commented 8 years ago

on Mac OS 10.11

./bt-migrate --source utorrent --source-dir=/Users/waltercruz/Library/Application\ Support/uTorrent/ --target-dir ~/.config/transmission --dry-run --verbose

waltercruz commented 8 years ago

[2016-Feb-29 10:37:46.561257] [E] Error: the argument ('/Users/waltercruz/Library/Application Support/uTorrent/') for option '--source-dir' is invalid

mikedld commented 8 years ago

I saw this a while ago and search led me to this boost defect. Are you using boost 1.53 or below (issue seems to be fixed in 1.54)?

waltercruz commented 8 years ago

boost 1.60, installed through homebrew.

waltercruz commented 8 years ago

-- Boost version: 1.60.0 -- Found the following Boost libraries: -- date_time -- filesystem -- locale -- program_options -- system -- JsonCpp Version: 0.6.0-dev -- Configuring done -- Generating done -- Build files have been written to: /Users/waltercruz/devel/bt-migrate

mikedld commented 8 years ago

Seems like they either didn't fix it or have broken it (or something else) again... I'll switch to std::string instead of boost::filesystem::path for options parsing then.

mikedld commented 8 years ago

Forgot to mention that the workaround for now would be to use paths of just under 20 chars in length. You could try this:

# ln -s ~/Library/Application\ Support/uTorrent /tmp/bt-src
# ln -s ~/.config/transmission /tmp/bt-dst
# ./bt-migrate --source utorrent --source-dir=/tmp/bt-src --target-dir=/tmp/bt-dst --dry-run --verbose
waltercruz commented 8 years ago

created the links, and tried to run.

[ waltercruz stark0 ~/devel/bt-migrate ] ./bt-migrate --source utorrent --source-dir=/tmp/bt-src --target-dir=/tmp/bt-dst --dry-run --verbose
[2016-Feb-29 22:34:18.638212] [I] Source: uTorrent ("/Users/waltercruz/Library/Application Support/uTorrent")
[2016-Feb-29 22:34:18.639254] [E] Error: No torrent client matched data directory

maybe something is broken on my side :(

mikedld commented 8 years ago

Try passing --target transmission as well. If destination directory is empty it's hard to guess which client it's for :)

waltercruz commented 8 years ago

doens't work :(

BTW, the path for transmission files on mac now is ~/Library/Application\ Support/Transmission

But, even wth the right symlinks, it says.. "Import started", "Import succeeded" for all files, but nothing is really imported.

waltercruz commented 8 years ago

Ouch, I found it! needs to load the .torrent file on transmission again. now it's working!

rakudaniku commented 7 years ago

nvm, I messed up. Here is the correct order that worked for me (using the fix from 29 Feb 2016):

./bt-migrate --source uTorrent --source-dir /tmp/bt-src --target Transmission --target-dir /tmp/bt-dst

Then make sure that your Transmission settings have the following unchecked in Preferences -> Transfers -> Adding: "Start Transfers", "Trash .torrent files" and "Display a window when opening a torrent file". screen shot 2017-05-16 at 22 03 56

Then open all the .torrent files form ~/Library/Application\ Support/Transmission/Torrents in Transmission and it should find all the locations automatically using the .resume files. If complete transfers are grey and 100% then it worked.

deweydb commented 6 years ago

I'm having the same issue, I can't get this thing to work. Boost 1.62.0, OSX 10.12.6

I did not have a ~/.config/transmission directory though? maybe this location has changed with newer versions of transmission? I made the folder manually. mkdir ~/.config/transmission

Then did the linking

ln -s ~/Library/Application\ Support/uTorrent /tmp/bt-src
ln -s ~/.config/transmission /tmp/bt-dst
ls -al /tmp/bt*
lrwxr-xr-x  1 deweydb  wheel    35B 22 Feb 12:06 /tmp/bt-dst@ -> /Users/deweydb/.config/transmission
lrwxr-xr-x  1 deweydb  wheel    51B 22 Feb 12:06 /tmp/bt-src@ -> /Users/deweydb/Library/Application Support/uTorrent

Then trying to run it:

./BtMigrate --source uTorrent --source-dir /tmp/bt-src --target transmission --target-dir /tmp/bt-dst --dry-run --verbose
[2018-Feb-22 12:25:50.851504] [I] Source: uTorrent ("/Users/deweydb/Library/Application Support/uTorrent")
[2018-Feb-22 12:25:50.851966] [E] Error: Bad target data directory: "/Users/deweydb/.config/transmission"

It appears that transmission actually holds its data in ~/Library/Application Support/Transmission Is that the correct folder to use as destination?

mikedld commented 5 years ago

I've finally switched (see c8ebd6b21a383004dec2c51e96a50a8435f0ab53) to std::string in program options to workaround boost defect mentioned earlier. There was also a number of improvements like adding "TransmissionMac" target in addition to previous "Transmission" target, with former generating not only resume and torrent files (but in proper directories now!) but also Transfers.plist file which allows to avoid any manual actions after the migration. Please do test and see if it works.

Keep in mind that due to the change in resume and torrent files naming in currently unreleased version of Transmission, those files are generated with new-style names by default. See https://github.com/mikedld/bt-migrate/issues/6#issuecomment-500030280 to get the old names back if you're using 2.9x or older, which is most probably the case.

j1warren commented 4 years ago

Since transmission now supports labels, could you maybe implement exporting them from utorrent and importing them to transmission?

https://github.com/transmission/transmission/pull/822

mikedld commented 4 years ago

@waltercruz, are you okay with closing this?

mikedld commented 4 years ago

@j1warren, not merged which means it doesn't really officially support labels yet. Will consider after the merge, but worth creating a separate issue.

EDIT: Sorry, it is merged after all. Separate issue for this would still be better though.

waltercruz commented 4 years ago

@waltercruz, are you okay with closing this?

sure!