Hi,
I'm trying to perform a fairly simple operation - take a filename which is Artist 1, Artist 2 - Title and populate the Artist field with "Artist 1 || Artist 2"
I'm working using Actions here so that I can easily repeat the operation.
Originally I split the filename by "-", but ran into an issue with artists like T-Pain, so thought to use the Format Value Action and split on " - " instead. I was going to use $strstr to identify where the split is, $left to take only the Artists and finally $replace to swap commas for ||.
The trouble was it didn't work - $strstr could find "- " and "-", but not " - " in the filename.
Perhaps the first space isn't really a space you think, so I split the operation into 3 separate actions;
- Copy the filename into a user defined tag
- Use Replace on the new tag to swap " - " for "x-x"
- Use the complex operation described above involving $strstr to locate x-x and truncate the string etc.
But now despite 1 & 2 working fine, operation 3 could not locate "x-x". It IS there, and my syntax in 3 is correct because if I swap "x-x" for another 3 character string located in that artist, it works!
So it appears that $strstr has an issue with dashes unless a dash is the first character of the string it is looking for.