diff --git a/src/main/lkt.c b/src/main/lkt.c index af3f49ec4cf370188c146055716b7f4ebb452303..7e33ace8249e482b3be968e8f243f98aa2b23fc2 100644 --- a/src/main/lkt.c +++ b/src/main/lkt.c @@ -961,6 +961,10 @@ redo: else if (STR_NMATCH(buff, "ACK", 3)) exit(EXIT_FAILURE); + if (STR_NMATCH(buff, "name: ", strlen("name: "))) { + char *real_line = buff + sizeof("name: ") - sizeof(char); + memmove(buff, real_line, (1 + strlen(real_line)) * sizeof(char)); + } fprintf(stdout, "%s", buff); } } diff --git a/src/module/module_repo.c b/src/module/module_repo.c index c029e999a38607917f01b266c2d75fc721f9bca1..f4f1578e687e85f295b0378a9162913b0f423522 100644 --- a/src/module/module_repo.c +++ b/src/module/module_repo.c @@ -511,9 +511,8 @@ __handle_fav_list(struct module_repo_internal *repo, char *fav, size_t fav_size) LOG_WARN("REPO", "Fav list has a name to big to prepend it by '@'. Possible collision with other playlists"); } else { memmove(fav + sizeof(char), fav, fav_len * sizeof(char)); - fav_origin = fav; - fav[0] = (char) ("@"); - fav += sizeof(char); + fav_origin = fav + sizeof(char); + fav[0] = (char) ('@'); LOG_INFO("REPO", "Importing fav list '%s' as '%s'", fav_origin, fav); } @@ -537,7 +536,7 @@ __handle_fav_list(struct module_repo_internal *repo, char *fav, size_t fav_size) } uri.id = id; if (!database_plt_add_uri(repo->db, fav, &uri)) { - LOG_ERROR("REPO", "Failed to add kara %ld to playlist %s", fav); + LOG_ERROR("REPO", "Failed to add kara %ld to playlist %s", id, fav); continue; } }