Skip to content

Commit

Permalink
Fix Python 3.12 syntax errors; add pipx compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
A S Lewis committed Aug 6, 2024
1 parent d5d8a05 commit 3f13061
Show file tree
Hide file tree
Showing 27 changed files with 149 additions and 89 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.0 (3 Jan 2024)**

Development release: **v2.5.024 (22 Jul 2024)**
Development release: **v2.5.028 (6 Aug 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.024
2.5.028
2 changes: 1 addition & 1 deletion locale/de/LC_MESSAGES/base.po
Original file line number Diff line number Diff line change
Expand Up @@ -11513,7 +11513,7 @@ msgid "unavailable"
msgstr "nicht verfügbar"

#: .././media.py:680 .././media.py:2283
msgid "Errors\\Warnings"
msgid "Errors/Warnings"
msgstr "Fehler/Warnungen"

#: .././media.py:2217
Expand Down
2 changes: 1 addition & 1 deletion locale/en_US/LC_MESSAGES/base.po
Original file line number Diff line number Diff line change
Expand Up @@ -11101,7 +11101,7 @@ msgid "unavailable"
msgstr ""

#: .././media.py:680 .././media.py:2283
msgid "Errors\\Warnings"
msgid "Errors/Warnings"
msgstr ""

#: .././media.py:2217
Expand Down
2 changes: 1 addition & 1 deletion locale/es/LC_MESSAGES/base.po
Original file line number Diff line number Diff line change
Expand Up @@ -11190,7 +11190,7 @@ msgid "unavailable"
msgstr ""

#: .././media.py:680 .././media.py:2283
msgid "Errors\\Warnings"
msgid "Errors/Warnings"
msgstr ""

#: .././media.py:2217
Expand Down
2 changes: 1 addition & 1 deletion locale/fr/LC_MESSAGES/base.po
Original file line number Diff line number Diff line change
Expand Up @@ -11720,7 +11720,7 @@ msgid "unavailable"
msgstr "non disponible"

#: .././media.py:680 .././media.py:2283
msgid "Errors\\Warnings"
msgid "Errors/Warnings"
msgstr "Erreurs / Avertissements"

#: .././media.py:2217
Expand Down
4 changes: 2 additions & 2 deletions locale/ko_KR/LC_MESSAGES/base.po
Original file line number Diff line number Diff line change
Expand Up @@ -11183,8 +11183,8 @@ msgid "unavailable"
msgstr ""

#: .././media.py:680 .././media.py:2283
msgid "Errors\\Warnings"
msgstr "오류\\경고"
msgid "Errors/Warnings"
msgstr "오류/경고"

#: .././media.py:2217
msgid ""
Expand Down
2 changes: 1 addition & 1 deletion locale/nl_NL/LC_MESSAGES/base.po
Original file line number Diff line number Diff line change
Expand Up @@ -11299,7 +11299,7 @@ msgid "unavailable"
msgstr ""

#: .././media.py:680 .././media.py:2283
msgid "Errors\\Warnings"
msgid "Errors/Warnings"
msgstr "Fouten/Waarschuwingen"

#: .././media.py:2217
Expand Down
2 changes: 1 addition & 1 deletion locale/ru/LC_MESSAGES/base.po
Original file line number Diff line number Diff line change
Expand Up @@ -11413,7 +11413,7 @@ msgid "unavailable"
msgstr ""

#: .././media.py:680 .././media.py:2283
msgid "Errors\\Warnings"
msgid "Errors/Warnings"
msgstr ""

#: .././media.py:2217
Expand Down
2 changes: 1 addition & 1 deletion locale/tr/LC_MESSAGES/base.po
Original file line number Diff line number Diff line change
Expand Up @@ -11150,7 +11150,7 @@ msgid "unavailable"
msgstr ""

#: .././media.py:680 .././media.py:2283
msgid "Errors\\Warnings"
msgid "Errors/Warnings"
msgstr ""

#: .././media.py:2217
Expand Down
2 changes: 1 addition & 1 deletion locale/vi/LC_MESSAGES/base.po
Original file line number Diff line number Diff line change
Expand Up @@ -11167,7 +11167,7 @@ msgid "unavailable"
msgstr ""

#: .././media.py:680 .././media.py:2283
msgid "Errors\\Warnings"
msgid "Errors/Warnings"
msgstr ""

#: .././media.py:2217
Expand Down
4 changes: 2 additions & 2 deletions locale/zh_CN/LC_MESSAGES/base.po
Original file line number Diff line number Diff line change
Expand Up @@ -11136,8 +11136,8 @@ msgid "unavailable"
msgstr "不可用"

#: .././media.py:680 .././media.py:2283
msgid "Errors\\Warnings"
msgstr "错误\\警告"
msgid "Errors/Warnings"
msgstr "错误/警告"

#: .././media.py:2217
msgid ""
Expand Down
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.024 installer script for MS Windows
# Tartube v2.5.028 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.024-64bit.exe"
OutFile "install-tartube-2.5.028-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.024"
# "DisplayVersion" "2.5.028"

# 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.024'
__date__ = '22 Jul 2024'
__version__ = '2.5.028'
__date__ = '6 Aug 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.024'
__date__ = '22 Jul 2024'
__version__ = '2.5.028'
__date__ = '6 Aug 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.024'
__date__ = '22 Jul 2024'
__version__ = '2.5.028'
__date__ = '6 Aug 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 "22 Jul 2024" "2.5.024" "tartube man page"
.TH man 1 "8 Aug 2024" "2.5.027" "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.024',
version = '2.5.028',
description = 'GUI front-end for youtube-dl and yt-dlp',
long_description = long_description,
long_description_content_type = 'text/plain',
Expand Down
12 changes: 6 additions & 6 deletions tartube/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -31654,7 +31654,7 @@ def on_filter_options_button_toggled(self, checkbutton):
"""Called from callback in self.setup_downloader_forks_tab().

Sets the flag to filter out yt-dlp options, when using a fork.

Args:

checkbutton (Gtk.Checkbutton): The widget clicked
Expand Down Expand Up @@ -32563,7 +32563,7 @@ def on_move_container_button_toggled(self, checkbutton):

Enables/disables prompting the user before moving channels/playlists/
folders in the Video Index.

Args:

checkbutton (Gtk.CheckButton): The widget clicked
Expand All @@ -32584,7 +32584,7 @@ def on_move_select_button_toggled(self, checkbutton):

Enables/disables selecting a channel/playlist/folder, after media has
been moved into it.

Args:

checkbutton (Gtk.CheckButton): The widget clicked
Expand All @@ -32598,14 +32598,14 @@ def on_move_select_button_toggled(self, checkbutton):
and self.app_obj.dialogue_move_select_flag:
self.app_obj.set_dialogue_move_select_flag(False)


def on_move_video_button_toggled(self, checkbutton):

"""Called from a callback in self.setup_windows_dialogues_tab().

Enables/disables prompting the user before moving videos in the Video
Index.

Args:

checkbutton (Gtk.CheckButton): The widget clicked
Expand All @@ -32619,7 +32619,7 @@ def on_move_video_button_toggled(self, checkbutton):
and self.app_obj.dialogue_move_video_flag:
self.app_obj.set_dialogue_move_video_flag(False)


def on_moviepy_button_toggled(self, checkbutton):

"""Called from callback in self.setup_general_modules_tab().
Expand Down
4 changes: 2 additions & 2 deletions tartube/downloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -5366,7 +5366,7 @@ def extract_stdout_data(self, stdout):
self.confirm_archived_video(match.group(1))
self.download_manager_obj.register_video('other')
return dl_stat_dict

# Likewise for the frame messages from youtube-dl direct downloads
match = re.search(
r'^frame.*size\=\s*([\S]+).*bitrate\=\s*([\S]+)',
Expand Down Expand Up @@ -6418,7 +6418,7 @@ def read_child_process(self):
# For Tartube's MS Windows portable version, when the whole
# installation folder is moved to a new location in the
# filesystem, youtube-dl must be uninstalled, then reinstalled
if re.search('Fatal error in launcher\: U', data) \
if re.search('Fatal error in launcher: U', data) \
and app_obj.ytdl_output_stderr_flag:

app_obj.main_win_obj.output_tab_write_stderr(
Expand Down
38 changes: 22 additions & 16 deletions tartube/formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,27 +308,27 @@
'pretty_name': 'YouTube',
# Regexes to recognise the website (no groups used)
'detect_list': [
'^https?:\/\/(www\.)?youtube\.com\/',
r'^https?://(www\.)?youtube\.com/',
],
# Regexes to extract a video ID/name. The second group is used (so that
# the optional www can be the first group)
'extract_vid_list': [
'^https?:\/\/(www\.)?youtube\.com\/watch\?v=([^\/]+)',
r'^https?://(www\.)?youtube\.com/watch\?v=([^/]+)',
],
'extract_vname_list': [],
# Regexes to extract a channel/playlist ID/name. The second group is
# used
'extract_cid_list': [
'^https?:\/\/(www\.)?youtube\.com\/channel\/([^\/]+)',
r'^https?://(www\.)?youtube\.com/channel/([^/]+)',
],
'extract_cname_list': [
'^https?:\/\/(www\.)?youtube\.com\/user\/([^\/]+)\/videos\/?',
'^https?:\/\/(www\.)?youtube\.com\/c\/([^\/]+)\/videos\/?',
r'^https?://(www\.)?youtube\.com/user/([^/]+)/videos/?',
r'^https?://(www\.)?youtube\.com/c/([^/]+)/videos/?',
],
# Regexes to extract a playlist ID/name. The second group is used
'extract_pid_list': [
'^https?:\/\/(www\.)?youtube\.com\/channel\?list=([^\/]+)',
'^https?:\/\/(www\.)?youtube\.com\/playlist\?list=([^\/]+)',
r'^https?://(www\.)?youtube\.com/channel\?list=([^/]+)',
r'^https?://(www\.)?youtube\.com/playlist\?list=([^/]+)',
],
'extract_pname_list': [],
# Templates to convert video ID/name to URL
Expand Down Expand Up @@ -359,15 +359,15 @@
'name': 'odysee',
'pretty_name': 'Odysee',
'detect_list': [
'^https?:\/\/(www\.)?odysee\.com\/',
r'^https?://(www\.)?odysee\.com/',
],
'extract_vid_list': [],
'extract_vname_list': [
'^https?:\/\/(www\.)?odysee\.com\/\@[^\/]+\/([^\:]+)\:',
r'^https?://(www\.)?odysee\.com/\@[^/]+/([^\:]+)\:',
],
'extract_cid_list': [],
'extract_cname_list': [
'^https?:\/\/(www\.)?odysee\.com\/\@([^\:]+)\:',
r'^https?://(www\.)?odysee\.com/\@([^\:]+)\:',
],
'extract_pid_list': [],
'extract_pname_list': [],
Expand All @@ -383,14 +383,14 @@
'name': 'bitchute',
'pretty_name': 'BitChute',
'detect_list': [
'^https?:\/\/(www\.)?bitchute\.com\/',
r'^https?://(www\.)?bitchute\.com/',
],
'extract_vid_list': [
'^https?:\/\/(www\.)?bitchute\.com\/video\/([^\/]+)',
r'^https?://(www\.)?bitchute\.com/video/([^/]+)',
],
'extract_vname_list': [],
'extract_cid_list': [
'^https?:\/\/(www\.)?bitchute\.com\/channel\/([^\/]+)',
r'^https?://(www\.)?bitchute\.com/channel/([^/]+)',
],
'extract_cname_list': [],
'extract_pid_list': [],
Expand All @@ -411,15 +411,15 @@
'name': 'twitch',
'pretty_name': 'Twitch',
'detect_list': [
'^https?:\/\/(www\.)?twitch\.tv\/',
r'^https?://(www\.)?twitch\.tv/',
],
'extract_vid_list': [
'^https?:\/\/(www\.)?twitch\.tv\/videos\/([^\/]+)',
r'^https?://(www\.)?twitch\.tv/videos/([^/]+)',
],
'extract_vname_list': [],
'extract_cid_list': [],
'extract_cname_list': [
'^https?:\/\/(www\.)?twitch\.tv\/([^\/]+)',
r'^https?://(www\.)?twitch\.tv/([^/]+)',
],
'extract_pid_list': [],
'extract_pname_list': [],
Expand Down Expand Up @@ -1174,6 +1174,12 @@ def do_translate(config_flag=False):
_('Update using pip3 (omit --user option)'),
'ytdl_update_pip3_recommend':
_('Update using pip3 (recommended)'),
'ytdl_update_pipx':
_('Update using pipx'),
'ytdl_update_pipx_no_dependencies':
_('Update using pipx (use --no-dependencies option)'),
'ytdl_update_pipx_omit_user':
_('Update using pipx (omit --user option)'),
'ytdl_update_pypi_path':
_('Update using PyPI youtube-dl path'),
'ytdl_update_win_32':
Expand Down
Loading

0 comments on commit 3f13061

Please sign in to comment.