mirror of
https://github.com/euzu/tuliprox.git
synced 2026-10-05 23:42:47 +02:00
Duplicate detection only produced an identity for Live captures, so no VOD or series request was ever compared against anything. A user who asked for the same film twice got two concurrent downloads of the same URL, written side by side as film.mp4 and film_1.mp4, each charging their quota. There were no tests for duplicate detection at all. persisted_recording_identity now answers for every kind. The Url identity gains the quota pool dimension that Programme already carried, so deduplication is per principal: a second user asking for the same film is still admitted. Deduplicating across principals would mean telling them "already recording" and leaving them with nothing, which is only correct once one physical file can carry several library entries. Behaviour preserved: a finished transfer does not block a fresh request, because after a completed or failed attempt the user may legitimately want another copy. A completed rule occurrence still blocks, because the scheduler re-evaluates rules on every tick and would otherwise re-materialize it forever. Six tests now pin these rules.