feat: Add duration extraction and formatting utilities

This commit is contained in:
sha
2025-12-26 12:02:36 +00:00
parent 1d6eb9593e
commit 6d377c9871
5 changed files with 139 additions and 112 deletions
-8
View File
@@ -31,14 +31,6 @@ class MetadataExtractor:
return getattr(self.info, 'artist', None) or getattr(self.info, 'get', lambda x, default=None: default)('artist', [None])[0] # type: ignore
return None
def extract_all_metadata(self) -> dict:
"""Extract all metadata"""
return {
'title': self.extract_title(),
'duration': self.extract_duration(),
'artist': self.extract_artist()
}
def extract_meta_type(self) -> str:
"""Extract meta type from metadata"""
if self.info: