Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Maximilian Dorninger
2025-12-07 22:50:07 +01:00
committed by GitHub
parent 1d1e678890
commit c17efaa306
5 changed files with 5 additions and 5 deletions

View File

@@ -13,7 +13,7 @@ Here is an example, using these rules:
/
└── data/
├── tv/
│ ├── Rick and Morty # WILL be imorted
│ ├── Rick and Morty # WILL be imported
│ ├── Stranger Things (2016) # WILL be imported
│ │
│ ├── Breaking Bad (2008) [tmdbid-1396] # WILL NOT be imported

View File

@@ -194,7 +194,7 @@ def detect_unknown_media(path: Path) -> list[Path]:
log.debug(f"Using Directory {path}")
unknown_tv_shows = []
for media_dir in show_dirs:
# check if directory is one created by MediaManager (contins [tmdbd/tvdbid-0000) or if it is a library
# check if directory is one created by MediaManager (contains [tmdbd/tvdbid-0000) or if it is a library
if (
re.search(r"\[(?:tmdbid|tvdbid)-\d+]", media_dir.name, re.IGNORECASE)
or media_dir.absolute()

View File

@@ -135,7 +135,7 @@ def get_all_importable_shows(
)
def import_detected_show(tv_service: tv_service_dep, tv_show: show_dep, directory: str):
"""
get a list of unknown shows that were detected in the tv directory and are importable
Import a detected show from the specified directory into the library.
"""
source_directory = Path(directory)
if source_directory not in detect_unknown_media(

View File

@@ -676,7 +676,7 @@ class TvService:
season=season,
video_files=video_files,
subtitle_files=subtitle_files,
file_path_suffix=season_file.file_path,
file_path_suffix=season_file.file_path_suffix,
)
if season_import_success:
log.info(

View File

@@ -44,7 +44,7 @@
<h1 class="scroll-m-20 text-center text-4xl font-extrabold tracking-tight lg:text-5xl">
TV Shows
</h1>
{#if importables.length > 0}
{#if importables?.length > 0}
<div
class="grid w-full auto-rows-min gap-4 sm:grid-cols-1 lg:grid-cols-2 xl:grid-cols-4 2xl:grid-cols-4"
>