Skip to content

Commit

Permalink
Merge branch 'master' of github.com:pawamoy/aria2p
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Apr 2, 2021
2 parents b14ce98 + 9e64888 commit 5a4ab65
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 15 deletions.
24 changes: 24 additions & 0 deletions CHANGELOG.md
Expand Up @@ -5,6 +5,30 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

<!-- insertion marker -->
## [0.10.4](https://github.com/pawamoy/aria2p/releases/tag/0.10.4) - 2021-01-06

<small>[Compare with 0.10.3](https://github.com/pawamoy/aria2p/compare/0.10.3...0.10.4)</small>

### Bug Fixes
- Always depend on appdirs (not only in tui extra) ([7f36a04](https://github.com/pawamoy/aria2p/commit/7f36a04aaece28acf16a61fe7b87a5869aab3ac5) by Timothée Mazzucotelli).


## [0.10.3](https://github.com/pawamoy/aria2p/releases/tag/0.10.3) - 2020-12-30

<small>[Compare with 0.10.2](https://github.com/pawamoy/aria2p/compare/0.10.2...0.10.3)</small>

### Bug Fixes
- Add missing extra dependencies for tui group ([60f9e69](https://github.com/pawamoy/aria2p/commit/60f9e696c3961b0e91c6bfd3b4ba816f0b7bd6cd) by Timothée Mazzucotelli).


## [0.10.2](https://github.com/pawamoy/aria2p/releases/tag/0.10.2) - 2020-12-30

<small>[Compare with 0.10.1](https://github.com/pawamoy/aria2p/compare/0.10.1...0.10.2)</small>

### Bug Fixes
- Add back missing commands aliases ([cd25e78](https://github.com/pawamoy/aria2p/commit/cd25e787179055d6d6e271c1d64f61fef9c9cf4f) by Timothée Mazzucotelli).


## [0.10.1](https://github.com/pawamoy/aria2p/releases/tag/0.10.1) - 2020-11-28

<small>[Compare with 0.10.0](https://github.com/pawamoy/aria2p/compare/0.10.0...0.10.1)</small>
Expand Down
7 changes: 3 additions & 4 deletions CREDITS.md
Expand Up @@ -10,6 +10,7 @@ These projects were used to build `aria2p`. **Thank you!**
[`copier-poetry`](https://github.com/pawamoy/copier-poetry)

### Direct dependencies
[`appdirs`](http://github.com/ActiveState/appdirs) |
[`asciimatics`](https://github.com/peterbrittain/asciimatics) |
[`autoflake`](https://github.com/myint/autoflake) |
[`black`](https://github.com/psf/black) |
Expand Down Expand Up @@ -45,15 +46,13 @@ These projects were used to build `aria2p`. **Thank you!**
[`toml`](https://github.com/uiri/toml) |
[`uvicorn`](https://github.com/encode/uvicorn) |
[`websocket_client`](https://github.com/websocket-client/websocket-client.git) |
[`wemake-python-styleguide`](https://wemake-python-stylegui.de) |
[`xdg`](https://github.com/srstevenson/xdg)
[`wemake-python-styleguide`](https://wemake-python-stylegui.de)

### Indirect dependencies
[`aiocontextvars`](https://github.com/fantix/aiocontextvars) |
[`altgraph`](https://altgraph.readthedocs.io) |
[`ansimarkup`](https://github.com/gvalkov/python-ansimarkup) |
[`apipkg`](https://github.com/pytest-dev/apipkg) |
[`appdirs`](http://github.com/ActiveState/appdirs) |
[`appnope`](http://github.com/minrk/appnope) |
[`astor`](https://github.com/berkerpeksag/astor) |
[`astroid`](https://github.com/PyCQA/astroid) |
Expand Down Expand Up @@ -99,7 +98,7 @@ These projects were used to build `aria2p`. **Thank you!**
[`httpcore`](https://github.com/encode/httpcore) |
[`idna`](https://github.com/kjd/idna) |
[`immutables`](https://github.com/MagicStack/immutables) |
[`importlib-metadata`](http://importlib-metadata.readthedocs.io/) |
[`importlib-metadata`](https://github.com/python/importlib_metadata) |
[`iniconfig`](http://github.com/RonnyPfannschmidt/iniconfig) |
[`ipython-genutils`](http://ipython.org) |
[`jedi`](https://github.com/davidhalter/jedi) |
Expand Down
12 changes: 6 additions & 6 deletions pyproject.toml
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "aria2p"
version = "0.10.1"
version = "0.10.4"
description = "Command-line tool and library to interact with an aria2c daemon process with JSON-RPC."
authors = ["Timothée Mazzucotelli <pawamoy@pm.me>"]
license = "ISC"
Expand All @@ -20,16 +20,16 @@ include = [

[tool.poetry.dependencies]
python = "^3.6"
requests = ">2.19.1"
appdirs = "^1.4.4"
loguru = "*"
websocket_client = "*"
requests = ">2.19.1"
toml = "^0.10.2"
websocket_client = "*"
asciimatics = {version = "^1.11.0", optional = true}
xdg = {version = "^4.0.1", optional = true}
pyperclip = {version = "^1.8.0", optional = true}

[tool.poetry.extras]
tui = ["asciimatics"]
tui = ["asciimatics", "pyperclip"]

[tool.poetry.dev-dependencies]
asciimatics = "^1.11.0"
Expand Down Expand Up @@ -66,7 +66,7 @@ responses = "^0.10.14"
toml = "^0.10.1"
uvicorn = "^0.12.2"
wemake-python-styleguide = "^0.14.1"
xdg = "^4.0.1"
appdirs = "^1.4.4"

[tool.poetry.scripts]
aria2p = "aria2p.cli:main"
Expand Down
6 changes: 3 additions & 3 deletions src/aria2p/api.py
Expand Up @@ -499,10 +499,10 @@ def remove_all(self, force: bool = False) -> bool:

def pause(self, downloads: List[Download], force: bool = False) -> List[OperationResult]:
"""
Remove the given downloads from the list.
Pause the given (active) downloads.
Arguments:
downloads: The list of downloads to remove.
downloads: The list of downloads to pause.
force: Whether to pause immediately without contacting servers or not.
Returns:
Expand Down Expand Up @@ -530,7 +530,7 @@ def pause(self, downloads: List[Download], force: bool = False) -> List[Operatio

def pause_all(self, force: bool = False) -> bool:
"""
Remove the given downloads from the list.
Pause all (active) downloads.
Arguments:
force: Whether to pause immediately without contacting servers or not.
Expand Down
3 changes: 3 additions & 0 deletions src/aria2p/cli.py
Expand Up @@ -94,8 +94,11 @@ def main(args: Optional[List[str]] = None) -> int:
"top": subcommand_top,
"call": subcommand_call,
"add": subcommand_add,
"add-magnet": subcommand_add_magnets, # alias for add-magnets
"add-magnets": subcommand_add_magnets,
"add-torrent": subcommand_add_torrents, # alias for add-torrents
"add-torrents": subcommand_add_torrents,
"add-metalink": subcommand_add_metalinks, # alias for add-metalinks
"add-metalinks": subcommand_add_metalinks,
"pause": subcommand_pause,
"stop": subcommand_pause, # alias for pause
Expand Down
4 changes: 2 additions & 2 deletions src/aria2p/utils.py
Expand Up @@ -12,8 +12,8 @@

import pkg_resources
import toml
from appdirs import user_config_dir
from loguru import logger
from xdg import XDG_CONFIG_HOME

from aria2p.types import PathOrStr

Expand Down Expand Up @@ -240,7 +240,7 @@ def load_configuration() -> Dict[str, Any]:
config_dict["DEFAULT"] = toml.loads(default_config)

# Check for configuration file
config_file_path = Path(XDG_CONFIG_HOME) / "aria2p" / "config.toml"
config_file_path = Path(user_config_dir("aria2p")) / "config.toml"

if config_file_path.exists():
try:
Expand Down

0 comments on commit 5a4ab65

Please sign in to comment.