有方便的播放列表,自动分类,文件浏览和搜索
不过默认的 Exaile 没有考虑国内 GBK 标签的 MP3,
我给写了个 dirty 的中文补丁,
这个是 0.2 的补丁
https://bugs.launchpad.net/exaile/+bug/223547
http://launchpadlibrarian.net/13981853/ ... pport.diff
代码: 全选
diff -Nur exaile-0.2.11.1.orig/xl/media/mp3.py exaile-0.2.11.1/xl/media/mp3.py
--- exaile-0.2.11.1.orig/xl/media/mp3.py 2007-11-08 00:12:54.000000000 +0800
+++ exaile-0.2.11.1/xl/media/mp3.py 2008-04-28 16:38:15.000000000 +0800
@@ -29,6 +29,21 @@
"WOAR": "website",
}
+_unicode = unicode
+def unicode(string, encoding='utf8', errors='strict'):
+ """converts ID3 tags from legacy encodings to Unicode
+ """
+ try:
+ string = string.decode('utf8').encode('iso8859-1')
+ except:
+ return _unicode(string)
+ for enc in ('utf8', 'gb2312', 'big5', 'gb18030', 'big5hkscs', 'euc-jp', 'euc_kr', 'cp1251', 'utf16'):
+ try:
+ return string.decode(enc)
+ except:
+ pass
+ return string
+
def get_tag(id3, t):
"""
Reads a specific id3 tag from the file
代码: 全选
--- xl/media/mp3.py.orig 2007-11-24 17:07:35.000000000 +0800 +++ xl/media/mp3.py 2007-11-24 17:12:25.000000000 +0800 @@ -19,6 +19,8 @@ def get_tag(id3, t): """ if not id3.has_key(t): return "" text = unicode(id3[t]) + try: text = id3[t].text[0].encode('iso-8859-1').decode('gb18030') + except: pass text = text.replace('\n', ' ').replace('\r', ' ') return text
使用补丁::
可以先 apt 或从 www.getdeb.net 安装 Exaile 音乐播放器,
然后在终端里边执行代码: 全选
grep -q gb18030 /usr/share/exaile/xl/media/mp3.py || sudo sed -i '/unicode(id3/a\ \ \ \ try: text = id3[t].text[0].encode('iso-8859-1').decode('gb18030')\n\ \ \ \ except: pass' /usr/share/exaile/xl/media/mp3.py