erland
2008-12-21, 03:39
Michael, hopefully you are seeing this.
I have some problem with the Title Switcher plugin when it integrates with MusicInfoSCR. The problem is the following code in Info.pm in MusicInfoSCR:
if ( $client->pluginData('remoteData') ) {
foreach my $tag (@remoteTags) {
$formattedString =~ s/$tag/_MIS_REMOTE_$tag/g;
}
}
The problem with this is that if $formattedString is set to "TITLESWITCHERALBUMARTIST" this code section will replace it to "_MIS_REMOTE_TITLESWITCHER_MIS_REMOTE_ALBUM_MIS_REM OTE_ARTIST". It's of course correct to do the replacement if $formattedString was "TITLE - ARTIST" but I think it's incorrect if TITLE or ARTIST is part of a another word (like TITLESWITCHERARTIST, ALBUMARTIST). Is it possible to change this so it replaces the remoteTags keywords if they are found as separate words but not if they are found as part of a another word ?
I can do an ugly correction in Title Switcher to solve it, but I would prefer avoiding dependencies in Title Switcher to MusicInfoSCR internals like the string _MIS_REMOTE_ and the @remoteTags array.
I have some problem with the Title Switcher plugin when it integrates with MusicInfoSCR. The problem is the following code in Info.pm in MusicInfoSCR:
if ( $client->pluginData('remoteData') ) {
foreach my $tag (@remoteTags) {
$formattedString =~ s/$tag/_MIS_REMOTE_$tag/g;
}
}
The problem with this is that if $formattedString is set to "TITLESWITCHERALBUMARTIST" this code section will replace it to "_MIS_REMOTE_TITLESWITCHER_MIS_REMOTE_ALBUM_MIS_REM OTE_ARTIST". It's of course correct to do the replacement if $formattedString was "TITLE - ARTIST" but I think it's incorrect if TITLE or ARTIST is part of a another word (like TITLESWITCHERARTIST, ALBUMARTIST). Is it possible to change this so it replaces the remoteTags keywords if they are found as separate words but not if they are found as part of a another word ?
I can do an ugly correction in Title Switcher to solve it, but I would prefer avoiding dependencies in Title Switcher to MusicInfoSCR internals like the string _MIS_REMOTE_ and the @remoteTags array.