author | Thomas Jansen <mithi@mithi.net> | |
Sat, 3 Oct 2009 13:32:06 +0000 (15:32 +0200) | ||
committer | Thomas Jansen <mithi@mithi.net> | |
Sat, 3 Oct 2009 13:32:06 +0000 (15:32 +0200) | ||
commit | 905266256e0a564d8b5421fa9cd897901e583314 | |
tree | 83c6fb2e728fd224cf6509db4915e2641bbebcb2 | tree | snapshot |
parent | 7d3284bc9ad5031d8ef21bd6d0734b9098c4982f | commit | diff |
plugin: handle stderr messages of lyrics plugins
Use a second pipe to capture error messages generated by lyrics plugins. If
one plugin succeeds to retrieve some lyrics, we display them and discard the
error messages. If no plugin succeeds, we show the error messages of all
plugins that failed with an exit code other than 69 (EX_UNAVAILABLE,
sysexits.h).
All plugins use exit code 0 to indicate success (i.e. they are able to provide
lyrics on stdout). Exit code 69 indicates failure to retrieve lyrics, but
otherwise normal operation of the plugin. A plugin returning exit code 69 is
not listed as a failed plugin. Other exit codes indicate an internal error in
the plugin. Those plugins are listed as failed along with the output they
provide on stderr.
Use a second pipe to capture error messages generated by lyrics plugins. If
one plugin succeeds to retrieve some lyrics, we display them and discard the
error messages. If no plugin succeeds, we show the error messages of all
plugins that failed with an exit code other than 69 (EX_UNAVAILABLE,
sysexits.h).
All plugins use exit code 0 to indicate success (i.e. they are able to provide
lyrics on stdout). Exit code 69 indicates failure to retrieve lyrics, but
otherwise normal operation of the plugin. A plugin returning exit code 69 is
not listed as a failed plugin. Other exit codes indicate an internal error in
the plugin. Those plugins are listed as failed along with the output they
provide on stderr.
NEWS | diff | blob | history | |
lyrics/01-hd.sh | diff | blob | history | |
lyrics/02-lyricwiki.rb | diff | blob | history | |
lyrics/03-leoslyrics.py | diff | blob | history | |
src/plugin.c | diff | blob | history | |
src/plugin.h | diff | blob | history | |
src/screen_lyrics.c | diff | blob | history |