Metadata-Version: 2.5
Name: trytond_mediaserver_ingestion
Version: 8.0.0.2
Summary: Media Server Ingestion
Author: Clemens Hupka
Maintainer-email: Clemens Hupka <clemens.hupka@backend.at>
License-Expression: GPL-3.0-or-later
License-File: COPYRIGHT
License-File: LICENSE
Keywords: ingestion,media,server,tryton,workflow
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Environment :: Plugins
Classifier: Framework :: Tryton
Classifier: Topic :: Multimedia :: Video
Requires-Python: >=3.10
Requires-Dist: trytond-mediaserver-licensing<8.1,>=8.0
Requires-Dist: trytond-mediaserver-scraping<8.1,>=8.0
Requires-Dist: trytond-mediaserver<8.1,>=8.0
Requires-Dist: trytond<8.1,>=8.0
Provides-Extra: test
Description-Content-Type: text/x-rst

Mediaserver Ingestion
=====================

The ``mediaserver_ingestion`` module provides a request-based
ingestion workflow for the Tryton mediaserver. A teacher or staff
member can request the integration of a new video from any supported
source (DVD, Tape, URL, etc.), and a staff member reviews, accepts,
and processes the request through a structured workflow.

Features
--------

- **Ingestion request**: A request with the following information:
  title, description, requester (res.user), request date, purpose,
  purpose category (Education, Entertainment, Public Projection,
  Administrative, Other), target date (with configurable minimum
  lead time), retention settings (days/weeks/months/years/unlimited),
  source type, source reference (URL or physical deposit location),
  license information, responsibility agreement, and notes.

- **Workflow states**: draft → submitted → under_review → accepted →
  ingesting → ingested → approved → closed. Alternative paths:
  rejected, cancelled, and request-info (back to submitted).

- **Automated ingestion**: When the source type has an active scraper
  (from ``mediaserver_scraping``), the operator can trigger automated
  ingestion which creates a draft scraping job. The operator must
  then activate (queue and run) the scraping job manually.

- **Manual ingestion**: The operator can also start manual ingestion
  for physical media (DVD, Tape, etc.) where no automated scraping is
  available.

- **History tracking**: All state transitions are recorded with
  timestamp, user, and optional note.

- **Request info wizard**: An operator can request more information
  from the requester, transitioning the request back to "submitted"
  with a note explaining what is needed.

Configuration
-------------

The module uses the ``[mediaserver]`` configuration section of
``trytond.conf`` with the following keys:

- ``ingestion_min_lead_days``: Minimum number of days between the
  request date and the target date. Defaults to 7.
- ``ingestion_default_retention_months``: Default retention value
  in months for new requests. Defaults to 12.

Dependencies
------------

- Tryton module ``mediaserver``
- Tryton module ``mediaserver_scraping``

Models
------

- ``mediaserver_ingestion.request`` — IngestionRequest: a
  workflow-based request for video ingestion.
- ``mediaserver_ingestion.request.history`` —
  IngestionRequestHistory: tracks state transitions for a request.

Wizards
-------

- ``RequestInfoWizard``: Collects a note from the operator and
  transitions the selected request(s) back to "submitted" state.
