Merge pull request #1161 from jzelinskie/torrenthmac

misc torrent changes
This commit is contained in:
Jimmy Zelinskie 2016-01-22 23:02:44 -05:00
commit 85ae1a2a0a
7 changed files with 14 additions and 14 deletions

View file

@ -282,11 +282,11 @@ def _repo_verb(namespace, repository, tag, verb, formatter, sign=False, checker=
# Close any existing DB connection once the process has exited.
database.close_db_filter(None)
hasher = PieceHasher(app.config['TORRENT_PIECE_SIZE'])
hasher = PieceHasher(app.config['BITTORRENT_PIECE_SIZE'])
def _store_metadata_and_cleanup():
with database.UseThenDisconnect(app.config):
model.storage.save_torrent_info(derived, app.config['TORRENT_PIECE_SIZE'],
model.storage.save_torrent_info(derived, app.config['BITTORRENT_PIECE_SIZE'],
hasher.final_piece_hashes())
derived.image_size = hasher.hashed_bytes
derived.save()