I'm trying to do the following:
If the artist tag is present, display the artist tag.
If the artist tag is missing, or is longer than 35 characters, use the name of the artist-level folder on my hard drive.
For example, consider the following file structure:
mp3s
|
|__OldiesFolder
.....|
.....|___SongOne.mp3
.....|
.....|___Subfolder
............|
............|__SongTwo.mp3
Assuming both SongOne and SongTwo have no artist tags, I'd like them both to display "OldiesFolder"
I have a working solution, below, but it's horribly inefficient, and just goes up one step at a time until it hits the "mp3s" folder, then returns the folder one level down from that. It works, but it increases load time on longer playlists. Is there a better way to do this?
$puts(artistDIR,
$if($strcmp($directory(%path%),'mp3s'),,
$if($strcmp($directory(%path%,1),'mp3s'),$directory(%path%),
$if($strcmp($directory(%path%,2),'mp3s'),$directory(%path%,1),
$if($strcmp($directory(%path%,3),'mp3s'),$directory(%path%,2),
$if($strcmp($directory(%path%,4),'mp3s'),$directory(%path%,3),
$if($strcmp($directory(%path%,5),'mp3s'),$directory(%path%,4),
$if($strcmp($directory(%path%,6),'mp3s'),$directory(%path%,5),
)
)
)
)
)
)
)
)
$iflonger(%artist%,35,$get(artistDIR),$if2(%artist%,$get(artistDIR)))
I just realized perhaps this better belongs in a columns_ui thread rather than in here...
I thought about posting in both, but couldn't figure which would be better. Mods, please don't crucify me for this! I got warned back in the day when I was brand new to this, and I don't mean to misbehave. Please move this thread if it's improperly placed.