chiark
/
gitweb
/
~mdw
/
autoys
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
64096b9
)
gremlin/gremlin.in: Apparently eyeD3 has completely changed.
author
Mark Wooding
<mdw@distorted.org.uk>
Tue, 17 Apr 2018 01:09:55 +0000
(
02:09
+0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Thu, 19 Apr 2018 11:22:49 +0000
(12:22 +0100)
gremlin/gremlin.in
patch
|
blob
|
blame
|
history
diff --git
a/gremlin/gremlin.in
b/gremlin/gremlin.in
index 6e882595627ed77ada16e3933d76ab65c1b55726..84429b7256fdfb7be2700d4a8737346e0b0eb878 100644
(file)
--- a/
gremlin/gremlin.in
+++ b/
gremlin/gremlin.in
@@
-45,7
+45,7
@@
from math import sqrt
from contextlib import contextmanager
## eyeD3 tag fettling.
from contextlib import contextmanager
## eyeD3 tag fettling.
-import eye
D
3 as E3
+import eye
d
3 as E3
## Gstreamer. It picks up command-line arguments -- most notably `--help' --
## and processes them itself. Of course, its help is completely wrong. This
## Gstreamer. It picks up command-line arguments -- most notably `--help' --
## and processes them itself. Of course, its help is completely wrong. This
@@
-1136,13
+1136,16
@@
class MP3Format (AudioFormat):
GStreamer produces ID3v2 tags, but not ID3v1. This seems unnecessarily
unkind to stupid players.
"""
GStreamer produces ID3v2 tags, but not ID3v1. This seems unnecessarily
unkind to stupid players.
"""
- tag = E3.Tag()
- tag.link(path)
- tag.setTextEncoding(E3.UTF_8_ENCODING)
- try:
- tag.update(E3.ID3_V1_1)
- except (UnicodeEncodeError, E3.tag.GenreException):
- pass
+ f = E3.load(path)
+ if f is None: return
+ t = f.tag
+ if t is None: return
+ for v in [E3.id3.ID3_V2_3, E3.id3.ID3_V1]:
+ try: f.tag.save(version = v)
+ except (UnicodeEncodeError,
+ E3.id3.GenreException,
+ E3.id3.TagException):
+ pass
defformat('mp3', MP3Format)
defformat('mp3', MP3Format)