diff options
author | Christian Soffke <christian.soffke@gmail.com> | 2023-01-14 22:27:34 +0100 |
---|---|---|
committer | Christian Soffke <christian.soffke@gmail.com> | 2023-01-19 15:34:20 -0500 |
commit | f441d6bf05668a475525682dffdbca3555d63fdb (patch) | |
tree | 52f7539300dda66b9e95ee15b4370f79169e848f /apps/plugins/lrcplayer.c | |
parent | 36cef88d47b16887106cf13da9edea350ee208d2 (diff) | |
download | rockbox-f441d6bf05668a475525682dffdbca3555d63fdb.tar.gz rockbox-f441d6bf05668a475525682dffdbca3555d63fdb.zip |
plugins: lrcplayer: eliminate redundant function
Change-Id: I93fff9eb616f08bdad021180f83fea1fdb758870
Diffstat (limited to 'apps/plugins/lrcplayer.c')
-rw-r--r-- | apps/plugins/lrcplayer.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/apps/plugins/lrcplayer.c b/apps/plugins/lrcplayer.c index 32d001add9..71e5310638 100644 --- a/apps/plugins/lrcplayer.c +++ b/apps/plugins/lrcplayer.c | |||
@@ -643,22 +643,6 @@ static void init_time_tag(void) | |||
643 | * /ddd.lrc | 643 | * /ddd.lrc |
644 | */ | 644 | */ |
645 | 645 | ||
646 | /* taken from apps/recorder/albumart.c */ | ||
647 | static void fix_filename(char* name) | ||
648 | { | ||
649 | static const char invalid_chars[] = "*/:<>?\\|"; | ||
650 | |||
651 | while (1) | ||
652 | { | ||
653 | if (*name == 0) | ||
654 | return; | ||
655 | if (*name == '"') | ||
656 | *name = '\''; | ||
657 | else if (rb->strchr(invalid_chars, *name)) | ||
658 | *name = '_'; | ||
659 | name++; | ||
660 | } | ||
661 | } | ||
662 | static bool find_lrc_file_helper(const char *base_dir) | 646 | static bool find_lrc_file_helper(const char *base_dir) |
663 | { | 647 | { |
664 | char fname[MAX_PATH]; | 648 | char fname[MAX_PATH]; |
@@ -678,7 +662,7 @@ static bool find_lrc_file_helper(const char *base_dir) | |||
678 | if (current.id3->title && rb->strcmp(names[0], current.id3->title)) | 662 | if (current.id3->title && rb->strcmp(names[0], current.id3->title)) |
679 | { | 663 | { |
680 | rb->strlcpy(fname, current.id3->title, sizeof(fname)); | 664 | rb->strlcpy(fname, current.id3->title, sizeof(fname)); |
681 | fix_filename(fname); | 665 | rb->fix_path_part(fname, 0, sizeof(fname) - 1); |
682 | names[1] = fname; | 666 | names[1] = fname; |
683 | } | 667 | } |
684 | 668 | ||