diff --git a/.assets/screencasts/fastanime_demo.webm b/.assets/screencasts/fastanime_demo.webm new file mode 100644 index 0000000..34a659b Binary files /dev/null and b/.assets/screencasts/fastanime_demo.webm differ diff --git a/README.md b/README.md index 14d080b..8ddcb14 100644 --- a/README.md +++ b/README.md @@ -1,40 +1,77 @@ +````markdown +# Fast Anime -# FastAnime +Welcome to Fast Anime, your new favorite destination for streaming and downloading anime. -The best and only gui anime scrapper for your benefit. +![Preview Video Placeholder](video-url) -# Screenshots -![Home Screen](https://github.com/Benex254/aniXstream/blob/master/assets/screenshots/home.png) -![Home Screen](https://github.com/Benex254/aniXstream/blob/master/assets/screenshots/home_2.png) -![Home Screen](https://github.com/Benex254/aniXstream/blob/master/assets/screenshots/home_3.png) -![Home Screen](https://github.com/Benex254/aniXstream/blob/master/assets/screenshots/home_4.png) - -![Search Screen](https://github.com/Benex254/aniXstream/blob/master/assets/screenshots/search_1.png) -![Search Screen](https://github.com/Benex254/aniXstream/blob/master/assets/screenshots/search_2.png) -![Search Screen](https://github.com/Benex254/aniXstream/blob/master/assets/screenshots/search_3.png) - -![MyAnimeList](https://github.com/Benex254/aniXstream/blob/master/assets/screenshots/myanimelist.png) - -![Settings Screen](https://github.com/Benex254/aniXstream/blob/master/assets/screenshots/settings_1.png) -![Settings Screen](https://github.com/Benex254/aniXstream/blob/master/assets/screenshots/settings_2.png) - -![Theming Example](https://github.com/Benex254/aniXstream/blob/master/assets/screenshots/theme_example_1.png) -![Theming Example](https://github.com/Benex254/aniXstream/blob/master/assets/screenshots/theme_example_2.png) -![Theming Example](https://github.com/Benex254/aniXstream/blob/master/assets/screenshots/theme_example_3.png) - -![Anime Screen](https://github.com/Benex254/aniXstream/blob/master/assets/screenshots/anime_screen.png) -![Anime Screen](https://github.com/Benex254/aniXstream/blob/master/assets/screenshots/anime_screen_1.png) -![Anime Screen](https://github.com/Benex254/aniXstream/blob/master/assets/screenshots/anime_screen_2.png) - - -![Trailer Fullscreen](https://github.com/Benex254/aniXstream/blob/master/assets/screenshots/trailer_fullscreen.png) - - -## Authors - -- [@Benex254](https://github.com/Benex254/aniXstream) +## Table of Contents +- [Installation](#installation) + - [Using pip](#using-pip) + - [Using pipx](#using-pipx) + - [Pre-built binaries](#pre-built-binaries) + - [Building from the source](#building-from-the-source) +- [Major Dependencies](#major-dependencies) +- [Contributing](#contributing) +- [Receiving Support](#receiving-support) +- [Supporting the Project](#supporting-the-project) ## Installation -The project is undergoing some changes though you can always get a working legacy version by cloning the legacy branch -Or for windows users to go to the first releases, this is the link to download the installer [anixstream installer](https://github.com/Benex254/aniXstream/releases/download/v0.10.0/AniXStream.Installer.exe) + +### Using pip + +Fast Anime can be installed using pip with the following command: + +```bash +pip install +#then you can launch the app using the following command: +python -m fastanime +``` +```` + +> [!TIP] +> To add a desktop entry, execute the following command: +> +> ```bash +> python -m fastanime.ensure_desktop_icon +> ``` + +### Using pipx + +Currently, this method is not functional. Please use the pip installation method instead. + +### Pre-built binaries + +We will soon release pre-built binaries for Linux and Windows. + +### Building from the source + +To build from the source, follow these steps: + +1. Clone the repository: `git clone https://github.com/Benex254/FastAnime.git` +2. Navigate into the folder: `cd FastAnime` +3. create the virtual environment: `python -m venv .venv` +4. Activate the virtual environment: `source .venv/bin/activate` or on windows `.venv/scripts/activate` +5. Install dependencies: `pip install -r requirements.txt` +6. Build the app with: `python -m build`; ensure build is installed first. +7. Navigate to the dist folder: `cd dist` +8. Install the app with: `pip install fastanime-0.2.0-py3-none-any.whl` + +## Major Dependencies + +- Kivy and KivyMD for the UI +- PyShortcuts for creating a desktop icon +- FuzzyWuzzy for auto-selecting search results from the provider + +## Contributing + +We welcome your issues and feature requests. However, we currently have no plans to add another provider, so issues related to this may not be addressed due to time constraints. If you wish to contribute directly, please open an issue detailing the changes you wish to add and request a PR. + +## Receiving Support + +If you have any inquiries, join our Discord server: `` + +## Supporting the Project + +If you want to support the project, please consider leaving a star on our GitHub repository or [buying us a coffee](ko-fi.com/benex254). We appreciate both! diff --git a/fastanime/__init__.py b/fastanime/__init__.py index b09ba4d..660d9f2 100644 --- a/fastanime/__init__.py +++ b/fastanime/__init__.py @@ -2,6 +2,7 @@ import os import plyer from kivy.resources import resource_add_path +# print(plyer.storagepath.get_application_dir(), plyer.storagepath.get_home_dir()) app_dir = os.path.abspath(os.path.dirname(__file__)) diff --git a/fastanime/ensure_desktop_icon.py b/fastanime/ensure_desktop_icon.py new file mode 100644 index 0000000..4c19e44 --- /dev/null +++ b/fastanime/ensure_desktop_icon.py @@ -0,0 +1,26 @@ +import os +import shutil + +from kivy.utils import platform +from pyshortcuts import make_shortcut + +from . import assets_folder + +app = "_ -m fastanime" + +if fastanime := shutil.which("fastanime"): + app = fastanime + + +logo = os.path.join(assets_folder, "logo.png") + +if platform == "win": + logo = os.path.join(assets_folder, "logo.ico") + +make_shortcut( + app, + name="FastAnime", + description="Download and watch anime", + terminal=False, + icon=logo, +) diff --git a/fastanime/libs/mpv/player.py b/fastanime/libs/mpv/player.py index 2b20056..b8cd62b 100644 --- a/fastanime/libs/mpv/player.py +++ b/fastanime/libs/mpv/player.py @@ -1,6 +1,7 @@ from subprocess import Popen, PIPE, DEVNULL import os import threading +import shutil class MPVPlayer: @@ -14,15 +15,17 @@ class MPVPlayer: self.mpv_thread.start() def run_mpv(self, url): - self.mpv_process = Popen( - ["mpv", "--input-ipc-server=/tmp/mpvsocket", "--osc", url], - stdin=PIPE, - stdout=DEVNULL, - stderr=DEVNULL, - preexec_fn=os.setsid, - ) - self.mpv_process.wait() - self.mpv_process = None + mpv = shutil.which("mpv") + if mpv: + self.mpv_process = Popen( + [mpv, "--input-ipc-server=/tmp/mpvsocket", "--osc", url], + stdin=PIPE, + stdout=DEVNULL, + stderr=DEVNULL, + preexec_fn=os.setsid, + ) + self.mpv_process.wait() + self.mpv_process = None def send_command(self, command): if self.mpv_process: diff --git a/setup.py b/setup.py index 4b0b710..3531ab5 100644 --- a/setup.py +++ b/setup.py @@ -5,6 +5,7 @@ from setuptools import find_packages, setup assert sys.version_info >= (3, 10, 0), "FastAnime requires python 3.10+" + path = os.path.abspath(".") kv_file_paths = [] @@ -49,12 +50,13 @@ if __name__ == "__main__": "kivymd @ https://github.com/kivymd/KivyMD/archive/master.zip", "ffpyplayer", "yt-dlp", + "pyshortcuts", ], setup_requires=[], python_requires=">=3.10", entry_points={ "gui_scripts": [ - "fastanime = fastanime.__main__:get_hook_dirs", + "fastanime = fastanime.__main__:run_app", ], }, )