plugins: lrcplayer: eliminate redundant function

Change-Id: I93fff9eb616f08bdad021180f83fea1fdb758870
This commit is contained in:
Christian Soffke 2023-01-14 22:27:34 +01:00
parent 36cef88d47
commit f441d6bf05

View file

@ -643,22 +643,6 @@ static void init_time_tag(void)
* /ddd.lrc
*/
/* taken from apps/recorder/albumart.c */
static void fix_filename(char* name)
{
static const char invalid_chars[] = "*/:<>?\\|";
while (1)
{
if (*name == 0)
return;
if (*name == '"')
*name = '\'';
else if (rb->strchr(invalid_chars, *name))
*name = '_';
name++;
}
}
static bool find_lrc_file_helper(const char *base_dir)
{
char fname[MAX_PATH];
@ -678,7 +662,7 @@ static bool find_lrc_file_helper(const char *base_dir)
if (current.id3->title && rb->strcmp(names[0], current.id3->title))
{
rb->strlcpy(fname, current.id3->title, sizeof(fname));
fix_filename(fname);
rb->fix_path_part(fname, 0, sizeof(fname) - 1);
names[1] = fname;
}