Mercurial > audlegacy
comparison src/audacious/input.c @ 2394:e2aaa7dca389 trunk
[svn] - tuple->file_name coming from input plugins have a string with filename + extension, but tuple->file_name coming from input plugins without a get_song_tuple have a string with filename without extension; fix this incongruency, always pass tuple->filename with a string containing filename + extension
| author | giacomo |
|---|---|
| date | Tue, 23 Jan 2007 16:37:13 -0800 |
| parents | ad1d7687814c |
| children | 9b7b11176d4e |
comparison
equal
deleted
inserted
replaced
| 2393:a8800fd3cb1c | 2394:e2aaa7dca389 |
|---|---|
| 561 TitleInput * | 561 TitleInput * |
| 562 input_get_song_tuple(const gchar * filename) | 562 input_get_song_tuple(const gchar * filename) |
| 563 { | 563 { |
| 564 InputPlugin *ip = NULL; | 564 InputPlugin *ip = NULL; |
| 565 TitleInput *input; | 565 TitleInput *input; |
| 566 gchar *tmp = NULL, *ext; | 566 gchar *ext = NULL; |
| 567 gchar *filename_proxy; | 567 gchar *filename_proxy; |
| 568 | 568 |
| 569 if (filename == NULL) | 569 if (filename == NULL) |
| 570 return NULL; | 570 return NULL; |
| 571 | 571 |
| 577 input = ip->get_song_tuple(filename_proxy); | 577 input = ip->get_song_tuple(filename_proxy); |
| 578 else | 578 else |
| 579 { | 579 { |
| 580 input = bmp_title_input_new(); | 580 input = bmp_title_input_new(); |
| 581 | 581 |
| 582 tmp = g_strdup(filename); | 582 ext = strrchr(filename, '.'); |
| 583 if ((ext = strrchr(tmp, '.'))) | |
| 584 *ext = '\0'; | |
| 585 | 583 |
| 586 input->track_name = NULL; | 584 input->track_name = NULL; |
| 587 input->length = -1; | 585 input->length = -1; |
| 588 input_get_song_info(filename, &input->track_name, &input->length); | 586 input_get_song_info(filename, &input->track_name, &input->length); |
| 589 input->file_name = g_path_get_basename(tmp); | 587 input->file_name = g_path_get_basename(filename); |
| 590 input->file_ext = ext ? ext + 1 : NULL; | 588 input->file_ext = ( ( ext != NULL ) ? g_strdup(ext + 1) : NULL ); |
| 591 input->file_path = g_path_get_dirname(tmp); | 589 input->file_path = g_path_get_dirname(filename); |
| 592 } | 590 } |
| 593 | 591 |
| 594 return input; | 592 return input; |
| 595 } | 593 } |
| 596 | 594 |
