diff --git a/app/View/AnimeScreen/components/characters.kv b/app/View/AnimeScreen/components/characters.kv index cf44398..a2e3b67 100644 --- a/app/View/AnimeScreen/components/characters.kv +++ b/app/View/AnimeScreen/components/characters.kv @@ -1,17 +1,5 @@ #:import get_hex_from_color kivy.utils.get_hex_from_color - - adaptive_height:True - # halign:"center" - max_lines:0 - shorten:False - md_bg_color:self.theme_cls.secondaryContainerColor - bold:True - markup:True - font_style: "Body" - role: "large" - padding:"10dp" - : adaptive_height:True md_bg_color:self.theme_cls.surfaceContainerLowColor @@ -74,8 +62,9 @@ adaptive_height:True container:container orientation:"vertical" - CharactersHeaderText: + HeaderLabel: text:"Characters" + halign:"left" CharactersContainer: id:container diff --git a/app/View/AnimeScreen/components/description.kv b/app/View/AnimeScreen/components/description.kv index d5e098b..8cf546c 100644 --- a/app/View/AnimeScreen/components/description.kv +++ b/app/View/AnimeScreen/components/description.kv @@ -1,14 +1,15 @@ - - adaptive_height:True - # halign:"center" - max_lines:0 - shorten:False - bold:True - markup:True - font_style: "Body" - role: "large" - md_bg_color:self.theme_cls.secondaryContainerColor - padding:"10dp" +# +# adaptive_height:True +# md_bg_color:self.theme_cls.secondaryContainerColor +# MDLabel: +# text:root.text +# adaptive_height:True +# max_lines:0 +# shorten:False +# bold:True +# font_style: "Body" +# role: "large" +# padding:"10dp" : adaptive_height:True @@ -25,7 +26,8 @@ : orientation:"vertical" adaptive_height:True - DescriptionHeader: + HeaderLabel: + halign:"left" text:"Description" DescriptionContainer: DescriptionText: diff --git a/app/View/AnimeScreen/components/header.kv b/app/View/AnimeScreen/components/header.kv index fff2dee..5243c3c 100644 --- a/app/View/AnimeScreen/components/header.kv +++ b/app/View/AnimeScreen/components/header.kv @@ -2,16 +2,18 @@ adaptive_height:True orientation: 'vertical' # padding:"10dp" - MDLabel: - text: root.titles + MDBoxLayout: adaptive_height:True md_bg_color:self.theme_cls.secondaryContainerColor - padding:"5dp" - bold:True - shorten:False - max_lines:2 - font_style:"Label" - role:"large" + MDLabel: + text: root.titles + adaptive_height:True + padding:"5dp" + bold:True + shorten:False + max_lines:2 + font_style:"Label" + role:"large" FitImage: size_hint_y: None height: dp(250) diff --git a/app/View/AnimeScreen/components/rankings_bar.kv b/app/View/AnimeScreen/components/rankings_bar.kv index 3fbe215..065d43c 100644 --- a/app/View/AnimeScreen/components/rankings_bar.kv +++ b/app/View/AnimeScreen/components/rankings_bar.kv @@ -3,17 +3,15 @@ : max_lines:0 shorten:False - # padding:"10dp" markup:True font_style: "Label" role: "medium" + : color:self.theme_cls.primaryColor bold:True - # padding:"10dp" max_lines:0 shorten:False - markup:True font_style: "Label" role: "large" @@ -38,12 +36,15 @@ adaptive_width:True MDBoxLayout: adaptive_size:True - # spacing:"5dp" pos_hint: {'center_y': .5} MDIcon: icon: "star" color:yellow - disabled: not((root.rankings["AverageScore"]/100)*6>=2) + disabled: not((root.rankings["AverageScore"]/100)*6>=1) + MDIcon: + color:yellow + disabled: not(root.rankings["AverageScore"]/100*6>=2) + icon: "star" MDIcon: color:yellow disabled: not(root.rankings["AverageScore"]/100*6>=3) @@ -54,8 +55,8 @@ icon: "star" MDIcon: color:yellow - disabled: not(root.rankings["AverageScore"]/100*6>=5) icon: "star" + disabled: not(root.rankings["AverageScore"]/100*6>=5) MDIcon: color:yellow icon: "star" diff --git a/app/View/AnimeScreen/components/review.kv b/app/View/AnimeScreen/components/review.kv index 5c1bc8d..5a9fee7 100644 --- a/app/View/AnimeScreen/components/review.kv +++ b/app/View/AnimeScreen/components/review.kv @@ -1,16 +1,5 @@ #:import get_hex_from_color kivy.utils.get_hex_from_color - - adaptive_height:True - # halign:"center" - max_lines:0 - shorten:False - md_bg_color:self.theme_cls.secondaryContainerColor - bold:True - markup:True - font_style: "Body" - role: "large" - padding:"10dp" : adaptive_height:True @@ -54,7 +43,8 @@ container:container adaptive_height:True orientation:"vertical" - ReviewHeaderText: + HeaderLabel: + halign:"left" text:"reviews" ReviewContainer: id:container \ No newline at end of file diff --git a/app/View/AnimeScreen/components/side_bar.kv b/app/View/AnimeScreen/components/side_bar.kv index 2643571..a506a27 100644 --- a/app/View/AnimeScreen/components/side_bar.kv +++ b/app/View/AnimeScreen/components/side_bar.kv @@ -16,17 +16,19 @@ markup:True font_style: "Label" role: "medium" - # pos_hint: {'center_x': 0.5} -: +: adaptive_height:True - halign:"center" - max_lines:0 - shorten:False - bold:True - font_style: "Label" - role: "large" md_bg_color:self.theme_cls.secondaryContainerColor - padding:"10dp" + MDLabel: + text:root.text + adaptive_height:True + halign:root.halign + max_lines:0 + shorten:False + bold:True + font_style: "Label" + role: "large" + padding:"10dp" : size_hint_x: None @@ -51,7 +53,7 @@ MDButtonText: text:"Watch on Animdl" FitBoxLayout: - SideBarHeaderLabel: + HeaderLabel: text:"Alternative Titles" SideBarLabel: text: "[color={}]Synonyms:[/color] {}".format(get_hex_from_color(self.theme_cls.primaryColor),root.alternative_titles["synonyms"]) @@ -60,7 +62,7 @@ SideBarLabel: text: "[color={}]Japanese:[/color] {}".format(get_hex_from_color(self.theme_cls.primaryColor),root.alternative_titles["japanese"]) FitBoxLayout: - SideBarHeaderLabel: + HeaderLabel: text:"Information" SideBarLabel: text: "[color={}]Episodes:[/color] {}".format(get_hex_from_color(self.theme_cls.primaryColor),root.information["episodes"]) @@ -87,17 +89,17 @@ SideBarLabel: text: "[color={}]Genres:[/color] {}".format(get_hex_from_color(self.theme_cls.primaryColor),root.information["genres"]) SideBarLabel: - text: "[color={}]Duration:[/color] {}".format(get_hex_from_color(self.theme_cls.primaryColor),root.information["duration"]) + text: "[color={}]Duration:[/color] {} minutes".format(get_hex_from_color(self.theme_cls.primaryColor),root.information["duration"]) FitBoxLayout: id:statistics_container - SideBarHeaderLabel: + HeaderLabel: text:"Rankings" FitBoxLayout: id:tags_container - SideBarHeaderLabel: + HeaderLabel: text:"Tags" FitBoxLayout: id:external_links_container - SideBarHeaderLabel: + HeaderLabel: text:"External Links" BoxLayout: \ No newline at end of file diff --git a/app/View/AnimeScreen/components/side_bar.py b/app/View/AnimeScreen/components/side_bar.py index e454113..00b3033 100644 --- a/app/View/AnimeScreen/components/side_bar.py +++ b/app/View/AnimeScreen/components/side_bar.py @@ -1,13 +1,16 @@ from kivy.properties import ObjectProperty,StringProperty,DictProperty,ListProperty from kivy.utils import get_hex_from_color +from kivy.factory import Factory from kivymd.uix.boxlayout import MDBoxLayout from kivymd.uix.label import MDLabel -class SideBarHeaderLabel(MDLabel): - pass +class HeaderLabel(MDBoxLayout): + text = StringProperty() + halign = StringProperty("center") +Factory.register("HeaderLabel", HeaderLabel) class SideBarLabel(MDLabel): pass @@ -44,7 +47,7 @@ class AnimeSideBar(MDBoxLayout): def on_statistics(self,instance,value): self.statistics_container.clear_widgets() - header = SideBarHeaderLabel() + header = HeaderLabel() header.text = "Rankings" self.statistics_container.add_widget(header) for stat in value: @@ -58,7 +61,7 @@ class AnimeSideBar(MDBoxLayout): def on_tags(self,instance,value): self.tags_container.clear_widgets() - header = SideBarHeaderLabel() + header = HeaderLabel() header.text = "Tags" self.tags_container.add_widget(header) for tag in value: @@ -72,7 +75,7 @@ class AnimeSideBar(MDBoxLayout): def on_external_links(self,instance,value): self.external_links_container.clear_widgets() - header = SideBarHeaderLabel() + header = HeaderLabel() header.text = "External Links" self.external_links_container.add_widget(header) for site in value: diff --git a/app/View/SearchScreen/components/trending_sidebar.kv b/app/View/SearchScreen/components/trending_sidebar.kv index 45c7a22..33fe030 100644 --- a/app/View/SearchScreen/components/trending_sidebar.kv +++ b/app/View/SearchScreen/components/trending_sidebar.kv @@ -1,6 +1,6 @@ : orientation: 'vertical' - adaptive_height:True + adaptive_height:True md_bg_color:self.theme_cls.surfaceContainerLowColor pos_hint: {'center_x': 0.5} padding:"25dp","25dp","25dp","200dp" \ No newline at end of file diff --git a/app/View/SearchScreen/search_screen.kv b/app/View/SearchScreen/search_screen.kv index 331049e..2eb72f7 100644 --- a/app/View/SearchScreen/search_screen.kv +++ b/app/View/SearchScreen/search_screen.kv @@ -32,7 +32,7 @@ MDBoxLayout: orientation: 'vertical' size_hint_y:None - height:self.minimum_height + height:max(self.parent.parent.height,self.minimum_height) MDGridLayout: pos_hint: {'center_x': 0.5} id:search_results_container @@ -40,7 +40,7 @@ padding: "75dp","50dp","75dp","200dp" cols:5 size_hint_y:None - height:self.minimum_height + height:max(self.parent.parent.height,self.minimum_height) SearchResultsPagination: id:search_results_pagination search_view:root @@ -49,17 +49,10 @@ size_hint_y:1 size_hint_x:None width: dp(250) - MDLabel: + HeaderLabel: text:"Trending" - adaptive_height:True - halign:"center" - max_lines:0 - # md_bg_color:Stat - shorten:False - bold:True - font_style: "Label" - role: "large" - padding:"10dp" MDScrollView: TrendingAnimeSideBar: id:trending_anime_sidebar + height:max(self.parent.parent.height,self.minimum_height) + diff --git a/app/libs/anilist/queries_graphql.py b/app/libs/anilist/queries_graphql.py index 29e6e0f..23936b2 100644 --- a/app/libs/anilist/queries_graphql.py +++ b/app/libs/anilist/queries_graphql.py @@ -590,6 +590,7 @@ anime_query = """ query($id:Int){ Page{ media(id:$id) { + id title { romaji english diff --git a/app/main.py b/app/main.py index 0c4836d..f4f3eed 100644 --- a/app/main.py +++ b/app/main.py @@ -31,6 +31,7 @@ from libs.animdl.animdl_api import AnimdlApi from Utility import themes_available, show_notification, user_data_helper + # Ensure the user data fields exist if not (user_data_helper.user_data.exists("user_anime_list")): user_data_helper.update_user_anime_list([]) @@ -129,7 +130,7 @@ class AniXStreamApp(MDApp): self.theme_cls.primary_palette = value else: Logger.warning( - "Settings:An invalid theme has been entered and will be ignored" + "AniXStream Settings: An invalid theme has been entered and will be ignored" ) config.set("Preferences", "theme_color", "Cyan") config.write()