From 4b316e34253068016baee3d1e95373dcdd92392f Mon Sep 17 00:00:00 2001 From: Jacob Chapman <7908073+chapmanjacobd@users.noreply.github.com> Date: Mon, 27 May 2024 18:00:43 +0800 Subject: [PATCH] 2.8.046 --- .github/README.md | 2 +- xklb/__init__.py | 2 +- xklb/createdb/av.py | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/README.md b/.github/README.md index 1dea6604..8de13421 100644 --- a/.github/README.md +++ b/.github/README.md @@ -97,7 +97,7 @@ To stop playing press Ctrl+C in either the terminal or mpv
List all subcommands $ library - library (v2.8.045; 77 subcommands) + library (v2.8.046; 77 subcommands) Create database subcommands: ╭───────────────┬──────────────────────────────────────────╮ diff --git a/xklb/__init__.py b/xklb/__init__.py index 39d0030e..424abd73 100644 --- a/xklb/__init__.py +++ b/xklb/__init__.py @@ -1 +1 @@ -__version__ = "2.8.045" +__version__ = "2.8.046" diff --git a/xklb/createdb/av.py b/xklb/createdb/av.py index aea1f50e..eafd8bef 100644 --- a/xklb/createdb/av.py +++ b/xklb/createdb/av.py @@ -1,6 +1,8 @@ from datetime import datetime from pathlib import Path +from yt_dlp.utils import traverse_obj + from xklb.createdb import subtitle from xklb.mediafiles import media_check from xklb.utils import consts, file_utils, iterables, nums, objects, processes, strings @@ -9,7 +11,7 @@ def is_album_art(s): - return s.get("disposition", {}).get("attached_pic", 0) == 1 + return traverse_obj(s, "disposition", "attached_pic") == 1 def get_subtitle_tags(path, streams, codec_types, scan_subtitles=False) -> dict: