From 608b936e9f7b5ffe05988bde66af1fb1c6acf239 Mon Sep 17 00:00:00 2001 Message-Id: <608b936e9f7b5ffe05988bde66af1fb1c6acf239.1715011971.git.mdw@distorted.org.uk> From: Mark Wooding Date: Tue, 17 Apr 2018 02:09:55 +0100 Subject: [PATCH] gremlin/gremlin.in: Apparently eyeD3 has completely changed. Organization: Straylight/Edgeware From: Mark Wooding --- gremlin/gremlin.in | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/gremlin/gremlin.in b/gremlin/gremlin.in index 6e88259..84429b7 100644 --- a/gremlin/gremlin.in +++ b/gremlin/gremlin.in @@ -45,7 +45,7 @@ from math import sqrt from contextlib import contextmanager ## eyeD3 tag fettling. -import eyeD3 as E3 +import eyed3 as E3 ## 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. """ - 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) -- [mdw]