mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-11-26 00:05:10 -05:00
Remove identify traces (#1178)
This commit is contained in:
parent
eb56dd70d6
commit
c56f9ea791
@ -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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user