diff --git a/musicutil/commands/copy_command.py b/musicutil/commands/copy_command.py
index 693e159..17b823f 100644
--- a/musicutil/commands/copy_command.py
+++ b/musicutil/commands/copy_command.py
@@ -2,7 +2,7 @@ from musicutil.utils.do_replaygain import do_replaygain
from ..types import File
from ..utils.scan_for_music import scan_for_music
from ..utils.load_tag_information import load_tag_information
-from ..transcode_presets import print_transcode_presets, transcode_presets_list
+from ..transcode_presets import print_transcode_presets
from ..utils.transcoder import TranscodeConfig, transcode, get_transcode_config
from os import makedirs as make_directories
@@ -10,7 +10,6 @@ from os.path import exists as path_exists
from shutil import copy as copy_file
from copy import deepcopy as deep_copy
-
class CopyCommandState:
files: list[File] = []
transcoded_files: list[File] = []
diff --git a/musicutil/commands/genhtml_command.py b/musicutil/commands/genhtml_command.py
index 17b7c8a..f90a63c 100644
--- a/musicutil/commands/genhtml_command.py
+++ b/musicutil/commands/genhtml_command.py
@@ -1,3 +1,4 @@
+from musicutil.types import File
from musicutil.utils.load_tag_information import load_tag_information
from musicutil.utils.scan_for_music import scan_for_music
@@ -36,6 +37,43 @@ def get_genhtml_args(args) -> GenHTMLArgs:
command_args.description = args.description
return command_args
+def make_table_for_files(files: list[File]) -> str:
+ html_content = ""
+ html_content += """
+
+
+
+ Path |
+ Title |
+ Artist |
+ Format |
+
+
+
+ """
+ isOdd = True
+ for file in files:
+ tdClass = "pure-table-odd" if isOdd else "pure-table-even"
+ data_path = escape_html(file.path_from_src)
+ data_title = escape_html(file.tags.title)
+ data_artist = escape_html(file.tags.artist)
+ data_extension = escape_html(file.extension)
+ html_content += f"""
+
+ {data_path} |
+ {data_title} |
+ {data_artist} |
+ {data_extension} |
+
+ """
+ isOdd = not isOdd
+ html_content += """
+
+
+ """
+
+
+
class GenHTMLCommand():
def __init__(self, args: GenHTMLArgs):
self.args = args
@@ -66,42 +104,14 @@ class GenHTMLCommand():
"""
- html_content += """
-
-
-
- Path |
- Title |
- Artist |
- Format |
-
-
-
- """
- isOdd = True
- for file in files:
- tdClass = "pure-table-odd" if isOdd else "pure-table-even"
- data_path = escape_html(file.path_from_src)
- data_title = escape_html(file.tags.title)
- data_artist = escape_html(file.tags.artist)
- data_extension = escape_html(file.extension)
+ html_content += make_table_for_files(files)
- html_content += f"""
-
- {data_path} |
- {data_title} |
- {data_artist} |
- {data_extension} |
-
- """
- isOdd = not isOdd
html_content += """
-
-