summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2010-11-28 10:09:06 +0100
committerAnton Khirnov <anton@khirnov.net>2011-09-04 20:17:35 +0200
commitab0f07a2341cd741921d163baa606acc6e09e127 (patch)
treed151ef87918e2c44c5bc168c6095663a288e6f66
parent43840980ae8c7510a9c653e87d2ca5d635b9d164 (diff)
Lyrics: save lyrics as stickers
for now encode newlines as '\n', should probably be fixed in MPD protocol also no reading support for now
-rw-r--r--nephilim/plugins/Lyrics.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/nephilim/plugins/Lyrics.py b/nephilim/plugins/Lyrics.py
index 30e18fa..6838eda 100644
--- a/nephilim/plugins/Lyrics.py
+++ b/nephilim/plugins/Lyrics.py
@@ -272,6 +272,7 @@ class Lyrics(Plugin):
self.logger.info('Lyrics successfully saved.')
except IOError, e:
self.logger.error('Error writing lyrics: %s', e)
+ self.mpclient.sticker_set(self.mpclient.cur_song['file'], 'lyrics', lyrics.replace('\n', '\\n'))
def del_lyrics_file(self, song = None):
"""Delete a lyrics file for song. If song is not specified