Added audio tags read support.

This commit is contained in:
gryf committed 2022-09-30 18:23:13 +02:00
1 parent 4b02641481
commit 85ab034a36
3 files changed
+9 -2

No files matched your search

+6 -2
View File
@@ -11,6 +11,8 @@ from datetime import datetime
import mimetypes
import exifread
import mutagen
from pycatalog.dbobjects import File, TYPE
from pycatalog import dbcommon
from pycatalog.logger import get_logger
@@ -213,8 +215,10 @@ class Scan(object):
pass
def _audio(self, fobj, filepath):
# tags, depending on the format?
return
tags = mutagen.File(filepath)
if not tags:
return
fobj.description = tags.pprint()
def _image(self, fobj, filepath):
"""Read exif if exists, add it to description"""