Announcement

Collapse
No announcement yet.

SimpleLibraryViews plugin update increases library build time by a factor of 10

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Originally posted by mherger View Post

    > 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.

    Cheers

    Andy

    Comment


      #17
      Originally posted by mherger View Post
      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!

      Andy

      Comment

      Working...
      X