diff --git a/movie_list/gen_movie_list.py b/movie_list/gen_movie_list.py index 5808df9..966d721 100755 --- a/movie_list/gen_movie_list.py +++ b/movie_list/gen_movie_list.py @@ -55,6 +55,7 @@ class MovieList: border: 1px solid rgba(255, 255, 255, 0.1); padding: 0.75rem; height: 100%; + min-height: 0; overflow: hidden; display: flex; flex-direction: column; @@ -70,14 +71,16 @@ class MovieList: .dataTables_wrapper { flex: 1; - overflow: hidden; + overflow: auto; display: flex; flex-direction: column; + min-height: 0; } .dataTables_filter { margin-bottom: 0.5rem; text-align: right; + flex-shrink: 0; } .dataTables_filter label { @@ -113,22 +116,19 @@ class MovieList: padding: 0.5rem 0; color: rgba(255, 255, 255, 0.6); font-size: 0.85rem; - } - - .dataTables_scroll { - flex: 1; - overflow: hidden; - display: flex; - flex-direction: column; - } - - .dataTables_scrollHead { flex-shrink: 0; } + .dataTables_scroll { + display: none; + } + + .dataTables_scrollHead { + display: none; + } + .dataTables_scrollBody { - flex: 1; - overflow-y: auto !important; + display: none; } .dataTables_scrollBody::-webkit-scrollbar { @@ -144,7 +144,20 @@ class MovieList: border-radius: 3px; } - table.dataTable.stripe tbody tr.odd, + .dataTables_wrapper::-webkit-scrollbar { + width: 6px; + } + + .dataTables_wrapper::-webkit-scrollbar-track { + background: rgba(255, 255, 255, 0.05); + } + + .dataTables_wrapper::-webkit-scrollbar-thumb { + background: rgba(255, 255, 255, 0.2); + border-radius: 3px; + } + + table.dataTable.stripe tbody tr.odd, table.dataTable.display tbody tr.odd, table.dataTable tbody tr { background: transparent !important; @@ -274,21 +287,23 @@ class MovieList: @@ -375,7 +390,7 @@ class MovieList: html_title_td = movie['title'] if 'dummy' in movie.keys() else \ f'{movie["title"]}' - + self.html_table[index] = ( f'\n
tag with exact title - match = [html_row for html_row in self.prev_html - if f'
{movie["title"]}
' in html_row + match = [html_row for html_row in self.prev_html + if f'{movie["title"]}
' in html_row and 'N/A' not in html_row] if match: # Update the index and status from the cached row @@ -450,15 +478,7 @@ class MovieList: time.sleep(2) self.delete_finished_threads() - self.html += ''.join(self.html_table) - - # Deduplicate entries before writing - num_entries = self.deduplicate_html() - print(f"\nDeduplicated to {num_entries} unique entries") - - self.html = self.html.split('')[0] # Remove everything after tbody if it exists - self.html += ''.join(self.html_table) - + # Don't append to self.html here - we'll do it in write() return True def delete_finished_threads(self): @@ -479,37 +499,42 @@ class MovieList: """ Write the HTML list to index.html """ out_path = dst if dst else self.dst timestamp = time.strftime('%Y-%m-%d %H:%M:%S', time.gmtime()) - self.html += f''' + + # Build the final HTML - don't append, rebuild from scratch + final_html = self.html.split('