Mercurial > audlegacy
comparison src/audacious/playlist.c @ 3349:01a241d35146 trunk
add tuple_formatter_make_title_string(). it is a wrapper function to tuple_formatter_process_construct() to make title string. it falls back to the file name if the formatted string is blank or unavailable.
author | Yoshiki Yazawa <yaz@cc.rim.or.jp> |
---|---|
date | Mon, 13 Aug 2007 19:45:52 +0900 |
parents | 2a081105513c |
children | 8430c3911856 |
comparison
equal
deleted
inserted
replaced
3348:2a081105513c | 3349:01a241d35146 |
---|---|
236 /* attach mtime */ | 236 /* attach mtime */ |
237 tuple_associate_int(tuple, "mtime", modtime); | 237 tuple_associate_int(tuple, "mtime", modtime); |
238 | 238 |
239 /* entry is still around */ | 239 /* entry is still around */ |
240 formatter = tuple_get_string(tuple, "formatter"); | 240 formatter = tuple_get_string(tuple, "formatter"); |
241 entry->title = tuple_formatter_process_string(tuple, formatter ? | 241 entry->title = tuple_formatter_make_title_string(tuple, formatter ? |
242 formatter : get_gentitle_format()); | 242 formatter : get_gentitle_format()); |
243 entry->length = tuple_get_int(tuple, "length"); | 243 entry->length = tuple_get_int(tuple, "length"); |
244 entry->tuple = tuple; | 244 entry->tuple = tuple; |
245 | 245 |
246 g_free(pr); | 246 g_free(pr); |
670 } | 670 } |
671 | 671 |
672 PLAYLIST_UNLOCK( playlist->mutex ); | 672 PLAYLIST_UNLOCK( playlist->mutex ); |
673 if (tuple != NULL) { | 673 if (tuple != NULL) { |
674 const gchar *formatter = tuple_get_string(tuple, "formatter"); | 674 const gchar *formatter = tuple_get_string(tuple, "formatter"); |
675 entry->title = tuple_formatter_process_string(tuple, formatter ? | 675 entry->title = tuple_formatter_make_title_string(tuple, formatter ? |
676 formatter : get_gentitle_format()); | 676 formatter : get_gentitle_format()); |
677 entry->length = tuple_get_int(tuple, "length"); | 677 entry->length = tuple_get_int(tuple, "length"); |
678 entry->tuple = tuple; | 678 entry->tuple = tuple; |
679 } | 679 } |
680 | 680 |