fix: folder endpoint returning same track for different files of the same trackhash

+ fix: chunked streaming. return instead of yield chunks
This commit is contained in:
cwilvx
2024-08-15 17:07:34 +03:00
parent cd992419c5
commit ca31054f48
18 changed files with 508 additions and 138 deletions
+7 -3
View File
@@ -39,10 +39,14 @@ class FolderStore:
trackhash = cls.map.get(filepath)
if trackhash:
track = TrackStore.trackhashmap.get(trackhash)
trackgroup = TrackStore.trackhashmap.get(trackhash)
if track:
yield track.tracks[0]
if trackgroup is None:
continue
for track in trackgroup.tracks:
if track.filepath == filepath:
yield track
@classmethod
def count_tracks_containing_paths(cls, paths: list[str]):