From bc7c447b3ca754f56b8ad0b5f6cbe0ebbefc6a14 Mon Sep 17 00:00:00 2001 From: wisp3rwind <17089248+wisp3rwind@users.noreply.github.com> Date: Fri, 23 Jun 2023 11:00:09 +0200 Subject: [PATCH] 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`. --- beetsplug/playlist.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/beetsplug/playlist.py b/beetsplug/playlist.py index 9686a046c..10215a8aa 100644 --- a/beetsplug/playlist.py +++ b/beetsplug/playlist.py @@ -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', ()