8000 [Transmission] Неразмагниченные торренты · Issue #63 · mdevaev/emonoda · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[Transmission] Неразмагниченные торренты #63
Open
@YurikaL

Description

@YurikaL

Похоже, что те торренты, к которым ещё не были загружены метаданные, вызывают некоторые затруднения при поптыке их обработать. В частности, спотыкаются команды emfind и emfile. Типичная ошибка выглядит примерно вот так:

# E: Can't process torrent: /var/lib/transmission/.config/transmission-daemon/torrents/<torrent-name>
Traceback (most recent call last):
File "/usr/bin/emfind", line 9, in <module>
main()
File "/usr/lib/python3.8/site-packages/emonoda/apps/__init__.py", line 161, in wrap
method()
File "/usr/lib/python3.8/site-packages/emonoda/apps/emfind.py", line 278, in main
cache=get_cache(False),
File "/usr/lib/python3.8/site-packages/emonoda/apps/emfind.py", line 263, in get_cache
return datacache.get_cache(
File "/usr/lib/python3.8/site-packages/emonoda/helpers/datacache.py", line 57, in get_cache
if _update(cache, client, files_from_client, torrents_dir_path, name_filter, log):
File "/usr/lib/python3.8/site-packages/emonoda/helpers/datacache.py", line 122, in _update
torrents = tcollection.by_hash(tcollection.load_from_dir(path, name_filter, True, log))
File "/usr/lib/python3.8/site-packages/emonoda/helpers/tcollection.py", line 49, in load_from_dir
torrents[name].get_hash()  # type: ignore
File "/usr/lib/python3.8/site-packages/emonoda/tfile.py", line 141, in get_hash
self.__hash = hashlib.sha1(bencoder.bencode(self.__bencode[b"info"])).hexdigest().lower()

Или так (emfile):

Traceback (most recent call last):
File "/usr/bin/emfile", line 9, in <module>
main()
File "/usr/lib/python3.8/site-packages/emonoda/apps/__init__.py", line 161, in wrap
method()
File "/usr/lib/python3.8/site-packages/emonoda/apps/emfile.py", line 243, in main
print_pretty_all(torrent, client, config.emfile.show_customs, log_stdout)
File "/usr/lib/python3.8/site-packages/emonoda/apps/emfile.py", line 156, in print_pretty_all
log.print("{blue}Name:{reset}           %s", (torrent.get_name(),))
File "/usr/lib/python3.8/site-packages/emonoda/tfile.py", line 105, in get_name
return self.__decode(self.__bencode[b"info"][b"name"], surrogate_escape)
KeyError: b'info'

Как воспроизвести: указать в качестве core/torrents_dir тот каталог, в который Transmission складывает .torrent-файлы, добавить в клиент magnet-ссылку и выполнить emfile или emfind до того, как к ней скачаются метаданные.

Workaround: скопировать все размагниченные торренты в отдельный каталог и указать его в качестве torrents_dir. Наппример, с помощью rsync и опции --min-size=300. На глаз неразмагниченные торренты приблизительно укладываются именно в такой лимит.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0