mirror of
https://github.com/Benexl/FastAnime.git
synced 2026-01-07 02:03:49 -08:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
594c687c8b | ||
|
|
91b5d3ea40 | ||
|
|
8c30a7667c | ||
|
|
179fbe59ac | ||
|
|
5bfc210f59 | ||
|
|
eb9c200fca |
@@ -6,7 +6,7 @@ if sys.version_info < (3, 10):
|
|||||||
) # noqa: F541
|
) # noqa: F541
|
||||||
|
|
||||||
|
|
||||||
__version__ = "v0.60.4"
|
__version__ = "v0.61.0"
|
||||||
|
|
||||||
APP_NAME = "FastAnime"
|
APP_NAME = "FastAnime"
|
||||||
AUTHOR = "Benex254"
|
AUTHOR = "Benex254"
|
||||||
|
|||||||
@@ -126,6 +126,9 @@ signal.signal(signal.SIGINT, handle_exit)
|
|||||||
help="Rofi theme to use for the user input prompt",
|
help="Rofi theme to use for the user input prompt",
|
||||||
type=click.Path(),
|
type=click.Path(),
|
||||||
)
|
)
|
||||||
|
@click.option(
|
||||||
|
"--use-mpv-mod/--use-default-player", help="Whether to use python-mpv", type=bool
|
||||||
|
)
|
||||||
@click.pass_context
|
@click.pass_context
|
||||||
def run_cli(
|
def run_cli(
|
||||||
ctx: click.Context,
|
ctx: click.Context,
|
||||||
@@ -155,6 +158,7 @@ def run_cli(
|
|||||||
rofi_theme,
|
rofi_theme,
|
||||||
rofi_theme_confirm,
|
rofi_theme_confirm,
|
||||||
rofi_theme_input,
|
rofi_theme_input,
|
||||||
|
use_mpv_mod,
|
||||||
):
|
):
|
||||||
from .config import Config
|
from .config import Config
|
||||||
|
|
||||||
@@ -217,6 +221,11 @@ def run_cli(
|
|||||||
== click.core.ParameterSource.COMMANDLINE
|
== click.core.ParameterSource.COMMANDLINE
|
||||||
):
|
):
|
||||||
ctx.obj.auto_select = auto_select
|
ctx.obj.auto_select = auto_select
|
||||||
|
if (
|
||||||
|
ctx.get_parameter_source("use_mpv_mod")
|
||||||
|
== click.core.ParameterSource.COMMANDLINE
|
||||||
|
):
|
||||||
|
ctx.obj.use_mpv_mod = use_mpv_mod
|
||||||
if sort_by:
|
if sort_by:
|
||||||
ctx.obj.sort_by = sort_by
|
ctx.obj.sort_by = sort_by
|
||||||
if downloads_dir:
|
if downloads_dir:
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class Config(object):
|
|||||||
"rofi_theme": "",
|
"rofi_theme": "",
|
||||||
"rofi_theme_input": "",
|
"rofi_theme_input": "",
|
||||||
"rofi_theme_confirm": "",
|
"rofi_theme_confirm": "",
|
||||||
"use_mpv_mod": "true",
|
"use_mpv_mod": "false",
|
||||||
"force_window": "immediate",
|
"force_window": "immediate",
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -178,7 +178,6 @@ class MpvPlayer(object):
|
|||||||
property, time_remaining: float | None = None, *args
|
property, time_remaining: float | None = None, *args
|
||||||
):
|
):
|
||||||
if time_remaining is not None:
|
if time_remaining is not None:
|
||||||
print(time_remaining, self.player_fetching)
|
|
||||||
if time_remaining < 1 and config.auto_next and not self.player_fetching:
|
if time_remaining < 1 and config.auto_next and not self.player_fetching:
|
||||||
print("Auto Fetching Next Episode")
|
print("Auto Fetching Next Episode")
|
||||||
self.player_fetching = True
|
self.player_fetching = True
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import sys
|
|||||||
from typing import Callable, List
|
from typing import Callable, List
|
||||||
|
|
||||||
# TODO: will probably scrap art not to useful
|
# TODO: will probably scrap art not to useful
|
||||||
from art import text2art
|
|
||||||
from click import clear
|
from click import clear
|
||||||
from rich import print
|
from rich import print
|
||||||
|
|
||||||
@@ -22,6 +21,17 @@ FZF_DEFAULT_OPTS = """
|
|||||||
--marker=">" --pointer="◆" --separator="─" --scrollbar="│"
|
--marker=">" --pointer="◆" --separator="─" --scrollbar="│"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
HEADER = """
|
||||||
|
|
||||||
|
███████╗░█████╗░░██████╗████████╗░█████╗░███╗░░██╗██╗███╗░░░███╗███████╗
|
||||||
|
██╔════╝██╔══██╗██╔════╝╚══██╔══╝██╔══██╗████╗░██║██║████╗░████║██╔════╝
|
||||||
|
█████╗░░███████║╚█████╗░░░░██║░░░███████║██╔██╗██║██║██╔████╔██║█████╗░░
|
||||||
|
██╔══╝░░██╔══██║░╚═══██╗░░░██║░░░██╔══██║██║╚████║██║██║╚██╔╝██║██╔══╝░░
|
||||||
|
██║░░░░░██║░░██║██████╔╝░░░██║░░░██║░░██║██║░╚███║██║██║░╚═╝░██║███████╗
|
||||||
|
╚═╝░░░░░╚═╝░░╚═╝╚═════╝░░░░╚═╝░░░╚═╝░░╚═╝╚═╝░░╚══╝╚═╝╚═╝░░░░░╚═╝╚══════╝
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
class FZF:
|
class FZF:
|
||||||
"""an abstraction over the fzf commandline utility
|
"""an abstraction over the fzf commandline utility
|
||||||
@@ -149,7 +159,7 @@ class FZF:
|
|||||||
_commands = [
|
_commands = [
|
||||||
*self.default_options,
|
*self.default_options,
|
||||||
"--header",
|
"--header",
|
||||||
text2art(header),
|
HEADER,
|
||||||
"--header-first",
|
"--header-first",
|
||||||
"--prompt",
|
"--prompt",
|
||||||
prompt.title(),
|
prompt.title(),
|
||||||
|
|||||||
16
poetry.lock
generated
16
poetry.lock
generated
@@ -1,19 +1,5 @@
|
|||||||
# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand.
|
# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand.
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "art"
|
|
||||||
version = "6.2"
|
|
||||||
description = "ASCII Art Library For Python"
|
|
||||||
optional = false
|
|
||||||
python-versions = ">=3.5"
|
|
||||||
files = [
|
|
||||||
{file = "art-6.2-py3-none-any.whl", hash = "sha256:d632d1d3f5fabcaf8673abe934b51df0017bc914d106e89d45ae4ebef0e3149a"},
|
|
||||||
{file = "art-6.2.tar.gz", hash = "sha256:506a0c4f261289a0e0d088de7beffcb1835078c4e44b0c5353bdaf47b490e76f"},
|
|
||||||
]
|
|
||||||
|
|
||||||
[package.extras]
|
|
||||||
dev = ["bandit (>=1.5.1)", "coverage (>=4.1)", "pydocstyle (>=3.0.0)", "vulture (>=1.0)"]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "autoflake"
|
name = "autoflake"
|
||||||
version = "2.3.1"
|
version = "2.3.1"
|
||||||
@@ -1421,4 +1407,4 @@ test = ["pytest (>=8.1,<9.0)"]
|
|||||||
[metadata]
|
[metadata]
|
||||||
lock-version = "2.0"
|
lock-version = "2.0"
|
||||||
python-versions = "^3.10"
|
python-versions = "^3.10"
|
||||||
content-hash = "5305621bc02d824065519913f0d754e269f1e4525ba8796be08504120614259d"
|
content-hash = "83ec7de7d9466dcd1fadef4b21eec2a879cc9a7d526992ed280b6af53b49d9f1"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "fastanime"
|
name = "fastanime"
|
||||||
version = "0.60.4.dev1"
|
version = "0.61.0.dev1"
|
||||||
description = "A browser anime site experience from the terminal"
|
description = "A browser anime site experience from the terminal"
|
||||||
authors = ["Benextempest <benextempest@gmail.com>"]
|
authors = ["Benextempest <benextempest@gmail.com>"]
|
||||||
license = "UNLICENSE"
|
license = "UNLICENSE"
|
||||||
@@ -13,7 +13,6 @@ rich = "^13.7.1"
|
|||||||
click = "^8.1.7"
|
click = "^8.1.7"
|
||||||
inquirerpy = "^0.3.4"
|
inquirerpy = "^0.3.4"
|
||||||
platformdirs = "^4.2.2"
|
platformdirs = "^4.2.2"
|
||||||
art = "^6.2"
|
|
||||||
python-dotenv = "^1.0.1"
|
python-dotenv = "^1.0.1"
|
||||||
thefuzz = "^0.22.1"
|
thefuzz = "^0.22.1"
|
||||||
requests = "^2.32.3"
|
requests = "^2.32.3"
|
||||||
|
|||||||
Reference in New Issue
Block a user