Skip to content

Commit

Permalink
Possible fix for failed thumbnail embedding, #626
Browse files Browse the repository at this point in the history
  • Loading branch information
A S Lewis committed Oct 21, 2024
1 parent 118eb44 commit ff76b75
Show file tree
Hide file tree
Showing 12 changed files with 224 additions and 145 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Problems can be reported at `our GitHub page <https://github.com/axcore/tartube/

Stable release: **v2.5.040 (31 Aug 2024)**

Development release: **v2.5.040 (31 Aug 2024)**
Development release: **v2.5.047 (21 Oct 2024)**

Official packages (also available from the `Github release page <https://github.com/axcore/tartube/releases>`__):

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.040
2.5.047
6 changes: 3 additions & 3 deletions nsis/tartube_install_64bit.nsi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Tartube v2.5.040 installer script for MS Windows
# Tartube v2.5.047 installer script for MS Windows
#
# Copyright (C) 2019-2024 A S Lewis
#
Expand Down Expand Up @@ -294,7 +294,7 @@

;Name and file
Name "Tartube"
OutFile "install-tartube-2.5.040-64bit.exe"
OutFile "install-tartube-2.5.047-64bit.exe"

;Default installation folder
InstallDir "$LOCALAPPDATA\Tartube"
Expand Down Expand Up @@ -397,7 +397,7 @@ Section "Tartube" SecClient
# "Publisher" "A S Lewis"
# WriteRegStr HKLM \
# "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tartube" \
# "DisplayVersion" "2.5.040"
# "DisplayVersion" "2.5.047"

# Create uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"
Expand Down
4 changes: 2 additions & 2 deletions pack/bin/no_download/tartube
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ import mainapp

# 'Global' variables
__packagename__ = 'tartube'
__version__ = '2.5.040'
__date__ = '31 Aug 2024'
__version__ = '2.5.047'
__date__ = '21 Oct 2024'
__copyright__ = 'Copyright \xa9 2019-2024 A S Lewis'
__license__ = """
Copyright \xa9 2019-2024 A S Lewis.
Expand Down
4 changes: 2 additions & 2 deletions pack/bin/pkg/tartube
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ import mainapp

# 'Global' variables
__packagename__ = 'tartube'
__version__ = '2.5.040'
__date__ = '31 Aug 2024'
__version__ = '2.5.047'
__date__ = '21 Oct 2024'
__copyright__ = 'Copyright \xa9 2019-2024 A S Lewis'
__license__ = """
Copyright \xa9 2019-2024 A S Lewis.
Expand Down
4 changes: 2 additions & 2 deletions pack/bin/strict/tartube
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ import mainapp

# 'Global' variables
__packagename__ = 'tartube'
__version__ = '2.5.040'
__date__ = '31 Aug 2024'
__version__ = '2.5.047'
__date__ = '21 Oct 2024'
__copyright__ = 'Copyright \xa9 2019-2024 A S Lewis'
__license__ = """
Copyright \xa9 2019-2024 A S Lewis.
Expand Down
2 changes: 1 addition & 1 deletion pack/tartube.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH man 1 "31 Aug 2024" "2.5.040" "tartube man page"
.TH man 1 "21 Oct 2024" "2.5.047" "tartube man page"
.SH NAME
tartube \- GUI front-end for youtube-dl and yt-dlp
.SH SYNOPSIS
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
# Setup
setuptools.setup(
name = 'tartube',
version = '2.5.040',
version = '2.5.047',
description = 'GUI front-end for youtube-dl and yt-dlp',
long_description = long_description,
long_description_content_type = 'text/plain',
Expand Down
4 changes: 1 addition & 3 deletions tartube/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -27247,8 +27247,6 @@ def setup_options_dl_list_tab(self, inner_notebook):
)
label.set_hexpand(True)

# !!! DEBUG: Clicking the button creates a positional argument error
# !!! for no obvious reason
button8 = Gtk.Button()
grid2.attach(button8, 6, 0, 1, 1)
button8.set_label(_('Refresh list'))
Expand All @@ -27258,7 +27256,7 @@ def setup_options_dl_list_tab(self, inner_notebook):
)


def setup_options_dl_list_tab_update_treeview(self):
def setup_options_dl_list_tab_update_treeview(self, button=None):

"""Can be called by anything.

Expand Down
10 changes: 7 additions & 3 deletions tartube/ffmpeg_tartube.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def __init__(self, app_obj):
# Public class methods


def convert_webp(self, thumbnail_filename):
def convert_webp(self, thumbnail_filename, retain_flag=False):

"""Called by mainapp.TartubeApp.update_video_when_file_found(),
downloads.VideoDownloader.confirm_sim_video() and
Expand All @@ -96,6 +96,12 @@ def convert_webp(self, thumbnail_filename):
thumbnail_filename (str): Full path to the webp file to be
converted to jpg
Optional args:
retain_flag (bool): True if the original 'thumbnail_filename' file
should be retained after the conversion, regardless of the
value of mainapp.TartubeApp settings
Return values:
False if an attempted conversion fails, or True otherwise
Expand All @@ -112,8 +118,6 @@ def convert_webp(self, thumbnail_filename):
if self.app_obj.ffmpeg_convert_webp_flag \
and self.app_obj.ffmpeg_retain_webp_flag:
retain_flag = True
else:
retain_flag = False

# Correct extension for .webp files with the wrong extension
# (youtube-dl #25687, #25717)
Expand Down
Loading

0 comments on commit ff76b75

Please sign in to comment.