Remove identify traces (#1178)

This commit is contained in:
Zoe Roux 2025-11-23 23:55:23 +01:00 committed by GitHub
parent eb56dd70d6
commit c56f9ea791
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,18 +1,15 @@
import os
from collections.abc import Awaitable
from hashlib import sha256
from itertools import zip_longest
from logging import getLogger
from typing import Callable, Literal, cast
from opentelemetry import trace
from rebulk.match import Match
from ..models.videos import Guess, Video
from .guess.guess import guessit
logger = getLogger(__name__)
tracer = trace.get_tracer("kyoo.scanner")
pipeline: list[Callable[[str, Guess], Awaitable[Guess]]] = [
# TODO: add nfo scanner
@ -22,9 +19,6 @@ pipeline: list[Callable[[str, Guess], Awaitable[Guess]]] = [
async def identify(path: str) -> Video:
with tracer.start_as_current_span(f"identify {os.path.basename(path)}") as span:
span.set_attribute("video.path", path)
raw = guessit(path, expected_titles=[])
# guessit should only return one (according to the doc)
@ -67,7 +61,6 @@ async def identify(path: str) -> Video:
for k, v in raw.items()
},
)
span.set_attribute("video.name", guess.title)
for step in pipeline:
try: