Skip to content

Commit

Permalink
fix: Use path for name when download is metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Aug 9, 2019
1 parent 0700022 commit d18af50
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/aria2p/downloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ def name(self):
if not self._name:
if self.bittorrent and self.bittorrent.info:
self._name = self.bittorrent.info["name"]
elif self.files[0].is_metadata:
self._name = str(self.files[0].path)
else:
file_path = str(self.files[0].path.absolute())
dir_path = str(self.dir.absolute())
Expand Down

0 comments on commit d18af50

Please sign in to comment.