summaryrefslogtreecommitdiff
path: root/nephilim/plugins
diff options
context:
space:
mode:
authorAnton Khirnov <wyskas@gmail.com>2010-04-30 08:25:54 +0200
committerAnton Khirnov <wyskas@gmail.com>2010-04-30 08:25:54 +0200
commit48c1445953b12bd247e1d74dbd436d867cea7ebd (patch)
tree8882090b02f87ddf3ecdfff410c96ca54e507133 /nephilim/plugins
parent1ff1ec58b8ad638e7ffa901a38351cecb3478320 (diff)
song: use string.Template for expanding $tags.
Diffstat (limited to 'nephilim/plugins')
-rw-r--r--nephilim/plugins/AlbumCover.py10
-rw-r--r--nephilim/plugins/Lyrics.py12
-rw-r--r--nephilim/plugins/Notify.py4
-rw-r--r--nephilim/plugins/Systray.py2
4 files changed, 14 insertions, 14 deletions
diff --git a/nephilim/plugins/AlbumCover.py b/nephilim/plugins/AlbumCover.py
index 21aaa8c..c462d2f 100644
--- a/nephilim/plugins/AlbumCover.py
+++ b/nephilim/plugins/AlbumCover.py
@@ -103,7 +103,7 @@ class AlbumCover(Plugin):
o = None
# private
- DEFAULTS = {'coverdir' : '$musicdir/$songdir', 'covername' : '.cover_nephilim_$artist_$album',
+ DEFAULTS = {'coverdir' : '${musicdir}/${songdir}', 'covername' : '.cover_%s_${artist}_${album}'%common.APPNAME,
'fetchers': ['local', 'Last.fm'], 'store' : True}
"implemented fetchers"
available_fetchers = None
@@ -165,15 +165,15 @@ class AlbumCover(Plugin):
# paths to covers
self.coverdir = QtGui.QLineEdit(self.settings.value('coverdir').toString())
self.coverdir.setToolTip('Where should %s store covers.\n'
- '$musicdir will be expanded to path to MPD music library (as set by user)\n'
- '$songdir will be expanded to path to the song (relative to $musicdir\n'
+ '${musicdir} will be expanded to path to MPD music library (as set by user)\n'
+ '${songdir} will be expanded to path to the song (relative to ${musicdir}\n'
'other tags same as in covername'
%common.APPNAME)
self.covername = QtGui.QLineEdit(self.settings.value('covername').toString())
self.covername.setToolTip('Filename for %s cover files.\n'
'All tags supported by MPD will be expanded to their\n'
- 'values for current song, e.g. $title, $track, $artist,\n'
- '$album, $genre etc.'%common.APPNAME)
+ 'values for current song, e.g. ${title}, ${track}, ${artist},\n'
+ '${album}, ${genre} etc.'%common.APPNAME)
self.store.layout().addWidget(QtGui.QLabel('Cover directory'), 0, 0)
self.store.layout().addWidget(self.coverdir, 0, 1)
self.store.layout().addWidget(QtGui.QLabel('Cover filename'), 1, 0)
diff --git a/nephilim/plugins/Lyrics.py b/nephilim/plugins/Lyrics.py
index 4dc647e..d110fd3 100644
--- a/nephilim/plugins/Lyrics.py
+++ b/nephilim/plugins/Lyrics.py
@@ -109,8 +109,8 @@ class Lyrics(Plugin):
o = None
# private
- DEFAULTS = {'fetchers' : ['Lyricwiki', 'Animelyrics'], 'lyricdir' : '$musicdir/$songdir',
- 'lyricname' : '.lyrics_nephilim_$artist_$album_$title', 'store' : True}
+ DEFAULTS = {'fetchers' : ['Lyricwiki', 'Animelyrics'], 'lyricdir' : '${musicdir}/${songdir}',
+ 'lyricname' : '.lyrics_%s_${artist}_${album}_${title}'%common.APPNAME, 'store' : True}
"implemented fetchers"
available_fetchers = None #XXX SettingsWidget currently uses it
"enabled fetchers, those with higher priority first"
@@ -273,15 +273,15 @@ class Lyrics(Plugin):
# paths to lyrics
self.lyricdir = QtGui.QLineEdit(self.settings.value('lyricdir').toString())
self.lyricdir.setToolTip('Where should %s store lyrics.\n'
- '$musicdir will be expanded to path to MPD music library (as set by user)\n'
- '$songdir will be expanded to path to the song (relative to $musicdir\n'
+ '${musicdir} will be expanded to path to MPD music library (as set by user)\n'
+ '${songdir} will be expanded to path to the song (relative to ${musicdir}\n'
'other tags same as in lyricname'
%common.APPNAME)
self.lyricname = QtGui.QLineEdit(self.settings.value('lyricname').toString())
self.lyricname.setToolTip('Filename for %s lyricsfiles.\n'
'All tags supported by MPD will be expanded to their\n'
- 'values for current song, e.g. $title, $track, $artist,\n'
- '$album, $genre etc.'%common.APPNAME)
+ 'values for current song, e.g. ${title}, ${track}, ${artist},\n'
+ '${album}, ${genre} etc.'%common.APPNAME)
self.store.layout().addWidget(QtGui.QLabel('Lyrics directory'), 0, 0)
self.store.layout().addWidget(self.lyricdir, 0, 1)
self.store.layout().addWidget(QtGui.QLabel('Lyrics filename'), 1, 0)
diff --git a/nephilim/plugins/Notify.py b/nephilim/plugins/Notify.py
index 901e936..7906861 100644
--- a/nephilim/plugins/Notify.py
+++ b/nephilim/plugins/Notify.py
@@ -103,7 +103,7 @@ class Notify(Plugin):
# public, read-only
o = None
- DEFAULTS = {'songformat' : '$track - $artist - $title ($album) [$length]',
+ DEFAULTS = {'songformat' : '${track} - ${artist} - ${title} (${album}) [${length}]',
'timer' : 3000}
def _load(self):
@@ -152,7 +152,7 @@ class Notify(Plugin):
self.setLayout(QtGui.QVBoxLayout())
self._add_widget(self.format, 'Format', 'Format of notifications. All tags supported by MPD\n'
'will be expanded to their values for current song,\n'
- 'e.g. $track, $title, $artist, $album, $length, $date, etc.')
+ 'e.g. ${track}, ${title}, ${artist}, ${album}, ${length}, ${date}, etc.')
self._add_widget(self.timer, 'Duration', 'How long should notifications be displayed in ms.')
self.settings.endGroup()
diff --git a/nephilim/plugins/Systray.py b/nephilim/plugins/Systray.py
index 084ec9d..1f28597 100644
--- a/nephilim/plugins/Systray.py
+++ b/nephilim/plugins/Systray.py
@@ -33,7 +33,7 @@ class Systray(Plugin):
# private
format = None
eventObj = None
- DEFAULTS = {'format': '$track - $title by $artist on $album ($length)'}
+ DEFAULTS = {'format': '${track} - ${title} by ${artist} on ${album} (${length})'}
def _load(self):
self.format = self.settings.value(self.name + '/format').toString()