lint
This commit is contained in:
parent
96eb309f26
commit
35fae42ab7
1 changed files with 5 additions and 4 deletions
|
|
@ -1,13 +1,12 @@
|
||||||
import json
|
|
||||||
import re
|
import re
|
||||||
import subprocess
|
|
||||||
from typing import Dict
|
from typing import Dict
|
||||||
from typing import List
|
from typing import List
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
from typing import Tuple
|
from typing import Tuple
|
||||||
|
|
||||||
from ytdl_sub.entries.entry import Entry
|
from ytdl_sub.entries.entry import Entry
|
||||||
from ytdl_sub.entries.variables.kwargs import YTDL_SUB_CUSTOM_CHAPTERS, CHAPTERS
|
from ytdl_sub.entries.variables.kwargs import CHAPTERS
|
||||||
|
from ytdl_sub.entries.variables.kwargs import YTDL_SUB_CUSTOM_CHAPTERS
|
||||||
from ytdl_sub.utils.file_handler import FileMetadata
|
from ytdl_sub.utils.file_handler import FileMetadata
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -237,7 +236,9 @@ class Chapters:
|
||||||
titles: List[str] = []
|
titles: List[str] = []
|
||||||
|
|
||||||
# Try to get actual yt-dlp chapters first, then custom chapters, then default to empty list
|
# Try to get actual yt-dlp chapters first, then custom chapters, then default to empty list
|
||||||
chapters = entry.kwargs_get(CHAPTERS, default=entry.kwargs_get(YTDL_SUB_CUSTOM_CHAPTERS, default=[]))
|
chapters = entry.kwargs_get(
|
||||||
|
CHAPTERS, default=entry.kwargs_get(YTDL_SUB_CUSTOM_CHAPTERS, default=[])
|
||||||
|
)
|
||||||
|
|
||||||
for chapter in chapters:
|
for chapter in chapters:
|
||||||
timestamps.append(Timestamp.from_seconds(int(float(chapter["start_time"]))))
|
timestamps.append(Timestamp.from_seconds(int(float(chapter["start_time"]))))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue