summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0058a29)
raw | patch | inline | side by side (parent: 0058a29)
author | Andreas Obergrusberger <tradiaz@yahoo.de> | |
Thu, 1 Feb 2007 21:06:33 +0000 (21:06 +0000) | ||
committer | Andreas Obergrusberger <tradiaz@yahoo.de> | |
Thu, 1 Feb 2007 21:06:33 +0000 (21:06 +0000) |
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@5314 09075e82-0dd4-0310-85a5-a0d7c8717e4f
index 47aabe10b69fdf964a9a46dee9380f812b45a932..a62e47f05a52bee3228a662ed643e4eac29e2f2d 100644 (file)
{
if(result & 16)
{
+ if (s[0] == 13 ) return; //ignore any single carriage returns
add_text_line(&lyr_text, s, len);
}
}
return 0;
}
-#if SRC_LYR_LEOSLYRICS == plugin
int register_me (src_lyr *source_descriptor)
{
source_descriptor->check_lyr = check_lyr_leoslyrics;
source_descriptor->name = "Leoslyrics";
source_descriptor->description = "powered by http://www.leoslyrics.com";
}
-#endif
index f4973765697495ae4f99e8b552604b87b038f817..3b85e68d3a9fbed2db8eaed7b3d95dedd660cf7a 100644 (file)
--- a/src/lyrics_leoslyrics.c
+++ b/src/lyrics_leoslyrics.c
{
if(result & 16)
{
+ if (s[0] == 13 ) return; //ignore any single carriage returns
add_text_line(&lyr_text, s, len);
}
}
diff --git a/src/main.c b/src/main.c
index 934882244156d3a2d312bf8bd2f52e5e3e48df1d..7849f8c1305d6ec98832c1defc5e075c2a283d55 100644 (file)
--- a/src/main.c
+++ b/src/main.c
}
exit(EXIT_FAILURE);
}
+
diff --git a/src/screen_lyrics.c b/src/screen_lyrics.c
index 8d70e004cac192847bc9c0370e6ee41ea4513b1e..426004503d40186a8394aa75c239611eedc854fc 100644 (file)
--- a/src/screen_lyrics.c
+++ b/src/screen_lyrics.c
if(!(result & 1))
{
g_string_append (msg, " - ");
- if(!(result & 2)) g_string_append (msg, _("No connection"));
- if(!(result & 4)) g_string_append (msg, _("Not found"));
+ if(!(result & 2)) g_string_append (msg, _("No access"));
+ else if(!(result & 4)) g_string_append (msg, _("Not found"));
}
}
if(lock == 2)
diff --git a/src/screen_search.c b/src/screen_search.c
index 530883f67b52db0e4cbd026113cef963f19ca838..7fb559fabc7eeaac01e33905630f51b7b41924f6 100644 (file)
--- a/src/screen_search.c
+++ b/src/screen_search.c
{
int text_rows;
static char *text[] = {
- "Welcome to ncmpc's search screen - SVN version.",
- "",
- "Quick search - just enter a string and ncmpc will search according",
+ "Quick - just enter a string and ncmpc will search according",
" to the current search mode (displayed above).",
"",
- "Advanced - bla bla bla.... syntax below",
- ""
- " <tag>:<search term> [<tag>:<search term>...]",
- "",
- "Example: artist:radiohead album:pablo honey",
- "",
- "##### SOMEONE - Write a proper help text, please! #####",
+ "Advanced - <tag>:<search term> [<tag>:<search term>...]",
+ " Example: artist:radiohead album:pablo honey",
"",
- "avalible tags: artist, album, title, track, name, genre, date",
- " composer, performer, comment, file",
+ " avalible tags: artist, album, title, track,",
+ " name, genre, date composer, performer, comment, file",
"",
NULL
};
diff --git a/src/src_lyrics.c b/src/src_lyrics.c
index 8ce9937dde433eaf37152d6b6791301e721e25a0..10d0dce51defa6e60ac1ed2c72f717d3ef92621c 100644 (file)
--- a/src/src_lyrics.c
+++ b/src/src_lyrics.c
memcpy(dest, &text->text->str[g_array_index(text->lines, int, num)],
linelen*sizeof(char));
}
- dest[linelen] = '\n';
+ dest[linelen] = '\n';
dest[linelen+1] = '\0';
return 0;
void add_text_line(formed_text *dest, const char *src, int len)
{
+
// need this because g_array_append_val doesnt work with literals
// and expat sends "\n" as an extra line everytime
if(len == 0)
if(dest->lines->len > 0) dest->val += g_array_index(dest->lines, int,
dest->lines->len-1);
}
- else if (len == 1 && dest->val != 0) dest->val = 0;
+ else if (len < 6 && dest->val != 0) dest->val = 0;
if(dest->val > 0)
{