Re: SimpleLibraryViews plugin update increases library build time by a factor of 10
adhawkins <adhawkins.akqzfz-NUepA2SMhDQqspMVqqL2D+4xXEVPTSb/[email protected]> Fri, 20 May 2022 23:52:52 +0000
| Newsgroups | gmane.music.equipment.slimdevices.devel |
|---|---|
| Organization | Logitech Squeezebox Forums |
| Message-ID | <[email protected]> |
mherger wrote:
> I'd definitely recommend using File::Next or File::Find to get a list of
>
> library names with the folders they use. Then query the DB based on the
>
> folder. As you'd be able to insert based on the url that could be a
> pretty efficient SQL query. Something like
>
> INSERT OR IGNORE INTO library_track (library, track)
> SELECT ?, tracks.id
> FROM tracks
> WHERE url like ?
> AND content_type NOT IN ("cpl", "src", "ssp", "dir")
>
> where arguments are the library ID and the "file://path/to/folder%"
> (haven't tested this, but I assume you get the point).
>
So you're saying I should use File::Next to search for
'.simple-library-views-<libname>' files. Then for each one of these it
finds, call the query you quote passing in
file://dirname(fullpath-to-slv-file)/. Will your query handle if (for
example) they have library files in both:
- /var/spool/music/A/Andy/
- /var/spool/music/A/Andy/Album 1
-
This would find the same track ID twice, would the query handle that?
mherger wrote:
> Oh, and you got quite a few "libary" instead of "library" in your readme
>
> :-).
Whoops! Nobody has spotted that since I first published the plugin
something like 6 years ago! :)
Andy
------------------------------------------------------------------------
adhawkins's Profile: http://forums.slimdevices.com/member.php?userid=650
View this thread: http://forums.slimdevices.com/showthread.php?t=116400