mirror of
https://github.com/Benexl/FastAnime.git
synced 2026-01-10 04:05:13 -08:00
Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2d3509ccc1 | ||
|
|
30babf2d69 | ||
|
|
cfbbabf898 | ||
|
|
5ac6c45fdf | ||
|
|
a14645b563 | ||
|
|
90dbc26c46 | ||
|
|
54cc830c35 | ||
|
|
4928ff5b74 | ||
|
|
bb481fe21a | ||
|
|
0d27b8f652 | ||
|
|
bdd3aae399 | ||
|
|
af94cd7eb5 | ||
|
|
54044f9527 | ||
|
|
1e5c039ece | ||
|
|
15555759dc | ||
|
|
0ed51e05cc | ||
|
|
634ef6febf | ||
|
|
bda4b2dbe1 | ||
|
|
f015305e7c | ||
|
|
d32b7e917f | ||
|
|
3b35e80199 | ||
|
|
c65a1a2815 | ||
|
|
0b3615c9f5 |
@@ -1431,5 +1431,6 @@ For inquiries, join our [Discord Server](https://discord.gg/HBEmAwvbHV).
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
## Supporting the Project
|
## Supporting the Project
|
||||||
|
More pr's less issues 🙃
|
||||||
|
|
||||||
Show your support by starring our GitHub repository or [buying us a coffee](https://ko-fi.com/benex254).
|
Show your support by starring the GitHub repository or [buying me a coffee](https://ko-fi.com/benex254).
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ if sys.version_info < (3, 10):
|
|||||||
) # noqa: F541
|
) # noqa: F541
|
||||||
|
|
||||||
|
|
||||||
__version__ = "v2.7.4"
|
__version__ = "v2.7.8"
|
||||||
|
|
||||||
APP_NAME = "FastAnime"
|
APP_NAME = "FastAnime"
|
||||||
AUTHOR = "Benex254"
|
AUTHOR = "Benex254"
|
||||||
|
|||||||
84
fastanime/assets/rofi_theme.rasi
Normal file
84
fastanime/assets/rofi_theme.rasi
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
// https://github.com/Wraient/curd/blob/main/rofi/selectanime.rasi
|
||||||
|
// Go give there project a star!
|
||||||
|
// Was too lazy to make my own preview, so I just used theirs
|
||||||
|
|
||||||
|
|
||||||
|
configuration {
|
||||||
|
font: "Sans 12";
|
||||||
|
line-margin: 10;
|
||||||
|
display-drun: "";
|
||||||
|
}
|
||||||
|
|
||||||
|
* {
|
||||||
|
background: #000000; /* Black background for everything */
|
||||||
|
background-alt: #000000; /* Ensures no alternation */
|
||||||
|
foreground: #CCCCCC;
|
||||||
|
selected: #3584E4;
|
||||||
|
active: #2E7D32;
|
||||||
|
urgent: #C62828;
|
||||||
|
}
|
||||||
|
|
||||||
|
window {
|
||||||
|
fullscreen: false;
|
||||||
|
background-color: rgba(0, 0, 0, 1); /* Solid black background */
|
||||||
|
}
|
||||||
|
|
||||||
|
mainbox {
|
||||||
|
padding: 50px 100px;
|
||||||
|
background-color: rgba(0, 0, 0, 1); /* Ensures black background fills entire main area */
|
||||||
|
children: [inputbar, listview];
|
||||||
|
spacing: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
inputbar {
|
||||||
|
background-color: #333333; /* Dark gray background for input bar */
|
||||||
|
padding: 8px;
|
||||||
|
border-radius: 8px;
|
||||||
|
children: [prompt, entry];
|
||||||
|
}
|
||||||
|
|
||||||
|
prompt {
|
||||||
|
enabled: true;
|
||||||
|
padding: 8px;
|
||||||
|
background-color: @selected;
|
||||||
|
text-color: #000000;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
entry {
|
||||||
|
padding: 8px;
|
||||||
|
background-color: #444444; /* Slightly lighter gray for visibility */
|
||||||
|
text-color: #FFFFFF; /* White text to make typing visible */
|
||||||
|
placeholder: "Search...";
|
||||||
|
placeholder-color: rgba(255, 255, 255, 0.5);
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
listview {
|
||||||
|
layout: vertical;
|
||||||
|
spacing: 8px;
|
||||||
|
lines: 10;
|
||||||
|
background-color: @background; /* Consistent black background for list items */
|
||||||
|
}
|
||||||
|
|
||||||
|
element {
|
||||||
|
padding: 12px;
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: @background; /* Uniform color for each list item */
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
|
||||||
|
element normal.normal {
|
||||||
|
background-color: @background; /* Ensures no alternating color */
|
||||||
|
}
|
||||||
|
|
||||||
|
element selected.normal {
|
||||||
|
background-color: @selected;
|
||||||
|
text-color: #FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
element-text {
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: inherit;
|
||||||
|
vertical-align: 0.5;
|
||||||
|
}
|
||||||
55
fastanime/assets/rofi_theme_confirm.rasi
Normal file
55
fastanime/assets/rofi_theme_confirm.rasi
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
// https://github.com/Wraient/curd/blob/main/rofi/userinput.rasi
|
||||||
|
// Go give there project a star!
|
||||||
|
// Was too lazy to make my own preview, so I just used theirs
|
||||||
|
|
||||||
|
configuration {
|
||||||
|
font: "Sans 12";
|
||||||
|
}
|
||||||
|
|
||||||
|
* {
|
||||||
|
background-color: rgba(0, 0, 0, 0.7);
|
||||||
|
text-color: #FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
window {
|
||||||
|
fullscreen: true;
|
||||||
|
transparency: "real";
|
||||||
|
background-color: @background-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
mainbox {
|
||||||
|
children: [ message, listview, inputbar ];
|
||||||
|
padding: 40% 30%;
|
||||||
|
}
|
||||||
|
|
||||||
|
message {
|
||||||
|
border: 0;
|
||||||
|
padding: 10px;
|
||||||
|
margin: 0 0 20px 0;
|
||||||
|
font: "Sans Bold 24"; /* Increased font size and made it bold */
|
||||||
|
}
|
||||||
|
|
||||||
|
inputbar {
|
||||||
|
children: [ prompt, entry ];
|
||||||
|
background-color: rgba(255, 255, 255, 0.1);
|
||||||
|
padding: 8px;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
prompt {
|
||||||
|
padding: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
entry {
|
||||||
|
padding: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
listview {
|
||||||
|
lines: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Style for the message text specifically */
|
||||||
|
textbox {
|
||||||
|
horizontal-align: 0.5; /* Center the text */
|
||||||
|
font: "Sans Bold 24"; /* Match message font */
|
||||||
|
}
|
||||||
55
fastanime/assets/rofi_theme_input.rasi
Normal file
55
fastanime/assets/rofi_theme_input.rasi
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
// https://github.com/Wraient/curd/blob/main/rofi/userinput.rasi
|
||||||
|
// Go give there project a star!
|
||||||
|
// Was too lazy to make my own preview, so I just used theirs
|
||||||
|
|
||||||
|
configuration {
|
||||||
|
font: "Sans 12";
|
||||||
|
}
|
||||||
|
|
||||||
|
* {
|
||||||
|
background-color: rgba(0, 0, 0, 0.7);
|
||||||
|
text-color: #FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
window {
|
||||||
|
fullscreen: true;
|
||||||
|
transparency: "real";
|
||||||
|
background-color: @background-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
mainbox {
|
||||||
|
children: [ message, listview, inputbar ];
|
||||||
|
padding: 40% 30%;
|
||||||
|
}
|
||||||
|
|
||||||
|
message {
|
||||||
|
border: 0;
|
||||||
|
padding: 10px;
|
||||||
|
margin: 0 0 20px 0;
|
||||||
|
font: "Sans Bold 24"; /* Increased font size and made it bold */
|
||||||
|
}
|
||||||
|
|
||||||
|
inputbar {
|
||||||
|
children: [ prompt, entry ];
|
||||||
|
background-color: rgba(255, 255, 255, 0.1);
|
||||||
|
padding: 8px;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
prompt {
|
||||||
|
padding: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
entry {
|
||||||
|
padding: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
listview {
|
||||||
|
lines: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Style for the message text specifically */
|
||||||
|
textbox {
|
||||||
|
horizontal-align: 0.5; /* Center the text */
|
||||||
|
font: "Sans Bold 24"; /* Match message font */
|
||||||
|
}
|
||||||
122
fastanime/assets/rofi_theme_preview.rasi
Normal file
122
fastanime/assets/rofi_theme_preview.rasi
Normal file
@@ -0,0 +1,122 @@
|
|||||||
|
// Based on https://github.com/Wraient/curd/blob/main/rofi/selectanimepreview.rasi
|
||||||
|
// Go give there project a star!
|
||||||
|
// Was too lazy to make my own preview, so I just used theirs
|
||||||
|
|
||||||
|
// Colours
|
||||||
|
* {
|
||||||
|
background-color: transparent;
|
||||||
|
background: #1D2330;
|
||||||
|
background-transparent: #1D2330A0;
|
||||||
|
text-color: #BBBBBB;
|
||||||
|
text-color-selected: #FFFFFF;
|
||||||
|
primary: #BB77BB;
|
||||||
|
important: #BF616A;
|
||||||
|
}
|
||||||
|
|
||||||
|
configuration {
|
||||||
|
font: "Roboto 17";
|
||||||
|
show-icons: true;
|
||||||
|
}
|
||||||
|
|
||||||
|
window {
|
||||||
|
fullscreen: true;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
transparency: "real";
|
||||||
|
background-color: @background-transparent;
|
||||||
|
border: 0px;
|
||||||
|
border-color: @primary;
|
||||||
|
}
|
||||||
|
|
||||||
|
mainbox {
|
||||||
|
children: [prompt, inputbar-box, listview];
|
||||||
|
padding: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
prompt {
|
||||||
|
width: 100%;
|
||||||
|
margin: 10px 0px 0px 30px;
|
||||||
|
text-color: @important;
|
||||||
|
font: "Roboto Bold 27";
|
||||||
|
}
|
||||||
|
|
||||||
|
listview {
|
||||||
|
layout: vertical;
|
||||||
|
padding: 60px;
|
||||||
|
dynamic: true;
|
||||||
|
columns: 7;
|
||||||
|
spacing: 20px;
|
||||||
|
horizontal-align: center; /* Center the list items */
|
||||||
|
}
|
||||||
|
|
||||||
|
inputbar-box {
|
||||||
|
children: [dummy, inputbar, dummy];
|
||||||
|
orientation: horizontal;
|
||||||
|
expand: false;
|
||||||
|
}
|
||||||
|
|
||||||
|
inputbar {
|
||||||
|
children: [textbox-prompt, entry];
|
||||||
|
margin: 0px;
|
||||||
|
background-color: @primary;
|
||||||
|
border: 4px;
|
||||||
|
border-color: @primary;
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
textbox-prompt {
|
||||||
|
text-color: @background;
|
||||||
|
horizontal-align: 0.5;
|
||||||
|
vertical-align: 0.5;
|
||||||
|
expand: false;
|
||||||
|
}
|
||||||
|
|
||||||
|
entry {
|
||||||
|
expand: false;
|
||||||
|
padding: 8px;
|
||||||
|
margin: -6px;
|
||||||
|
horizontal-align: 0;
|
||||||
|
width: 300;
|
||||||
|
background-color: @background;
|
||||||
|
border: 6px;
|
||||||
|
border-color: @primary;
|
||||||
|
border-radius: 8px;
|
||||||
|
cursor: text;
|
||||||
|
}
|
||||||
|
|
||||||
|
element {
|
||||||
|
children: [dummy, element-box, dummy];
|
||||||
|
padding: 5px;
|
||||||
|
orientation: vertical;
|
||||||
|
border: 0px;
|
||||||
|
border-radius: 16px;
|
||||||
|
background-color: transparent; /* Default background */
|
||||||
|
}
|
||||||
|
|
||||||
|
element selected {
|
||||||
|
background-color: @primary; /* Solid color for selected item */
|
||||||
|
}
|
||||||
|
|
||||||
|
element-box {
|
||||||
|
children: [element-icon, element-text];
|
||||||
|
orientation: vertical;
|
||||||
|
expand: false;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
element-icon {
|
||||||
|
padding: 10px;
|
||||||
|
cursor: inherit;
|
||||||
|
size: 33%;
|
||||||
|
margin: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
element-text {
|
||||||
|
horizontal-align: 0.5;
|
||||||
|
cursor: inherit;
|
||||||
|
text-color: @text-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
element-text selected {
|
||||||
|
text-color: @text-color-selected;
|
||||||
|
}
|
||||||
@@ -226,6 +226,40 @@ def run_cli(
|
|||||||
from .config import Config
|
from .config import Config
|
||||||
|
|
||||||
ctx.obj = Config()
|
ctx.obj = Config()
|
||||||
|
if ctx.obj.check_for_updates:
|
||||||
|
from .app_updater import check_for_updates
|
||||||
|
|
||||||
|
print("Checking for updates...")
|
||||||
|
print("So you can enjoy the latest features and bug fixes")
|
||||||
|
print(
|
||||||
|
"You can disable this by setting check_for_updates to False in the config"
|
||||||
|
)
|
||||||
|
is_latest, github_release_data = check_for_updates()
|
||||||
|
if not is_latest:
|
||||||
|
from rich.console import Console
|
||||||
|
from rich.markdown import Markdown
|
||||||
|
from .app_updater import update_app
|
||||||
|
from rich.prompt import Confirm
|
||||||
|
|
||||||
|
def _print_release(release_data):
|
||||||
|
console = Console()
|
||||||
|
body = Markdown(release_data["body"])
|
||||||
|
tag = github_release_data["tag_name"]
|
||||||
|
tag_title = release_data["name"]
|
||||||
|
github_page_url = release_data["html_url"]
|
||||||
|
console.print(f"Release Page: {github_page_url}")
|
||||||
|
console.print(f"Tag: {tag}")
|
||||||
|
console.print(f"Title: {tag_title}")
|
||||||
|
console.print(body)
|
||||||
|
|
||||||
|
if Confirm.ask(
|
||||||
|
"A new version of fastanime is available, would you like to update?"
|
||||||
|
):
|
||||||
|
_, release_json = update_app()
|
||||||
|
print("Successfully updated")
|
||||||
|
_print_release(release_json)
|
||||||
|
exit(0)
|
||||||
|
|
||||||
ctx.obj.manga = manga
|
ctx.obj.manga = manga
|
||||||
if log:
|
if log:
|
||||||
import logging
|
import logging
|
||||||
|
|||||||
@@ -45,8 +45,9 @@ def check_for_updates():
|
|||||||
|
|
||||||
return (is_latest, release_json)
|
return (is_latest, release_json)
|
||||||
else:
|
else:
|
||||||
|
print("Failed to check for updates")
|
||||||
print(request.text)
|
print(request.text)
|
||||||
return (False, {})
|
return (True, {})
|
||||||
|
|
||||||
|
|
||||||
def is_git_repo(author, repository):
|
def is_git_repo(author, repository):
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ from ..constants import (
|
|||||||
USER_CONFIG_PATH,
|
USER_CONFIG_PATH,
|
||||||
USER_DATA_PATH,
|
USER_DATA_PATH,
|
||||||
USER_VIDEOS_DIR,
|
USER_VIDEOS_DIR,
|
||||||
|
ASSETS_DIR,
|
||||||
USER_WATCH_HISTORY_PATH,
|
USER_WATCH_HISTORY_PATH,
|
||||||
S_PLATFORM,
|
S_PLATFORM,
|
||||||
)
|
)
|
||||||
@@ -32,6 +33,7 @@ class Config(object):
|
|||||||
"auto_next": "False",
|
"auto_next": "False",
|
||||||
"auto_select": "True",
|
"auto_select": "True",
|
||||||
"cache_requests": "true",
|
"cache_requests": "true",
|
||||||
|
"check_for_updates": "True",
|
||||||
"continue_from_history": "True",
|
"continue_from_history": "True",
|
||||||
"default_media_list_tracking": "None",
|
"default_media_list_tracking": "None",
|
||||||
"downloads_dir": USER_VIDEOS_DIR,
|
"downloads_dir": USER_VIDEOS_DIR,
|
||||||
@@ -52,10 +54,10 @@ class Config(object):
|
|||||||
"provider": "allanime",
|
"provider": "allanime",
|
||||||
"quality": "1080",
|
"quality": "1080",
|
||||||
"recent": "50",
|
"recent": "50",
|
||||||
"rofi_theme": "",
|
"rofi_theme": os.path.join(ASSETS_DIR, "rofi_theme.rasi"),
|
||||||
"rofi_theme_preview": "",
|
"rofi_theme_preview": os.path.join(ASSETS_DIR, "rofi_theme_preview.rasi"),
|
||||||
"rofi_theme_confirm": "",
|
"rofi_theme_confirm": os.path.join(ASSETS_DIR, "rofi_theme_confirm.rasi"),
|
||||||
"rofi_theme_input": "",
|
"rofi_theme_input": os.path.join(ASSETS_DIR, "rofi_theme_input.rasi"),
|
||||||
"server": "top",
|
"server": "top",
|
||||||
"skip": "false",
|
"skip": "false",
|
||||||
"sort_by": "search match",
|
"sort_by": "search match",
|
||||||
@@ -87,6 +89,7 @@ class Config(object):
|
|||||||
self.auto_next = self.get_auto_next()
|
self.auto_next = self.get_auto_next()
|
||||||
self.auto_select = self.get_auto_select()
|
self.auto_select = self.get_auto_select()
|
||||||
self.cache_requests = self.get_cache_requests()
|
self.cache_requests = self.get_cache_requests()
|
||||||
|
self.check_for_updates = self.configparser.get("general", "check_for_updates")
|
||||||
self.continue_from_history = self.get_continue_from_history()
|
self.continue_from_history = self.get_continue_from_history()
|
||||||
self.default_media_list_tracking = self.get_default_media_list_tracking()
|
self.default_media_list_tracking = self.get_default_media_list_tracking()
|
||||||
self.disable_mpv_popen = self.configparser.getboolean(
|
self.disable_mpv_popen = self.configparser.getboolean(
|
||||||
@@ -152,7 +155,7 @@ class Config(object):
|
|||||||
def update_recent(self, recent_anime: list):
|
def update_recent(self, recent_anime: list):
|
||||||
recent_anime_ids = []
|
recent_anime_ids = []
|
||||||
_recent_anime = []
|
_recent_anime = []
|
||||||
for anime in recent_anime[::-1]:
|
for anime in recent_anime:
|
||||||
if (
|
if (
|
||||||
anime["id"] not in recent_anime_ids
|
anime["id"] not in recent_anime_ids
|
||||||
and len(recent_anime_ids) <= self.recent
|
and len(recent_anime_ids) <= self.recent
|
||||||
@@ -345,6 +348,11 @@ icons = {self.icons}
|
|||||||
# this also applies to episode titles
|
# this also applies to episode titles
|
||||||
normalize_titles = {self.normalize_titles}
|
normalize_titles = {self.normalize_titles}
|
||||||
|
|
||||||
|
# whether to check for updates every time you run the script [True/False]
|
||||||
|
# this is useful for keeping your script up to date
|
||||||
|
# cause there are always new features being added 😄
|
||||||
|
check_for_updates = {self.check_for_updates}
|
||||||
|
|
||||||
# can be [allanime, animepahe, hianime]
|
# can be [allanime, animepahe, hianime]
|
||||||
# allanime is the most realible
|
# allanime is the most realible
|
||||||
# animepahe provides different links to streams of different quality so a quality can be selected reliably with --quality option
|
# animepahe provides different links to streams of different quality so a quality can be selected reliably with --quality option
|
||||||
@@ -393,7 +401,7 @@ use_rofi = {self.use_rofi}
|
|||||||
# by the way i recommend getting the rofi themes from this project;
|
# by the way i recommend getting the rofi themes from this project;
|
||||||
rofi_theme = {self.rofi_theme}
|
rofi_theme = {self.rofi_theme}
|
||||||
|
|
||||||
rofi_theme = {self.rofi_theme_preview}
|
rofi_theme_preview = {self.rofi_theme_preview}
|
||||||
|
|
||||||
rofi_theme_input = {self.rofi_theme_input}
|
rofi_theme_input = {self.rofi_theme_input}
|
||||||
|
|
||||||
|
|||||||
@@ -542,8 +542,8 @@ def provider_anime_episode_servers_menu(
|
|||||||
if config.recent:
|
if config.recent:
|
||||||
config.update_recent(
|
config.update_recent(
|
||||||
[
|
[
|
||||||
*config.user_data["recent_anime"],
|
|
||||||
fastanime_runtime_state.selected_anime_anilist,
|
fastanime_runtime_state.selected_anime_anilist,
|
||||||
|
*config.user_data["recent_anime"],
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
print("Updating recent anime...")
|
print("Updating recent anime...")
|
||||||
@@ -1590,7 +1590,10 @@ def fastanime_main_menu(
|
|||||||
return AniList.search(id_in=watch_history, sort="TRENDING_DESC")
|
return AniList.search(id_in=watch_history, sort="TRENDING_DESC")
|
||||||
|
|
||||||
def _recent():
|
def _recent():
|
||||||
return (True, {"data": {"Page": {"media": config.user_data["recent_anime"]}}})
|
return (
|
||||||
|
True,
|
||||||
|
{"data": {"Page": {"media": config.user_data["recent_anime"]}}},
|
||||||
|
)
|
||||||
|
|
||||||
# WARNING: Will probably be depracated
|
# WARNING: Will probably be depracated
|
||||||
def _anime_list():
|
def _anime_list():
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ class AllAnimeAPI(AnimeProvider):
|
|||||||
logger.debug("allanime:Found streams from gogoanime")
|
logger.debug("allanime:Found streams from gogoanime")
|
||||||
return {
|
return {
|
||||||
"server": "gogoanime",
|
"server": "gogoanime",
|
||||||
"headers": {},
|
"headers": {"Referer": f"https://{ALLANIME_BASE}/"},
|
||||||
"subtitles": [],
|
"subtitles": [],
|
||||||
"episode_title": (
|
"episode_title": (
|
||||||
allanime_episode["notes"] or f"{anime_title}"
|
allanime_episode["notes"] or f"{anime_title}"
|
||||||
@@ -245,7 +245,7 @@ class AllAnimeAPI(AnimeProvider):
|
|||||||
logger.debug("allanime:Found streams from wetransfer")
|
logger.debug("allanime:Found streams from wetransfer")
|
||||||
return {
|
return {
|
||||||
"server": "wetransfer",
|
"server": "wetransfer",
|
||||||
"headers": {},
|
"headers": {"Referer": f"https://{ALLANIME_BASE}/"},
|
||||||
"subtitles": [],
|
"subtitles": [],
|
||||||
"episode_title": (
|
"episode_title": (
|
||||||
allanime_episode["notes"] or f"{anime_title}"
|
allanime_episode["notes"] or f"{anime_title}"
|
||||||
@@ -257,7 +257,7 @@ class AllAnimeAPI(AnimeProvider):
|
|||||||
logger.debug("allanime:Found streams from sharepoint")
|
logger.debug("allanime:Found streams from sharepoint")
|
||||||
return {
|
return {
|
||||||
"server": "sharepoint",
|
"server": "sharepoint",
|
||||||
"headers": {},
|
"headers": {"Referer": f"https://{ALLANIME_BASE}/"},
|
||||||
"subtitles": [],
|
"subtitles": [],
|
||||||
"episode_title": (
|
"episode_title": (
|
||||||
allanime_episode["notes"] or f"{anime_title}"
|
allanime_episode["notes"] or f"{anime_title}"
|
||||||
@@ -269,7 +269,7 @@ class AllAnimeAPI(AnimeProvider):
|
|||||||
logger.debug("allanime:Found streams from dropbox")
|
logger.debug("allanime:Found streams from dropbox")
|
||||||
return {
|
return {
|
||||||
"server": "dropbox",
|
"server": "dropbox",
|
||||||
"headers": {},
|
"headers": {"Referer": f"https://{ALLANIME_BASE}/"},
|
||||||
"subtitles": [],
|
"subtitles": [],
|
||||||
"episode_title": (
|
"episode_title": (
|
||||||
allanime_episode["notes"] or f"{anime_title}"
|
allanime_episode["notes"] or f"{anime_title}"
|
||||||
@@ -281,7 +281,7 @@ class AllAnimeAPI(AnimeProvider):
|
|||||||
logger.debug("allanime:Found streams from wixmp")
|
logger.debug("allanime:Found streams from wixmp")
|
||||||
return {
|
return {
|
||||||
"server": "wixmp",
|
"server": "wixmp",
|
||||||
"headers": {},
|
"headers": {"Referer": f"https://{ALLANIME_BASE}/"},
|
||||||
"subtitles": [],
|
"subtitles": [],
|
||||||
"episode_title": (
|
"episode_title": (
|
||||||
allanime_episode["notes"] or f"{anime_title}"
|
allanime_episode["notes"] or f"{anime_title}"
|
||||||
|
|||||||
61
flake.lock
generated
Normal file
61
flake.lock
generated
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1731533236,
|
||||||
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1731676054,
|
||||||
|
"narHash": "sha256-OZiZ3m8SCMfh3B6bfGC/Bm4x3qc1m2SVEAlkV6iY7Yg=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "5e4fbfb6b3de1aa2872b76d49fafc942626e2add",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
53
flake.nix
Normal file
53
flake.nix
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
{
|
||||||
|
description = "FastAnime Project Flake";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, flake-utils }: flake-utils.lib.eachDefaultSystem (system:
|
||||||
|
let
|
||||||
|
pkgs = import nixpkgs { inherit system; };
|
||||||
|
|
||||||
|
python = pkgs.python310;
|
||||||
|
pythonPackages = python.pkgs;
|
||||||
|
fastanimeEnv = pythonPackages.buildPythonApplication {
|
||||||
|
pname = "fastanime";
|
||||||
|
version = "2.7.5";
|
||||||
|
|
||||||
|
src = ./.;
|
||||||
|
|
||||||
|
preBuild = ''
|
||||||
|
sed -i 's/rich>=13.9.2/rich>=13.8.1/' pyproject.toml
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Add runtime dependencies
|
||||||
|
propagatedBuildInputs = with pythonPackages; [
|
||||||
|
click
|
||||||
|
inquirerpy
|
||||||
|
requests
|
||||||
|
rich
|
||||||
|
thefuzz
|
||||||
|
yt-dlp
|
||||||
|
dbus-python
|
||||||
|
hatchling
|
||||||
|
];
|
||||||
|
|
||||||
|
# Ensure compatibility with the pyproject.toml
|
||||||
|
format = "pyproject";
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
{
|
||||||
|
packages.default = fastanimeEnv;
|
||||||
|
|
||||||
|
# DevShell for development
|
||||||
|
devShells.default = pkgs.mkShell {
|
||||||
|
buildInputs = [
|
||||||
|
fastanimeEnv
|
||||||
|
pythonPackages.hatchling
|
||||||
|
];
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "fastanime"
|
name = "fastanime"
|
||||||
version = "2.7.4"
|
version = "2.7.8"
|
||||||
description = "A browser anime site experience from the terminal"
|
description = "A browser anime site experience from the terminal"
|
||||||
license = "UNLICENSE"
|
license = "UNLICENSE"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|||||||
18
shell.nix
Normal file
18
shell.nix
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
let
|
||||||
|
pkgs = import <nixpkgs> {};
|
||||||
|
in pkgs.mkShell {
|
||||||
|
packages = [
|
||||||
|
(pkgs.python3.withPackages (python-pkgs: [
|
||||||
|
python-pkgs.yt-dlp
|
||||||
|
python-pkgs.dbus-python
|
||||||
|
python-pkgs.requests
|
||||||
|
python-pkgs.rich
|
||||||
|
python-pkgs.click
|
||||||
|
python-pkgs.inquirerpy
|
||||||
|
python-pkgs.mpv
|
||||||
|
python-pkgs.fastapi
|
||||||
|
python-pkgs.thefuzz
|
||||||
|
python-pkgs.plyer
|
||||||
|
]))
|
||||||
|
];
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user