karaoke-gen 0.61.0__py3-none-any.whl → 0.61.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of karaoke-gen might be problematic. Click here for more details.
- karaoke_gen/karaoke_finalise/karaoke_finalise.py +20 -9
- {karaoke_gen-0.61.0.dist-info → karaoke_gen-0.61.1.dist-info}/METADATA +1 -1
- {karaoke_gen-0.61.0.dist-info → karaoke_gen-0.61.1.dist-info}/RECORD +6 -6
- {karaoke_gen-0.61.0.dist-info → karaoke_gen-0.61.1.dist-info}/LICENSE +0 -0
- {karaoke_gen-0.61.0.dist-info → karaoke_gen-0.61.1.dist-info}/WHEEL +0 -0
- {karaoke_gen-0.61.0.dist-info → karaoke_gen-0.61.1.dist-info}/entry_points.txt +0 -0
|
@@ -412,26 +412,33 @@ class KaraokeFinalise:
|
|
|
412
412
|
if "items" in response and len(response["items"]) > 0:
|
|
413
413
|
for item in response["items"]:
|
|
414
414
|
found_title = item["snippet"]["title"]
|
|
415
|
-
|
|
416
|
-
|
|
415
|
+
|
|
416
|
+
# In server-side mode, require an exact match to avoid false positives.
|
|
417
|
+
# Otherwise, use fuzzy matching for interactive CLI usage.
|
|
418
|
+
if self.server_side_mode:
|
|
419
|
+
is_match = youtube_title.lower() == found_title.lower()
|
|
420
|
+
similarity_score = 100 if is_match else 0
|
|
421
|
+
else:
|
|
422
|
+
similarity_score = fuzz.ratio(youtube_title.lower(), found_title.lower())
|
|
423
|
+
is_match = similarity_score >= 70
|
|
424
|
+
|
|
425
|
+
if is_match:
|
|
417
426
|
found_id = item["id"]["videoId"]
|
|
418
427
|
self.logger.info(
|
|
419
428
|
f"Potential match found on YouTube channel with ID: {found_id} and title: {found_title} (similarity: {similarity_score}%)"
|
|
420
429
|
)
|
|
421
|
-
|
|
422
|
-
# In non-interactive mode,
|
|
430
|
+
|
|
431
|
+
# In non-interactive mode (server mode), we don't prompt. Just record the match and return.
|
|
423
432
|
if self.non_interactive:
|
|
424
|
-
self.logger.info(f"Non-interactive mode,
|
|
433
|
+
self.logger.info(f"Non-interactive mode, found a match.")
|
|
425
434
|
self.youtube_video_id = found_id
|
|
426
435
|
self.youtube_url = f"{self.youtube_url_prefix}{self.youtube_video_id}"
|
|
427
|
-
self.skip_notifications = True
|
|
428
436
|
return True
|
|
429
|
-
|
|
437
|
+
|
|
430
438
|
confirmation = input(f"Is '{found_title}' the video you are finalising? (y/n): ").strip().lower()
|
|
431
439
|
if confirmation == "y":
|
|
432
440
|
self.youtube_video_id = found_id
|
|
433
441
|
self.youtube_url = f"{self.youtube_url_prefix}{self.youtube_video_id}"
|
|
434
|
-
self.skip_notifications = True
|
|
435
442
|
return True
|
|
436
443
|
|
|
437
444
|
self.logger.info(f"No matching video found with title: {youtube_title}")
|
|
@@ -483,8 +490,12 @@ class KaraokeFinalise:
|
|
|
483
490
|
max_length = 95
|
|
484
491
|
youtube_title = self.truncate_to_nearest_word(youtube_title, max_length)
|
|
485
492
|
|
|
493
|
+
# In server-side mode, we should always replace videos if an exact match is found.
|
|
494
|
+
# Otherwise, respect the replace_existing flag from CLI.
|
|
495
|
+
should_replace = True if self.server_side_mode else replace_existing
|
|
496
|
+
|
|
486
497
|
if self.check_if_video_title_exists_on_youtube_channel(youtube_title):
|
|
487
|
-
if
|
|
498
|
+
if should_replace:
|
|
488
499
|
self.logger.info(f"Video already exists on YouTube, deleting before re-upload: {self.youtube_url}")
|
|
489
500
|
if self.delete_youtube_video(self.youtube_video_id):
|
|
490
501
|
self.logger.info(f"Successfully deleted existing video, proceeding with upload")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: karaoke-gen
|
|
3
|
-
Version: 0.61.
|
|
3
|
+
Version: 0.61.1
|
|
4
4
|
Summary: Generate karaoke videos with synchronized lyrics. Handles the entire process from downloading audio and lyrics to creating the final video with title screens.
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: Andrew Beveridge
|
|
@@ -3,7 +3,7 @@ karaoke_gen/audio_processor.py,sha256=XMQcEUgLCcMbh4R3onZF4nPezWRFx4JYRk-k3RTUNP
|
|
|
3
3
|
karaoke_gen/config.py,sha256=I3h-940ZXvbrCNq_xcWHPMIB76cl-VNQYcK7-qgB-YI,6833
|
|
4
4
|
karaoke_gen/file_handler.py,sha256=c86-rGF7Fusl0uEIZFnreT7PJfK7lmUaEgauU8BBzjY,10024
|
|
5
5
|
karaoke_gen/karaoke_finalise/__init__.py,sha256=HqZ7TIhgt_tYZ-nb_NNCaejWAcF_aK-7wJY5TaW_keM,46
|
|
6
|
-
karaoke_gen/karaoke_finalise/karaoke_finalise.py,sha256=
|
|
6
|
+
karaoke_gen/karaoke_finalise/karaoke_finalise.py,sha256=WaC-zRIsfi5IeecJVNitMn4eDZ3Kzbfd7rGf2wULZgA,85344
|
|
7
7
|
karaoke_gen/karaoke_gen.py,sha256=o2EaFgnDlP3GaKMjLzABNfq--Ey6z_pS6fg5FBB76Ts,38182
|
|
8
8
|
karaoke_gen/lyrics_processor.py,sha256=eUyu0d1OZyWwmpyNCBTKrV1grNzbZ91pFIXnz7le04k,14203
|
|
9
9
|
karaoke_gen/metadata.py,sha256=TprFzWj-iJ7ghrXlHFMPzzqzuHzWeNvs3zGaND-z9Ds,6503
|
|
@@ -16,8 +16,8 @@ karaoke_gen/utils/__init__.py,sha256=FpOHyeBRB06f3zMoLBUJHTDZACrabg-DoyBTxNKYyNY
|
|
|
16
16
|
karaoke_gen/utils/bulk_cli.py,sha256=uqAHnlidY-f_RhsQIHqZDnrznWRKhqpEDX2uiR1CUQs,18841
|
|
17
17
|
karaoke_gen/utils/gen_cli.py,sha256=sAZ-sau_3dI2hNBOZfiZqJjRf_cJFtuvZLy1V6URcxM,35688
|
|
18
18
|
karaoke_gen/video_generator.py,sha256=B7BQBrjkyvk3L3sctnPXnvr1rzkw0NYx5UCAl0ZiVx0,18464
|
|
19
|
-
karaoke_gen-0.61.
|
|
20
|
-
karaoke_gen-0.61.
|
|
21
|
-
karaoke_gen-0.61.
|
|
22
|
-
karaoke_gen-0.61.
|
|
23
|
-
karaoke_gen-0.61.
|
|
19
|
+
karaoke_gen-0.61.1.dist-info/LICENSE,sha256=81R_4XwMZDODHD7JcZeUR8IiCU8AD7Ajl6bmwR9tYDk,1074
|
|
20
|
+
karaoke_gen-0.61.1.dist-info/METADATA,sha256=mdUpbK_JMLYA_62rf5bgz_43fqmKdGppmIqUpw0Reso,7345
|
|
21
|
+
karaoke_gen-0.61.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
22
|
+
karaoke_gen-0.61.1.dist-info/entry_points.txt,sha256=IZY3O8i7m-qkmPuqgpAcxiS2fotNc6hC-CDWvNmoUEY,107
|
|
23
|
+
karaoke_gen-0.61.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|