diff --git a/ofscraper/classes/table/table.py b/ofscraper/classes/table/table.py index dfef5d3e..24c52e51 100644 --- a/ofscraper/classes/table/table.py +++ b/ofscraper/classes/table/table.py @@ -462,11 +462,7 @@ async def _sort_helper(self, label=None,reverse=None): reverse=self.reverse, ) elif key == "downloaded": - self._sorted_rows = sorted( - self.table_data, - key=lambda x: 1 if x.get_compare_val(key) is True else 0, - reverse=self.reverse, - ) + self.query_one(DataTable).sort("downloaded",key=lambda x:x.plain) elif key == "unlocked": self._sorted_rows = sorted( @@ -546,8 +542,8 @@ async def _sort_helper(self, label=None,reverse=None): key=lambda x: x.get_compare_val(key), reverse=self.reverse, ) - self._set_sorted_hash(key, self._sorted_rows) - await asyncio.get_event_loop().run_in_executor(None, self.update_table) + # self._set_sorted_hash(key, self._sorted_rows) + # await asyncio.get_event_loop().run_in_executor(None, self.update_table) def _get_sorted_hash(self, key): return self._sorted_hash.get(f"{key}_{self.reverse}") @@ -622,7 +618,7 @@ def make_table(self): table.clear(True) table.fixed_rows = 0 table.zebra_stripes = True - table.add_column("number") + table.add_column("number",key="number") [ table.add_column(re.sub("_", " ", ele), key=str(ele)) for ele in row_names() diff --git a/ofscraper/data/api/common/cache/write.py b/ofscraper/data/api/common/cache/write.py index 21d5ec98..7affbdc9 100644 --- a/ofscraper/data/api/common/cache/write.py +++ b/ofscraper/data/api/common/cache/write.py @@ -11,14 +11,14 @@ def set_after_checks(model_id, api): def set_full_after_scan_check(model_id, api): api = api.lower() cache.set( - f"{model_id}_full_{api}_scrape", read_args.retriveArgs().after is not None + f"{model_id}_full_{api}_v2_scrape", read_args.retriveArgs().after is not None ) def set_check_mode_posts(model_id, api, all_posts): api = api.lower() cache.set( - f"{api}_check_{model_id}", + f"{api}_v2_check_{model_id}", list(all_posts), expire=constants.getattr("THREE_DAY_SECONDS"), ) diff --git a/ofscraper/utils/args/parse/group_bundles/check.py b/ofscraper/utils/args/parse/group_bundles/check.py index c223fc5e..178a9d18 100644 --- a/ofscraper/utils/args/parse/group_bundles/check.py +++ b/ofscraper/utils/args/parse/group_bundles/check.py @@ -53,9 +53,9 @@ def common_args_check(func): media_id_filter, media_type_option, check_mode_media_sort, - media_desc_option, length_max, length_min, + media_desc_option, help="Filters for controlling the initial table view" ) @file_options