Skip to content

Add duplicate file detection when creating encoding jobs #49

Description

@wmehanna

Problem

When users run a library scan and create encoding jobs, there's no check to skip files that already have an active or completed job. This leads to wasted processing and duplicate jobs.

Expected Behavior

Before creating a new job for a file, check if a job already exists with status COMPLETED, ENCODING, or QUEUED for that filePath. If so, skip creating a duplicate job.

Location

apps/backend/src/libraries/libraries.service.ts - createJobsFromScan() method

Additional Considerations

  • Also check in queue.service.ts create() method for direct job creation
  • Consider adding optional force parameter to override duplicate check

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions