tdarr: fix versions containing 5 (#2757)

Not knowing python I left in the `.strip(STRIP_TEXT)` thinking it operated like replace while in fact it's more like a regex removal.  Tdarr has not used the _ffmpeg5 suffix in about a year so just removing it from the upgrade_strategy to fix.
This commit is contained in:
Ryan S
2024-08-27 05:43:15 -05:00
committed by GitHub
parent b284cedf55
commit 9bfb735a1f
2 changed files with 3 additions and 4 deletions

View File

@@ -3,7 +3,7 @@ description: Tdarr is a Distributed Transcoding System
annotations:
title: Tdarr
type: application
version: 1.2.11
version: 1.2.12
apiVersion: v2
appVersion: 2.24.4
kubeVersion: '>=1.16.0-0'

View File

@@ -7,15 +7,14 @@ from catalog_update.upgrade_strategy import semantic_versioning
# Drop _ffmpeg5 after Cobia is released for a while
RE_STABLE_VERSION = re.compile(r'[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?(_ffmpeg5)?')
RE_STABLE_VERSION = re.compile(r'[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?')
RE_CLEAN_VERSION = re.compile(r'0+([1-9])')
STRIP_TEXT = '_ffmpeg5'
def newer_mapping(image_tags):
key = list(image_tags.keys())[0]
tags = {
RE_CLEAN_VERSION.sub('\\1', t.strip(STRIP_TEXT)): t
RE_CLEAN_VERSION.sub('\\1', t): t
for t in image_tags[key]
if RE_STABLE_VERSION.fullmatch(t)
}