From 70229ead04d0d81670a6055345fedcfd8d3b24c2 Mon Sep 17 00:00:00 2001 From: getzze Date: Tue, 8 Oct 2024 21:18:31 +0100 Subject: [PATCH] use removeprefix --- subliminal/utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/subliminal/utils.py b/subliminal/utils.py index e5c60b98..09d57985 100644 --- a/subliminal/utils.py +++ b/subliminal/utils.py @@ -106,8 +106,7 @@ def sanitize_release_group(string: str) -> str: @none_passthrough def sanitize_id(id_: str | int) -> int: """Sanitize the IMDB (or other) id and transform it to a string (without leading 'tt' or zeroes).""" - # TODO: use str.removeprefix('tt') - id_ = str(id_).lower().lstrip('t') + id_ = str(id_).lower().removeprefix('tt') return int(id_)