From 1032e90fcb4a8d3be7a6b0ddcdd292e1948a98d3 Mon Sep 17 00:00:00 2001 From: Dark1291 Date: Wed, 26 Feb 2025 10:57:44 +0100 Subject: [PATCH] [UTIL] Remove set_slice_end --- .../Api/Template/Util/manage_ep.py | 1 - StreamingCommunity/Api/Template/site.py | 4 ---- StreamingCommunity/Lib/TMBD/tmdb.py | 5 ----- StreamingCommunity/Util/table.py | 16 +++------------- 4 files changed, 3 insertions(+), 23 deletions(-) diff --git a/StreamingCommunity/Api/Template/Util/manage_ep.py b/StreamingCommunity/Api/Template/Util/manage_ep.py index 0172e4a..90d6335 100644 --- a/StreamingCommunity/Api/Template/Util/manage_ep.py +++ b/StreamingCommunity/Api/Template/Util/manage_ep.py @@ -201,7 +201,6 @@ def display_episodes_list(episodes_manager) -> str: """ # Set up table for displaying episodes table_show_manager = TVShowManager() - table_show_manager.set_slice_end(10) # Add columns to the table column_info = { diff --git a/StreamingCommunity/Api/Template/site.py b/StreamingCommunity/Api/Template/site.py index 613dbeb..31fb880 100644 --- a/StreamingCommunity/Api/Template/site.py +++ b/StreamingCommunity/Api/Template/site.py @@ -20,10 +20,6 @@ def get_select_title(table_show_manager, media_search_manager): Returns: MediaItem: The selected media item. """ - - # Set up table for displaying titles - table_show_manager.set_slice_end(10) - # Determine column_info dynamically for (search site) if not media_search_manager.media_list: console.print("\n[red]No media items available.") diff --git a/StreamingCommunity/Lib/TMBD/tmdb.py b/StreamingCommunity/Lib/TMBD/tmdb.py index c90c479..109b707 100644 --- a/StreamingCommunity/Lib/TMBD/tmdb.py +++ b/StreamingCommunity/Lib/TMBD/tmdb.py @@ -29,11 +29,6 @@ def get_select_title(table_show_manager, generic_obj): Returns: dict: The selected media item. """ - - # Set up table for displaying titles - table_show_manager.set_slice_end(10) - - # Check if the generic_obj list is empty if not generic_obj: console.print("\n[red]No media items available.") return None diff --git a/StreamingCommunity/Util/table.py b/StreamingCommunity/Util/table.py index 232e075..5315601 100644 --- a/StreamingCommunity/Util/table.py +++ b/StreamingCommunity/Util/table.py @@ -32,21 +32,11 @@ class TVShowManager: """Initialize TVShowManager with default values.""" self.console = Console() self.tv_shows: List[Dict[str, Any]] = [] - self.slice_start: int = 0 - self.slice_end: int = 5 - self.step: int = self.slice_end + self.slice_start = 0 + self.slice_end = 10 + self.step = self.slice_end self.column_info = [] - def set_slice_end(self, new_slice: int) -> None: - """ - Set the end of the slice for displaying TV shows. - - Parameters: - - new_slice (int): The new value for the slice end. - """ - self.slice_end = new_slice - self.step = new_slice - def add_column(self, column_info: Dict[str, Dict[str, str]]) -> None: """ Add column information.