support in_quotes search query

This commit is contained in:
mungai-njoroge
2023-08-06 22:09:39 +03:00
parent 943d6e3590
commit f28d3f00bd
6 changed files with 238 additions and 174 deletions
+3 -10
View File
@@ -84,18 +84,11 @@ class TrackStore:
tdb.remove_tracks_by_folders(to_remove)
@classmethod
def count_tracks_by_hash(cls, trackhash: str) -> int:
def count_tracks_by_trackhash(cls, trackhash: str) -> int:
"""
Counts the number of tracks with a specific hash.
Counts the number of tracks with a specific trackhash.
"""
count = 0
for track in cls.tracks:
if track.trackhash == trackhash:
count += 1
return count
return sum(1 for track in cls.tracks if track.trackhash == trackhash)
@classmethod
def make_track_fav(cls, trackhash: str):