♻️ Refactored format_str method to one format_str_media method.

This commit is contained in:
Robert Honz
2024-02-26 06:04:41 +01:00
parent d5d53c6c92
commit 832f5ce443
2 changed files with 74 additions and 70 deletions
+1 -1
View File
@@ -310,7 +310,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
else:
self.s_tr_results_add_top_level_item.emit(child)
def populate_tree_result_child(self, item: [Mix | Album | Playlist], index_count_digits: int):
def populate_tree_result_child(self, item: [Track | Video | Mix | Album | Playlist], index_count_digits: int):
# Format seconds to mm:ss.
m, s = divmod(item.duration_sec, 60)
duration: str = f"{m:02d}:{s:02d}"