mirror of
https://github.com/beetbox/beets.git
synced 2026-01-05 23:43:31 +01:00
beetsplug/playlist: actually use SQL clause
As far as I can tell, the fast SQL path was never used before, since a query would use the default `clause()` implementation. It is only the `FieldQuery.clause()` that could delegate to `col_clause()`, but `PlaylistQuery` is not a `FieldQuery`.
This commit is contained in:
parent
09d2c87f29
commit
bc7c447b3c
1 changed files with 2 additions and 1 deletions
|
|
@ -15,6 +15,7 @@
|
|||
import os
|
||||
import fnmatch
|
||||
import tempfile
|
||||
from typing import Any, Optional, Sequence, Tuple
|
||||
import beets
|
||||
from beets.util import path_as_posix
|
||||
|
||||
|
|
@ -65,7 +66,7 @@ class PlaylistQuery(beets.dbcore.NamedQuery):
|
|||
f.close()
|
||||
break
|
||||
|
||||
def col_clause(self):
|
||||
def clause(self) -> Tuple[Optional[str], Sequence[Any]]:
|
||||
if not self.paths:
|
||||
# Playlist is empty
|
||||
return '0', ()
|
||||
|
|
|
|||
Loading…
Reference in a new issue