mirror of
https://github.com/Benexl/FastAnime.git
synced 2025-12-05 20:40:09 -08:00
feat:Finished stable v0.10.0
This commit is contained in:
19
LICENSE
Normal file
19
LICENSE
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
Copyright (c) 2018 The Python Packaging Authority
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
@@ -2,8 +2,8 @@ from kivy.clock import Clock
|
|||||||
from kivy.logger import Logger
|
from kivy.logger import Logger
|
||||||
from kivy.cache import Cache
|
from kivy.cache import Cache
|
||||||
|
|
||||||
from Model import AnimeScreenModel
|
from anixstream.Model import AnimeScreenModel
|
||||||
from View import AnimeScreenView
|
from anixstream.View import AnimeScreenView
|
||||||
|
|
||||||
Cache.register("data.anime", limit=20, timeout=600)
|
Cache.register("data.anime", limit=20, timeout=600)
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
from View import CrashLogScreenView
|
from anixstream.View import CrashLogScreenView
|
||||||
from Model import CrashLogScreenModel
|
from anixstream.Model import CrashLogScreenModel
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
from View import DownloadsScreenView
|
from anixstream.View import DownloadsScreenView
|
||||||
from Model import DownloadsScreenModel
|
from anixstream.Model import DownloadsScreenModel
|
||||||
|
|
||||||
|
|
||||||
class DownloadsScreenController:
|
class DownloadsScreenController:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
from View import HelpScreenView
|
from anixstream.View import HelpScreenView
|
||||||
from Model import HelpScreenModel
|
from anixstream.Model import HelpScreenModel
|
||||||
|
|
||||||
|
|
||||||
class HelpScreenController:
|
class HelpScreenController:
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ from inspect import isgenerator
|
|||||||
from kivy.clock import Clock
|
from kivy.clock import Clock
|
||||||
from kivy.logger import Logger
|
from kivy.logger import Logger
|
||||||
|
|
||||||
from View import HomeScreenView
|
from anixstream.View import HomeScreenView
|
||||||
from Model import HomeScreenModel
|
from anixstream.Model import HomeScreenModel
|
||||||
from View.components import MediaCardsContainer
|
from anixstream.View.components import MediaCardsContainer
|
||||||
from Utility import show_notification
|
from anixstream.Utility import show_notification
|
||||||
|
|
||||||
|
|
||||||
# TODO:Move the update home screen to homescreen.py
|
# TODO:Move the update home screen to homescreen.py
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ from kivy.logger import Logger
|
|||||||
# from kivy.clock import Clock
|
# from kivy.clock import Clock
|
||||||
from kivy.utils import difference
|
from kivy.utils import difference
|
||||||
|
|
||||||
from View import MyListScreenView
|
from anixstream.View import MyListScreenView
|
||||||
from Model import MyListScreenModel
|
from anixstream.Model import MyListScreenModel
|
||||||
from Utility import user_data_helper
|
from anixstream.Utility import user_data_helper
|
||||||
|
|
||||||
class MyListScreenController:
|
class MyListScreenController:
|
||||||
"""
|
"""
|
||||||
@@ -50,4 +50,4 @@ class MyListScreenController:
|
|||||||
self.view.update_layout(result_card)
|
self.view.update_layout(result_card)
|
||||||
return []
|
return []
|
||||||
else:
|
else:
|
||||||
return []
|
return []
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ from inspect import isgenerator
|
|||||||
from kivy.clock import Clock
|
from kivy.clock import Clock
|
||||||
from kivy.logger import Logger
|
from kivy.logger import Logger
|
||||||
|
|
||||||
from View import SearchScreenView
|
from anixstream.View import SearchScreenView
|
||||||
from Model import SearchScreenModel
|
from anixstream.Model import SearchScreenModel
|
||||||
|
|
||||||
|
|
||||||
class SearchScreenController:
|
class SearchScreenController:
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
from Model.base_model import BaseScreenModel
|
from .base_model import BaseScreenModel
|
||||||
from libs.anilist import AniList
|
from anixstream.libs.anilist import AniList
|
||||||
|
|
||||||
class AnimeScreenModel(BaseScreenModel):
|
class AnimeScreenModel(BaseScreenModel):
|
||||||
"""the Anime screen model
|
"""the Anime screen model
|
||||||
@@ -10,4 +10,4 @@ class AnimeScreenModel(BaseScreenModel):
|
|||||||
def get_anime_data(self,id:int):
|
def get_anime_data(self,id:int):
|
||||||
return AniList.get_anime(id)
|
return AniList.get_anime(id)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
from Model.base_model import BaseScreenModel
|
from .base_model import BaseScreenModel
|
||||||
|
|
||||||
|
|
||||||
class CrashLogScreenModel(BaseScreenModel):
|
class CrashLogScreenModel(BaseScreenModel):
|
||||||
"""
|
"""
|
||||||
Handles the crashlog screen logic
|
Handles the crashlog screen logic
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
from Model.base_model import BaseScreenModel
|
from .base_model import BaseScreenModel
|
||||||
|
|
||||||
|
|
||||||
class DownloadsScreenModel(BaseScreenModel):
|
class DownloadsScreenModel(BaseScreenModel):
|
||||||
"""
|
"""
|
||||||
Handles the download screen logic
|
Handles the download screen logic
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
from Model.base_model import BaseScreenModel
|
from .base_model import BaseScreenModel
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class HelpScreenModel(BaseScreenModel):
|
class HelpScreenModel(BaseScreenModel):
|
||||||
"""
|
"""
|
||||||
Handles the help screen logic
|
Handles the help screen logic
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
from Model.base_model import BaseScreenModel
|
from .base_model import BaseScreenModel
|
||||||
from libs.anilist import AniList
|
from anixstream.libs.anilist import AniList
|
||||||
from Utility.media_card_loader import MediaCardLoader
|
from anixstream.Utility.media_card_loader import MediaCardLoader
|
||||||
|
|
||||||
|
|
||||||
class HomeScreenModel(BaseScreenModel):
|
class HomeScreenModel(BaseScreenModel):
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
from libs.anilist import AniList
|
from anixstream.libs.anilist import AniList
|
||||||
from Model.base_model import BaseScreenModel
|
from .base_model import BaseScreenModel
|
||||||
from Utility import MediaCardLoader,show_notification
|
from anixstream.Utility import MediaCardLoader,show_notification
|
||||||
|
|
||||||
|
|
||||||
class MyListScreenModel(BaseScreenModel):
|
class MyListScreenModel(BaseScreenModel):
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
from Model.base_model import BaseScreenModel
|
from .base_model import BaseScreenModel
|
||||||
from libs.anilist import AniList
|
from anixstream.libs.anilist import AniList
|
||||||
from Utility import MediaCardLoader, show_notification
|
from anixstream.Utility import MediaCardLoader, show_notification
|
||||||
|
|
||||||
|
|
||||||
class SearchScreenModel(BaseScreenModel):
|
class SearchScreenModel(BaseScreenModel):
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
from libs.anilist.anilist_data_schema import (
|
from anixstream.libs.anilist.anilist_data_schema import (
|
||||||
AnilistDateObject,
|
AnilistDateObject,
|
||||||
AnilistMediaNextAiringEpisode,
|
AnilistMediaNextAiringEpisode,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ from kivy.cache import Cache
|
|||||||
from kivy.loader import _ThreadPool
|
from kivy.loader import _ThreadPool
|
||||||
from kivy.logger import Logger
|
from kivy.logger import Logger
|
||||||
|
|
||||||
from View.components import MediaCard
|
from anixstream.View.components import MediaCard
|
||||||
from Utility import anilist_data_helper, user_data_helper
|
from anixstream.Utility import anilist_data_helper, user_data_helper
|
||||||
from libs.anilist.anilist_data_schema import AnilistBaseMediaDataSchema
|
from anixstream.libs.anilist.anilist_data_schema import AnilistBaseMediaDataSchema
|
||||||
|
|
||||||
|
|
||||||
# Register anime cache in memory
|
# Register anime cache in memory
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
from datetime import datetime
|
|
||||||
|
|
||||||
from kivy.properties import ObjectProperty, DictProperty, StringProperty
|
from kivy.properties import ObjectProperty, DictProperty, StringProperty
|
||||||
|
|
||||||
from Utility import anilist_data_helper
|
from anixstream.Utility import anilist_data_helper
|
||||||
from libs.anilist import AnilistBaseMediaDataSchema
|
from anixstream.libs.anilist import AnilistBaseMediaDataSchema
|
||||||
|
|
||||||
from View.base_screen import BaseScreenView
|
from anixstream.View.base_screen import BaseScreenView
|
||||||
from .components import (
|
from .components import (
|
||||||
AnimeHeader,
|
AnimeHeader,
|
||||||
AnimeSideBar,
|
AnimeSideBar,
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
from kivy.properties import StringProperty
|
from kivy.properties import StringProperty
|
||||||
|
|
||||||
from View.base_screen import BaseScreenView
|
from anixstream.View.base_screen import BaseScreenView
|
||||||
from Utility.utils import read_crash_file
|
from anixstream.Utility.utils import read_crash_file
|
||||||
from Utility.kivy_markup_helper import color_text, bolden
|
from anixstream.Utility.kivy_markup_helper import color_text, bolden
|
||||||
|
|
||||||
|
|
||||||
class CrashLogScreenView(BaseScreenView):
|
class CrashLogScreenView(BaseScreenView):
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#:import color_text Utility.kivy_markup_helper.color_text
|
#:import color_text anixstream.Utility.kivy_markup_helper.color_text
|
||||||
|
|
||||||
<TaskText@MDLabel>:
|
<TaskText@MDLabel>:
|
||||||
adaptive_height:True
|
adaptive_height:True
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ from kivy.properties import ObjectProperty
|
|||||||
from kivy.logger import Logger
|
from kivy.logger import Logger
|
||||||
from kivy.utils import format_bytes_to_human
|
from kivy.utils import format_bytes_to_human
|
||||||
|
|
||||||
from View.base_screen import BaseScreenView
|
from anixstream.View.base_screen import BaseScreenView
|
||||||
from .components.task_card import TaskCard
|
from .components.task_card import TaskCard
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
from kivy.properties import ObjectProperty, StringProperty
|
from kivy.properties import ObjectProperty, StringProperty
|
||||||
|
|
||||||
from View.base_screen import BaseScreenView
|
from anixstream.View.base_screen import BaseScreenView
|
||||||
from Utility.kivy_markup_helper import bolden, color_text, underline
|
from anixstream.Utility.kivy_markup_helper import bolden, color_text, underline
|
||||||
from Utility.data import themes_available
|
from anixstream.Utility.data import themes_available
|
||||||
|
|
||||||
|
|
||||||
class HelpScreenView(BaseScreenView):
|
class HelpScreenView(BaseScreenView):
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
from kivy.properties import ObjectProperty
|
from kivy.properties import ObjectProperty
|
||||||
|
|
||||||
from View.base_screen import BaseScreenView
|
from anixstream.View.base_screen import BaseScreenView
|
||||||
|
|
||||||
|
|
||||||
class HomeScreenView(BaseScreenView):
|
class HomeScreenView(BaseScreenView):
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
from kivy.properties import ObjectProperty, StringProperty, DictProperty
|
from kivy.properties import ObjectProperty, StringProperty, DictProperty
|
||||||
from kivy.clock import Clock
|
from kivy.clock import Clock
|
||||||
|
|
||||||
from View.base_screen import BaseScreenView
|
from anixstream.View.base_screen import BaseScreenView
|
||||||
|
|
||||||
|
|
||||||
class MyListScreenView(BaseScreenView):
|
class MyListScreenView(BaseScreenView):
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
from kivy.properties import ObjectProperty, StringProperty
|
from kivy.properties import ObjectProperty, StringProperty
|
||||||
from kivy.clock import Clock
|
from kivy.clock import Clock
|
||||||
|
|
||||||
from View.base_screen import BaseScreenView
|
from anixstream.View.base_screen import BaseScreenView
|
||||||
from .components import TrendingAnimeSideBar, Filters, SearchResultsPagination
|
from .components import TrendingAnimeSideBar, Filters, SearchResultsPagination
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ from kivymd.uix.boxlayout import MDBoxLayout
|
|||||||
from kivymd.uix.button import MDIconButton
|
from kivymd.uix.button import MDIconButton
|
||||||
from kivymd.uix.tooltip import MDTooltip
|
from kivymd.uix.tooltip import MDTooltip
|
||||||
|
|
||||||
from Utility.observer import Observer
|
from anixstream.Utility.observer import Observer
|
||||||
|
|
||||||
|
|
||||||
class NavRail(MDNavigationRail):
|
class NavRail(MDNavigationRail):
|
||||||
@@ -65,7 +65,7 @@ class BaseScreenView(MDScreen, Observer):
|
|||||||
super().__init__(**kw)
|
super().__init__(**kw)
|
||||||
# Often you need to get access to the application object from the view
|
# Often you need to get access to the application object from the view
|
||||||
# class. You can do this using this attribute.
|
# class. You can do this using this attribute.
|
||||||
from main import AniXStreamApp
|
from anixstream.__main__ import AniXStreamApp
|
||||||
|
|
||||||
self.app: AniXStreamApp = MDApp.get_running_app() # type: ignore
|
self.app: AniXStreamApp = MDApp.get_running_app() # type: ignore
|
||||||
# Adding a view class as observer.
|
# Adding a view class as observer.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
from Controller import (
|
from anixstream.Controller import (
|
||||||
SearchScreenController,
|
SearchScreenController,
|
||||||
HomeScreenController,
|
HomeScreenController,
|
||||||
MyListScreenController,
|
MyListScreenController,
|
||||||
@@ -7,7 +7,7 @@ from Controller import (
|
|||||||
HelpScreenController,
|
HelpScreenController,
|
||||||
CrashLogScreenController,
|
CrashLogScreenController,
|
||||||
)
|
)
|
||||||
from Model import (
|
from anixstream.Model import (
|
||||||
HomeScreenModel,
|
HomeScreenModel,
|
||||||
SearchScreenModel,
|
SearchScreenModel,
|
||||||
MyListScreenModel,
|
MyListScreenModel,
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
|
|
||||||
os.environ["KIVY_VIDEO"] = "ffpyplayer"
|
os.environ["KIVY_VIDEO"] = "ffpyplayer"
|
||||||
|
|
||||||
from queue import Queue
|
from queue import Queue
|
||||||
@@ -11,11 +10,26 @@ import webbrowser
|
|||||||
import plyer
|
import plyer
|
||||||
|
|
||||||
from kivy.config import Config
|
from kivy.config import Config
|
||||||
from kivy.resources import resource_find,resource_add_path
|
from kivy.resources import resource_find,resource_add_path,resource_remove_path
|
||||||
resource_add_path("_internal")
|
# resource_add_path("_internal")
|
||||||
resource_add_path("assets")
|
|
||||||
resource_add_path("configs")
|
app_dir = os.path.dirname(__file__)
|
||||||
resource_add_path("data")
|
|
||||||
|
# test
|
||||||
|
|
||||||
|
# test_end
|
||||||
|
|
||||||
|
|
||||||
|
# make sure we aint searching dist folder
|
||||||
|
dist_folder = os.path.join(app_dir,"dist")
|
||||||
|
resource_remove_path(dist_folder)
|
||||||
|
|
||||||
|
assets_folder = os.path.join(app_dir,"assets")
|
||||||
|
resource_add_path(assets_folder)
|
||||||
|
conigs_folder = os.path.join(app_dir,"configs")
|
||||||
|
resource_add_path(conigs_folder)
|
||||||
|
data_folder = os.path.join(app_dir,"data")
|
||||||
|
resource_add_path(data_folder)
|
||||||
|
|
||||||
Config.set("graphics","width","1000")
|
Config.set("graphics","width","1000")
|
||||||
Config.set("graphics","minimum_width","1000")
|
Config.set("graphics","minimum_width","1000")
|
||||||
@@ -38,15 +52,15 @@ from kivy.uix.settings import SettingsWithSidebar, Settings
|
|||||||
from kivymd.icon_definitions import md_icons
|
from kivymd.icon_definitions import md_icons
|
||||||
from kivymd.app import MDApp
|
from kivymd.app import MDApp
|
||||||
|
|
||||||
from View.screens import screens
|
from anixstream.View.screens import screens
|
||||||
from libs.animdl import AnimdlApi
|
from anixstream.libs.animdl import AnimdlApi
|
||||||
from Utility import (
|
from anixstream.Utility import (
|
||||||
themes_available,
|
themes_available,
|
||||||
show_notification,
|
show_notification,
|
||||||
user_data_helper,
|
user_data_helper,
|
||||||
animdl_config_manager,
|
animdl_config_manager,
|
||||||
)
|
)
|
||||||
|
from anixstream.Utility.utils import write_crash
|
||||||
|
|
||||||
# Ensure the user data fields exist
|
# Ensure the user data fields exist
|
||||||
if not (user_data_helper.user_data.exists("user_anime_list")):
|
if not (user_data_helper.user_data.exists("user_anime_list")):
|
||||||
@@ -411,5 +425,11 @@ class AniXStreamApp(MDApp):
|
|||||||
show_notification("Streamer", "Started streaming")
|
show_notification("Streamer", "Started streaming")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
def run_app():
|
||||||
AniXStreamApp().run()
|
AniXStreamApp().run()
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
try:
|
||||||
|
run_app()
|
||||||
|
except Exception as e:
|
||||||
|
write_crash(e)
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
# -*- mode: python ; coding: utf-8 -*-
|
|
||||||
|
|
||||||
import sys
|
|
||||||
import os
|
|
||||||
|
|
||||||
from kivy_deps import sdl2, glew
|
|
||||||
from kivymd.icon_definitions import md_icons
|
|
||||||
from kivymd import hooks_path as kivymd_hooks_path
|
|
||||||
|
|
||||||
path = os.path.abspath(".")
|
|
||||||
|
|
||||||
a = Analysis(
|
|
||||||
["main.py"],
|
|
||||||
datas=[
|
|
||||||
('./assets/*', './assets'),("./data/*","./data/*"),("./configs/*","./configs")
|
|
||||||
],
|
|
||||||
pathex=[path],
|
|
||||||
hiddenimports=["kivymd.icon_definitions.md_icons"],
|
|
||||||
hookspath=[kivymd_hooks_path],
|
|
||||||
win_no_prefer_redirects=False,
|
|
||||||
win_private_assemblies=False,
|
|
||||||
cipher=None,
|
|
||||||
noarchive=False,
|
|
||||||
)
|
|
||||||
pyz = PYZ(a.pure, a.zipped_data, cipher=None)
|
|
||||||
|
|
||||||
exe = EXE(
|
|
||||||
pyz,
|
|
||||||
a.scripts,
|
|
||||||
a.binaries,
|
|
||||||
a.zipfiles,
|
|
||||||
a.datas,
|
|
||||||
*[Tree(p) for p in (sdl2.dep_bins + glew.dep_bins)],
|
|
||||||
debug=False,
|
|
||||||
strip=False,
|
|
||||||
upx=True,
|
|
||||||
name="AniXStream",
|
|
||||||
console=False,
|
|
||||||
icon="./assets/logo.ico"
|
|
||||||
)
|
|
||||||
@@ -408,7 +408,7 @@ class AnimdlApi:
|
|||||||
|
|
||||||
# extract progress info from mpv
|
# extract progress info from mpv
|
||||||
for stream in mpv_child_process.stderr: # type: ignore
|
for stream in mpv_child_process.stderr: # type: ignore
|
||||||
Logger.info(f"Animdl Api Downloader: {stream}")
|
# Logger.info(f"Animdl Api Downloader: {stream}")
|
||||||
if progress_matches := progress_regex.findall(stream):
|
if progress_matches := progress_regex.findall(stream):
|
||||||
current_bytes, total_bytes = [
|
current_bytes, total_bytes = [
|
||||||
float(val) for val in progress_matches[0].split("/")
|
float(val) for val in progress_matches[0].split("/")
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import logging
|
|||||||
Logger = logging.getLogger(__name__)
|
Logger = logging.getLogger(__name__)
|
||||||
Logger.setLevel(logging.DEBUG)
|
Logger.setLevel(logging.DEBUG)
|
||||||
# formatter = logging.Formatter("%(asctime)s - %(levelname)s - %(message)s")
|
# formatter = logging.Formatter("%(asctime)s - %(levelname)s - %(message)s")
|
||||||
console_handler = logging.StreamHandler()
|
# console_handler = logging.StreamHandler()
|
||||||
console_handler.setLevel(logging.INFO)
|
# console_handler.setLevel(logging.INFO)
|
||||||
# console_handler.setFormatter(formatter)
|
# console_handler.setFormatter(formatter)
|
||||||
Logger.addHandler(console_handler)
|
# Logger.addHandler(console_handler)
|
||||||
|
|||||||
@@ -1,44 +0,0 @@
|
|||||||
# -*- mode: python ; coding: utf-8 -*-
|
|
||||||
|
|
||||||
|
|
||||||
a = Analysis(
|
|
||||||
['main.py'],
|
|
||||||
pathex=[],
|
|
||||||
binaries=[],
|
|
||||||
datas=[],
|
|
||||||
hiddenimports=[],
|
|
||||||
hookspath=[],
|
|
||||||
hooksconfig={},
|
|
||||||
runtime_hooks=[],
|
|
||||||
excludes=[],
|
|
||||||
noarchive=False,
|
|
||||||
optimize=0,
|
|
||||||
)
|
|
||||||
pyz = PYZ(a.pure)
|
|
||||||
|
|
||||||
exe = EXE(
|
|
||||||
pyz,
|
|
||||||
a.scripts,
|
|
||||||
[],
|
|
||||||
exclude_binaries=True,
|
|
||||||
name='main',
|
|
||||||
debug=False,
|
|
||||||
bootloader_ignore_signals=False,
|
|
||||||
strip=False,
|
|
||||||
upx=True,
|
|
||||||
console=True,
|
|
||||||
disable_windowed_traceback=False,
|
|
||||||
argv_emulation=False,
|
|
||||||
target_arch=None,
|
|
||||||
codesign_identity=None,
|
|
||||||
entitlements_file=None,
|
|
||||||
)
|
|
||||||
coll = COLLECT(
|
|
||||||
exe,
|
|
||||||
a.binaries,
|
|
||||||
a.datas,
|
|
||||||
strip=False,
|
|
||||||
upx=True,
|
|
||||||
upx_exclude=[],
|
|
||||||
name='main',
|
|
||||||
)
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 202 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 240 KiB |
@@ -9,13 +9,27 @@ from kivymd import hooks_path as kivymd_hooks_path
|
|||||||
|
|
||||||
path = os.path.abspath(".")
|
path = os.path.abspath(".")
|
||||||
|
|
||||||
|
kv_file_paths = []
|
||||||
|
|
||||||
|
app_dir = os.path.join(os.getcwd(),"anixstream")
|
||||||
|
print(app_dir)
|
||||||
|
|
||||||
|
views_folder = os.path.join(app_dir,"View")
|
||||||
|
for dirpath,dirnames,filenames in os.walk(views_folder):
|
||||||
|
for filename in filenames:
|
||||||
|
if os.path.splitext(filename)[1]==".kv":
|
||||||
|
kv_file = os.path.join(dirpath,filename)
|
||||||
|
kv_file_paths.append((kv_file,"./Views/"))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
a = Analysis(
|
a = Analysis(
|
||||||
["main.py"],
|
['./anixstream/__main__.py'],
|
||||||
datas=[
|
datas=[ *kv_file_paths,
|
||||||
('./assets/*', './assets'),("./data/*","./data/*"),("./configs/*","./configs")
|
(f'{app_dir}./assets/*', './assets/'),(f"{app_dir}./data/*","./data/"),(f"{app_dir}./configs/*","./configs/")
|
||||||
],
|
],
|
||||||
pathex=[path],
|
pathex=[path],
|
||||||
hiddenimports=["kivymd.icon_definitions.md_icons"],
|
hiddenimports=["kivymd.icon_definitions.md_icons","plyer.platforms","plyer.platforms.win","plyer.platforms.win.storagepath","win32timezone"],
|
||||||
hookspath=[kivymd_hooks_path],
|
hookspath=[kivymd_hooks_path],
|
||||||
win_no_prefer_redirects=False,
|
win_no_prefer_redirects=False,
|
||||||
win_private_assemblies=False,
|
win_private_assemblies=False,
|
||||||
@@ -35,8 +49,9 @@ exe = EXE(
|
|||||||
strip=False,
|
strip=False,
|
||||||
upx=True,
|
upx=True,
|
||||||
name="AniXStream",
|
name="AniXStream",
|
||||||
console=True,
|
console=False,
|
||||||
icon="./assets/logo.ico"
|
icon=f"{app_dir}./assets/logo.ico",
|
||||||
|
exclude_binaries=True,
|
||||||
bootloader_ignore_signals=False,
|
bootloader_ignore_signals=False,
|
||||||
disable_windowed_traceback=False,
|
disable_windowed_traceback=False,
|
||||||
argv_emulation=False,
|
argv_emulation=False,
|
||||||
@@ -48,9 +63,10 @@ exe = EXE(
|
|||||||
coll = COLLECT(
|
coll = COLLECT(
|
||||||
exe,
|
exe,
|
||||||
a.binaries,
|
a.binaries,
|
||||||
|
a.zipfiles,
|
||||||
a.datas,
|
a.datas,
|
||||||
strip=False,
|
strip=False,
|
||||||
upx=True,
|
upx=True,
|
||||||
upx_exclude=[],
|
upx_exclude=[],
|
||||||
name='anixstream',
|
name='AniXStream',
|
||||||
)
|
)
|
||||||
33
pyproject.toml
Normal file
33
pyproject.toml
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
[build-system]
|
||||||
|
requires = ["setuptools"]
|
||||||
|
build-backend = "setuptools.build_meta"
|
||||||
|
[project]
|
||||||
|
name = "AniXStream"
|
||||||
|
version = "0.0.1"
|
||||||
|
authors = [
|
||||||
|
{ name="Benex254", email="benexprojects@gmail.com" },
|
||||||
|
]
|
||||||
|
description = "A wrapper over all and every anime cli or package"
|
||||||
|
readme = "README.md"
|
||||||
|
requires-python = ">=3.10"
|
||||||
|
classifiers = [
|
||||||
|
"Programming Language :: Python :: 3",
|
||||||
|
"License :: OSI Approved :: MIT License",
|
||||||
|
"Operating System :: OS Independent",
|
||||||
|
]
|
||||||
|
dependencies = [
|
||||||
|
"kivy",
|
||||||
|
"plyer",
|
||||||
|
"fuzzywuzzy",
|
||||||
|
"python-Levenshtein",
|
||||||
|
"kivymd @ https://github.com/kivymd/KivyMD/archive/master.zip",
|
||||||
|
"ffpyplayer",
|
||||||
|
"pytube",
|
||||||
|
"animdl"
|
||||||
|
]
|
||||||
|
[project.urls]
|
||||||
|
Homepage = "https://github.com/benex254/aniXstream"
|
||||||
|
Issues = "https://github.com/benex254/aniXstream"
|
||||||
|
[project.scripts]
|
||||||
|
anixstream="anixstream.__main__:run_app"
|
||||||
|
|
||||||
Reference in New Issue
Block a user