mirror of
https://github.com/9001/copyparty.git
synced 2026-11-25 21:11:13 +00:00
mutagen: support nullduration tags
This commit is contained in:
1 parent
2fb1e6dab8
commit
d3c40a423e
1 file changed
+7
-2
+7
-2
@@ -437,8 +437,10 @@ class MTag(object):
|
||||
return r1
|
||||
|
||||
def get_mutagen(self, abspath: str) -> dict[str, Union[str, float]]:
|
||||
ret: dict[str, Union[str, float]] = {}
|
||||
|
||||
if not bos.path.isfile(abspath):
|
||||
return {}
|
||||
return ret
|
||||
|
||||
import mutagen
|
||||
|
||||
@@ -450,7 +452,10 @@ class MTag(object):
|
||||
return self.get_ffprobe(abspath) if self.can_ffprobe else {}
|
||||
|
||||
sz = bos.path.getsize(abspath)
|
||||
ret = {".q": (0, int((sz / md.info.length) / 128))}
|
||||
try:
|
||||
ret = {".q": (0, int((sz / md.info.length) / 128))}
|
||||
except:
|
||||
pass
|
||||
|
||||
for attr, k, norm in [
|
||||
["codec", "ac", unicode],
|
||||
|
||||
Reference in new issue
Block a user