From: <sv...@op...> - 2024-07-14 14:01:40
|
Author: sagamusix Date: Sun Jul 14 16:01:33 2024 New Revision: 21171 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21171 Log: [Fix] xmp-openmpt: If there is only one subsong, set the song title to the "global" song title instead of the name of that subsong (https://www.un4seen.com/forum/?topic=15448.msg143239#msg143239). Modified: trunk/OpenMPT/libopenmpt/xmp-openmpt/xmp-openmpt.cpp Modified: trunk/OpenMPT/libopenmpt/xmp-openmpt/xmp-openmpt.cpp ============================================================================== --- trunk/OpenMPT/libopenmpt/xmp-openmpt/xmp-openmpt.cpp Sun Jul 14 15:30:54 2024 (r21170) +++ trunk/OpenMPT/libopenmpt/xmp-openmpt/xmp-openmpt.cpp Sun Jul 14 16:01:33 2024 (r21171) @@ -756,7 +756,7 @@ for ( auto subsong_name = first_subsong; subsong_name != last_subsong; subsong_name++ ) { append_xmplay_tag( tags, "filetype", convert_to_native( StringUpperCase( mod.get_metadata( "type" ) ) ) ); - append_xmplay_tag( tags, "title", convert_to_native( ( subsong_name->empty() || subsong == -1 ) ? title : *subsong_name ) ); + append_xmplay_tag( tags, "title", convert_to_native( ( subsong_name->empty() || subsong == -1 || subsong_names.size() == 1 ) ? title : *subsong_name ) ); append_xmplay_tag( tags, "artist", convert_to_native( mod.get_metadata( "artist" ) ) ); append_xmplay_tag( tags, "album", convert_to_native( mod.get_metadata( "xmplay-album" ) ) ); // todo, libopenmpt does not support that append_xmplay_tag( tags, "date", convert_to_native( extract_date( mod ) ) ); |