If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
Announcement
Collapse
No announcement yet.
SimpleLibraryViews plugin update increases library build time by a factor of 10
> my $pathSearch = Slim::Utils::Misc::fileURLFromPath($dir) . File::Spec->catfile('', '') . "%";
I still believe this could fail on Windows. Would you have any Windows
testers? catfile() should not be used with a URL. Just use the forward
slash "/" instead.
Yes, I've replaced that. I deliberately used catfile because I wanted to make sure I used the correct separator under Windows. You are of course correct though, the URI format that's actually used in the database should only use the '/' as a separator, so I've changed that.
SQLiteStudio has built-in support for regexp (https://sqlitestudio.pl).
And my regex almost did work. I'm going to edit it (needs a '$' matcher
at the end). SQLiteStudio didn't need to escape the slash ("[^\/]"). I'm not sure
about DBI. Give it a try, and change to just "[^/]" if it doesn't work.
To be honest, I think I'll take your advice and stick with code I understand. Regular expressions have always been something I've been a bit uncomfortable with, so keeping the code simple is a good idea I think. My new version does seem relatively performant which is good.
I've also taken your advice and rewritten the plugin so it does a single search of the filesystem per scan. That code is now pushed to GitHub in the 'recurse' branch if you wanted to take a look at what I believe is the final version.
Just rewriting your 'build' script from several years ago, as in its current state it didn't seem to handle versions with letters in them.
Once again, thanks so much for all your assistance in getting this far. Perl is not a language I use regularly, so there's been a lot of re-learning required in this work!
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, personalize advertising, and to analyze site activity. We may share certain information about our users with our advertising and analytics partners. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment