Hi erland,

>You will need to extend this so if objectForUrl returns undef you try
>to find the track with the same end part of the url. When you have
>found it, you also need to set $url to the new url.
>
>It feels like this would be useful in some situations, so if you decide
>to do it in the TrackStat perl code, please send me the patch and I'll
>try to include it in a future version.
>
Thanks for your help.  I've found the relevant code and put some framework code 
changes in there.  All I need now is to actually find a matching url ;)

What do you feel would be the optimal way to do the match?  I was thinking that 
for each track url from the restore file, I could run some SQL that finds the 
matching track table records where the end-part of the search-for-url matches.  
However, this would be a "LIKE '%' + @search-for-url" search, which may not be 
too fast.  This could be made faster by creating a view that returns all track 
urls reversed (which can then be indexed), and searching "LIKE 
@reversed-search-for-url + '%'"?

Or, should I read all track urls into memory and use regexp matches?

Phil
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins

Reply via email to