From: <ny...@us...> - 2006-07-30 04:07:28
|
Revision: 160 Author: nyaochi Date: 2006-07-29 21:07:19 -0700 (Sat, 29 Jul 2006) ViewCVS: http://svn.sourceforge.net/pmplib/?rev=160&view=rev Log Message: ----------- - Activate GMIF_STRIP_ARTIST flag when stripping words are specified. The previous implementation could not work with -z (--source) option. - Stripping heading words now works on Win32 GUI version. Modified Paths: -------------- trunk/pmplib/frontend/easypmp/cui/main.c trunk/pmplib/frontend/easypmp/cui/option.c trunk/pmplib/frontend/easypmp/win32gui/preference.h trunk/pmplib/frontend/easypmp/win32gui/processingdlg.h Modified: trunk/pmplib/frontend/easypmp/cui/main.c =================================================================== --- trunk/pmplib/frontend/easypmp/cui/main.c 2006-07-30 02:06:40 UTC (rev 159) +++ trunk/pmplib/frontend/easypmp/cui/main.c 2006-07-30 04:07:19 UTC (rev 160) @@ -239,6 +239,7 @@ ucs2char_t* ucs2str = mbsdupucs2(opt.mbs_strip_words); easypmp_set_strip_words(&opt, ucs2str); ucs2free(ucs2str); + opt.media_info_source |= GMIF_STRIP_ARTIST; } /* Obtain the path to root directory (path_to_root) from the command line if any. */ Modified: trunk/pmplib/frontend/easypmp/cui/option.c =================================================================== --- trunk/pmplib/frontend/easypmp/cui/option.c 2006-07-30 02:06:40 UTC (rev 159) +++ trunk/pmplib/frontend/easypmp/cui/option.c 2006-07-30 04:07:19 UTC (rev 160) @@ -118,7 +118,7 @@ memset(opt, 0, sizeof(*opt)); // Set default values here. - opt->media_info_source |= (GMIF_TAG | GMIF_STRIP_ARTIST); + opt->media_info_source = GMIF_TAG; opt->system_encoding = get_default_encoding(); opt->music_encoding = get_default_encoding(); } Modified: trunk/pmplib/frontend/easypmp/win32gui/preference.h =================================================================== --- trunk/pmplib/frontend/easypmp/win32gui/preference.h 2006-07-30 02:06:40 UTC (rev 159) +++ trunk/pmplib/frontend/easypmp/win32gui/preference.h 2006-07-30 04:07:19 UTC (rev 160) @@ -47,7 +47,7 @@ { iDBProces = 2; iMediaInfoSource = 0; - strStripWords = _T("the "); + strStripWords = _T("the"); iPlaylistProcess = 2; bConvertInPlaylist = TRUE; bConvertInMusic = TRUE; Modified: trunk/pmplib/frontend/easypmp/win32gui/processingdlg.h =================================================================== --- trunk/pmplib/frontend/easypmp/win32gui/processingdlg.h 2006-07-30 02:06:40 UTC (rev 159) +++ trunk/pmplib/frontend/easypmp/win32gui/processingdlg.h 2006-07-30 04:07:19 UTC (rev 160) @@ -266,8 +266,11 @@ // Set source of media information. opt.media_info_source = media_info_sources[m_preference.iMediaInfoSource]; - // Set a list of strip words. - easypmp_set_strip_words(&opt, CT2CW(m_preference.strStripWords)); + // Set words to be stripped from artist names. + if (!m_preference.strStripWords.IsEmpty()) { + easypmp_set_strip_words(&opt, CT2CW(m_preference.strStripWords)); + opt.media_info_source |= GMIF_STRIP_ARTIST; + } // Set Playlist conversion options. switch (m_preference.iPlaylistProcess) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |