Skip to content
This repository was archived by the owner on Apr 20, 2025. It is now read-only.
This repository was archived by the owner on Apr 20, 2025. It is now read-only.

Double clip avoidance not working #30

Open
@tim-we

Description

@tim-we

image

Either

py-radio/radio/library.py

Lines 92 to 105 in 133cc3b

def next(self) -> str:
assert not self.empty(), "Cannot pick clip from empty pool"
# find a clip that is not in the recent history
idx = random.randrange(0, len(self.clips))
while idx in self._history:
idx = random.randrange(0, len(self.clips))
# add to recent history
self._history.append(idx)
if len(self._history) > self._history_len:
del self._history[0]
return self.clips[idx]
is not working or _history_len has an incorrect value.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions