idlesign / torrt

Automates torrent updates for you
https://github.com/idlesign/torrt
BSD 3-Clause "New" or "Revised" License
112 stars 19 forks source link

[Transmission] Can't register torrents already in client using hash #57

Closed SakhJack closed 3 years ago

SakhJack commented 3 years ago
Debug `register_torrent` ```console C:\Windows\system32>torrt register_torrent 65755778aff25ec7b8ec7485ad0ede24f0d65629 --verbose DEBUG: Bootstrapping torrt environment ... DEBUG: Importing rpc ... DEBUG: Registering `deluge` from ... DEBUG: Registering `qbittorrent` from ... DEBUG: Registering `transmission` from ... DEBUG: Registering `utorrent` from ... DEBUG: Importing trackers ... DEBUG: Registering `tr.anidub.com` from ... DEBUG: Registering `anilibria.tv` from ... DEBUG: Registering `casstudio.tv` from ... DEBUG: Registering `kinozal.tv` from ... DEBUG: Registering `nnm-club.me` from ... DEBUG: Registering `rutor.org` from ... DEBUG: Registering `rutracker.org` from ... DEBUG: Importing notifiers ... DEBUG: Registering `email` from ... DEBUG: Registering `telegram` from ... DEBUG: Importing bots ... DEBUG: Registering `telegram` from ... DEBUG: Initializing objects registries from configuration file ... DEBUG: Loading configuration file C:\Users\Toyohara\.torrt\config.json ... DEBUG: Spawning `TransmissionRPC` object with the given settings ... DEBUG: Registering `transmission` from transmission ... DEBUG: Spawning `AnilibriaTracker` object with the given settings ... DEBUG: Registering `anilibria.tv` from anilibria.tv ... DEBUG: Spawning `RutorTracker` object with the given settings ... DEBUG: Registering `rutor.org` from rutor.org ... DEBUG: Spawning `RuTrackerTracker` object with the given settings ... DEBUG: Registering `rutracker.org` from rutracker.org ... DEBUG: Registering `65755778aff25ec7b8ec7485ad0ede24f0d65629` torrent ... Traceback (most recent call last): File "c:\users\toyohara\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "c:\users\toyohara\appdata\local\programs\python\python37\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\Toyohara\AppData\Local\Programs\Python\Python37\Scripts\torrt.exe\__main__.py", line 7, in File "c:\users\toyohara\appdata\local\programs\python\python37\lib\site-packages\torrt\main.py", line 209, in process_commands register_torrent(args['hash'], url=args['url']) File "c:\users\toyohara\appdata\local\programs\python\python37\lib\site-packages\torrt\toolbox.py", line 207, in register_torrent structure_torrent_data(cfg['torrents'], hash_str, torrent_data) File "c:\users\toyohara\appdata\local\programs\python\python37\lib\site-packages\torrt\utils.py", line 438, in structure_torrent_data if not data.hash: File "c:\users\toyohara\appdata\local\programs\python\python37\lib\site-packages\torrt\utils.py", line 401, in _get_hash return self._hash or self.parsed.info_hash AttributeError: 'NoneType' object has no attribute 'info_hash' ```

P.S. Unrelated, but is it possible to add a feature to remember which files were skipped from old torrent when updating?

Example (I want to NOT download "Bonus" folder) ![image](https://user-images.githubusercontent.com/10335530/93278555-91c4f700-f7b4-11ea-9948-290a4b812bae.png)
idlesign commented 3 years ago

Thank you for the report. I'll try to reproduce it in a week.

P.S. Unrelated, but is it possible to add a feature to remember which files were skipped from old torrent when updating?

This one would depend on torrent client used. E.g. this should be supported for Transmission (https://github.com/idlesign/torrt/blob/master/torrt/rpc/transmission.py#L131), if not working please file a separate issue to work upon.

idlesign commented 3 years ago

Seems to be fixed in 0.15.0. Please give it a try.