mikedld / bt-migrate Goto Github PK
View Code? Open in Web Editor NEWTorrent state migration tool
License: GNU General Public License v3.0
Torrent state migration tool
License: GNU General Public License v3.0
While compiling on OSMC I get the following error:
Linking CXX executable bt-migrate
/usr/bin/ld: CMakeFiles/bt-migrate.dir/ImportHelper.cpp.o: undefined reference to symbol 'pthread_create@@GLIBC_2.4'
//lib/arm-linux-gnueabihf/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
CMakeFiles/bt-migrate.dir/build.make:566: recipe for target 'bt-migrate' failed
make[2]: *** [bt-migrate] Error 1
CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/bt-migrate.dir/all' failed
make[1]: *** [CMakeFiles/bt-migrate.dir/all] Error 2
Makefile:107: recipe for target 'all' failed
make: *** [all] Error 2
To fix simply add pthread to target_link_libraries in CMakeLists.txt
Here is the associated patch:
From f8011c620500de08a487f939a65d1e67276f0f03 Mon Sep 17 00:00:00 2001
From: Erich L Foster <[email protected]>
Date: Sat, 14 May 2016 14:04:26 +0200
Subject: [PATCH] Fixed pthread link.
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4c2f7ad..ee8b9e4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -84,4 +84,4 @@ unset(CMAKE_LIBRARY_OUTPUT_DIRECTORY CACHE)
unset(CMAKE_RUNTIME_OUTPUT_DIRECTORY CACHE)
add_executable(${PROJECT_NAME} ${${PROJECT_NAME}_SOURCES} ${${PROJECT_NAME}_HEADERS})
-target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES} jsoncpp_lib)
+target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES} jsoncpp_lib pthread)
--
2.1.4
I transferred my torrents from rtorrent to Transmission, and while it worked very nicely for the most part, a lot of torrents ended up with no names: they just come across as a period (.). Makes it very hard to figure out what's what - any suggestions?
When exporting from uTorrent 2.2.1 into transmission, if you have any completed torrents that you set any files to "Don't download", it crashes deluge with the following error when imported:
assertion failed: tr_isPriority(priority) (/home/buildozer/aports/community/transmission/src/transmission-3.00/libtransmission/torrent.c:2381)
Not sure if relevant, but uTorrent had also created a ~uTorrentPartFile_28298F90.dat
file in that torrent's directory.
Ran
./BtMigrate --source rtorrent --source-dir ~/.session --target transmission --target-dir
~/.config/transmission-daemon
Imported 4600 torrents, however they all default to the Downloads directory and not their existing save directories. Coming from rtorrent 0.9.6.
So this is probably a bit of an edge case. I converted my uTorrent torrents from windows to deluge on windows. Than from deluge on windows to deluge on linux by modifying the paths with scripts (and that worked). Now i'm attempting to convert them from deluge to transmission but running into issues.
command used is:
./bt-migrate/BtMigrate --source deluge --source-dir /home/config --target Transmission --target /home/transmission-daemon/info --dry-run --verbose
The output is:
[2018-Jul-01 03:35:31.568581] [I] Source: Deluge ("/home/config")
[2018-Jul-01 03:35:31.568665] [I] Target: Transmission ("/home/transmission-daemon/info")
[2018-Jul-01 03:35:31.568683] [D] [Deluge] Loading torrents.fastresume
[2018-Jul-01 03:35:31.607886] [D] [Deluge] Loading torrents.state
terminate called after throwing an instance of 'jsoncons::json_exception_1<std::out_of_range>'
what(): mapped_files not found
Aborted
There is a whole range of bugs and missing things, ill try to summarize them here in one
if (i >= box.Files.size())
break;
for me it was the case that filePriorities.size() > box.Files.size()
for multiple torrents, causing an array out of range access and thus crash
:
from the timestamp in the filename, which is not allowed. You could replace it with some other character like thisstatic std::string ReplaceAll(std::string_view str, std::string_view before, std::string_view after)
{
std::string newString;
newString.reserve(str.length());
size_t i = 0, j = 0;
while ((i = str.find(before, j)) != std::string_view::npos)
{
newString.append(str, j, i - j);
newString.append(after);
j = i + before.length();
}
newString.append(str.substr(j));
return newString;
}
fs::path MigrationTransaction::GetTemporaryPath(fs::path const& path) const
{
fs::path result = path;
result += ".tmp." + ReplaceAll(m_transactionId, ":", "-");
return result;
}
fs::path MigrationTransaction::GetBackupPath(fs::path const& path) const
{
fs::path result = path;
result += ".bak." + ReplaceAll(m_transactionId, ":", "-");
return result;
}
If a decoder for rTorrent and an encoder for Transmission are implemented, I think it would be easy to make the process go in reverse direction. Please implement export from transmission and import to rTorrent.
on Mac OS 10.11
./bt-migrate --source utorrent --source-dir=/Users/waltercruz/Library/Application\ Support/uTorrent/ --target-dir ~/.config/transmission --dry-run --verbose
So, I basically know nothing about CMD, but I'm trying to change desperately from uTorrent to Transmission.
I've been in the past hours trying to install the cmake and boost (which I've never even knew it existed). Installed the VS Code, etc.
When I finally thought I did it... It didn't work. I have no idea why, I even tried to install SQLITE3 but no deal, to be honest I'm not even sure if I know who to do it.
Also I have no idea of how to use commands like find_package, etc which I found on almost all solutions but for me that's hebrew.
Anyone could please help me?
Terminate called after throwing an instance of 'boost::filesystem::filesystem_error'
what(): boost::filesystem::status: File name too long: "/home/uTorrent/[long-torrent-name].torrent"
Aborted (core dumped)
I would like to migrate from qbittorrent to rtorrent, so I am just stating my interest.
I found this old forum post from someone else wanting to perform the same migration.
In case you are interested in integrating these at any point, please let me know if there is any support I could provide.
Trying to migrate from uTorrent to Transmission.
iMac (21.5-inch, Late 2009)
Mac OS 10.13.6 (17G13033)
I made aliases for the source and destination as suggested in an older thread:
./BtMigrate --source uTorrent --source-dir=/tmp/bt-src --target-dir=/tmp/bt-dst
Result:
[2020-Jun-06 18:35:35.895159] [I] Source: uTorrent ("/Users/xxx/Library/Application Support/uTorrent")
[2020-Jun-06 18:35:35.895473] [E] Error: More than one torrent client matched data directory
Same thing if I use the full paths instead of aliases.
What causes this? (I've double-checked and the links work fine)
Hi mikedld, thank you for making this amazing tool.
I've spent two whole days to deal with the environment building, and finally cmake found boost libraries.
My platform is Windows 10, and I run the compiled exe file in debug folder(I guess it's correct)
In cmd i run D:\bt-migrate\_build\Debug>BtMigrate.exe --source utorrent --source-dir D:\uTorrent --target transmission --target-dir D:\transmission
However, there were errors during I run the program, and only part of torrents are extracted. And the exported .resume
and .torrent
file hava extensions like xxxxxx.tmp.20191202T203504.416060
. I guess it might have something to do with early abort. The error is shown in picture.
It seems that something like UTF-8 or else is not supported, I've got many torrents containing Japanese and Chinese characters, none of them is extracted. I guess this might be the reason the programe is aborted.
Do you have any idea how to fix this problem?
Great great thanks for the tool, I've got thousands of torrents need to be migrated to transmission.
After transfering .torrents from uTorrent to Transmission there is no information about trackers in Transmission. I guess this is caused because uTorrent doesn't save tracker information inside .torrent files (that's stupid). Instead information about trackers are kept inside resume.dat file.
Could you maybe tweak your tool to fix that?
Encountering the following:
$ ./BtMigrate --source rtorrent --source-dir ~/rtorrent/sessions --target transmission --target-dir ~/.config/transmission-daemon --max-threads 1 --verbose
...
...
terminate called after throwing an instance of 'Exception'
what(): Info hashes don't match: 4fa6f5d1c78e94a1508eff9b36fb505f1d212d40 vs. E96CE1F4C5CC291C0013E3590B2BA4A3D0BBCF10
Aborted (core dumped)
can we maybe have a compiled version?
Cmake requires git, git requires vcpkg, vcpkg requires english package installed, it just never starts to work... why do I even have to do this?...
With command from uTorrent to Transmission, I get error:
Error: Not implemented: GuessDataDir.
However I am using the disappointing uTorrent Web, can this be related ?
When running ./BtMigrate --source deluge --source-dir ./Deluge/config/ --target transmission --target-dir ./Transmission/
I get the following output:
[2020-Mar-07 15:17:15.972061] [I] Source: Deluge ("/home/user/.config/Deluge/config")
[2020-Mar-07 15:17:15.972133] [I] Target: Transmission ("/home/user/.config/Transmission")
[2020-Mar-07 15:17:15.975322] [E] Error: Pickle opcode 128 not yet supported
[2020-Mar-07 15:17:15.975369] [E] Error: Pickle opcode 128 not yet supported
I see this on macOS and Ubuntu, and haven't been able to find any further information about this error.
I'm guessing there's something in my data that's causing this, but I'm not sure how to track it down?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.