| 1 |
# Copyright (C) 2008-2010 Adam Olsen |
| 2 |
# |
| 3 |
# This program is free software; you can redistribute it and/or modify |
| 4 |
# it under the terms of the GNU General Public License as published by |
| 5 |
# the Free Software Foundation; either version 2, or (at your option) |
| 6 |
# any later version. |
| 7 |
# |
| 8 |
# This program is distributed in the hope that it will be useful, |
| 9 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 |
# GNU General Public License for more details. |
| 12 |
# |
| 13 |
# You should have received a copy of the GNU General Public License |
| 14 |
# along with this program; if not, write to the Free Software |
| 15 |
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 16 |
# |
| 17 |
# |
| 18 |
# The developers of the Exaile media player hereby grant permission |
| 19 |
# for non-GPL compatible GStreamer and Exaile plugins to be used and |
| 20 |
# distributed together with GStreamer and Exaile. This permission is |
| 21 |
# above and beyond the permissions granted by the GPL license by which |
| 22 |
# Exaile is covered. If you modify this code, you may extend this |
| 23 |
# exception to your version of the code, but you are not obligated to |
| 24 |
# do so. If you do not wish to do so, delete this exception statement |
| 25 |
# from your version. |
| 26 |
|
| 27 |
|
| 28 |
from xl.metadata._base import CaseInsensitiveBaseFormat |
| 29 |
from mutagen import apev2 |
| 30 |
|
| 31 |
|
| 32 |
class ApeFormat(CaseInsensitiveBaseFormat): |
| 33 |
MutagenType = apev2.APEv2 |
| 34 |
# TODO: this mapping is incomplete |
| 35 |
tag_mapping = { |
| 36 |
"title": "Title", |
| 37 |
"album": "Album", |
| 38 |
"artist": "Artist", |
| 39 |
"albumartist": "Album Artist", |
| 40 |
"genre": "Genre", |
| 41 |
"tracknumber": "Track", |
| 42 |
"date": "Year", |
| 43 |
"composer": "Composer", |
| 44 |
"discnumber": "Disc", |
| 45 |
"comment": "Comment", |
| 46 |
"isrc": "ISRC", |
| 47 |
"lyrics": "Lyrics", |
| 48 |
"albumsort": "ALBUMSORT", |
| 49 |
"albumartistsort": "ALBUMARTISTSORT", |
| 50 |
"artistsort": "ARTISTSORT", |
| 51 |
"titlesort": "TITLESORT", |
| 52 |
"grouping": "Grouping", |
| 53 |
"language": "Language", |
| 54 |
} |
| 55 |
others = True |
| 56 |
writable = True |
| 57 |
|
| 58 |
|
| 59 |
# vim: et sts=4 sw=4 |