Giter Club home page Giter Club logo

bt-migrate's People

Contributors

kylesanderson avatar mikedld avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

bt-migrate's Issues

Missing pthread

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

Torrents transferred without names

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?

Torrents partially downloaded from uTorrent crash transmission when imported

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.

Imported torrents from rTorrent dont have their save paths set.

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.

deluge to transmission mapped_files not found

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

Several issues

There is a whole range of bugs and missing things, ill try to summarize them here in one

  • BININT2 (opcode 77) is missing, should be uint16_t
  • you should be using wstring often times, because torrent names/files can contain unicode characters
  • here you should be adding
        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

  • Files renamed in deluge dont transfer their name into transmission
  • File priorities (including skip) dont transfer from deluge into transmission
  • Various string_view and constexpr missing, not that important
  • this is not going to work on windows, because it includes the character : from the timestamp in the filename, which is not allowed. You could replace it with some other character like this
static 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;
}

Export from Transmission to rTorrent

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.

Can't migrate from uTorrent

on Mac OS 10.11

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

Newbie problem installing - SQLITE3

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?

image

CMakeError.log
CMakeOutput.log

Aborted: File name too long

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)

export from qbittorrent, import to rtorrent

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.

Error: More than one torrent client matched data directory

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)

Only part of torrents migrated

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.
Snipaste_2019-12-02_20-35-57

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.

No tracker information after transfer.

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?

Aborted (core dumped)

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)

releases please?

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?...

Error: Not implemented: GuessDataDir

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 ?

Deluge to Transmission: Pickle opcode 128 not yet supported

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.