From 04d598a525a4826954a4c22c41491d5ab220aec8 Mon Sep 17 00:00:00 2001 From: k4yt3x Date: Fri, 15 May 2020 21:28:22 -0400 Subject: [PATCH] CLI and GUI now displays upscaler version --- src/upscaler.py | 5 ++++- src/video2x.py | 12 +++++++----- src/video2x_gui.py | 10 ++++++---- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/upscaler.py b/src/upscaler.py index b645611..b967fd5 100755 --- a/src/upscaler.py +++ b/src/upscaler.py @@ -4,7 +4,7 @@ Name: Video2X Upscaler Author: K4YT3X Date Created: December 10, 2018 -Last Modified: May 12, 2020 +Last Modified: May 15, 2020 Description: This file contains the Upscaler class. Each instance of the Upscaler class is an upscaler on an image or @@ -48,6 +48,9 @@ language = gettext.translation(DOMAIN, LOCALE_DIRECTORY, [default_locale], fallb language.install() _ = language.gettext +# version information +UPSCALER_VERSION = '4.0.0' + # these names are consistent for # - driver selection in command line # - driver wrapper file names diff --git a/src/video2x.py b/src/video2x.py index f1457c8..c96943b 100755 --- a/src/video2x.py +++ b/src/video2x.py @@ -13,7 +13,7 @@ __ __ _ _ ___ __ __ Name: Video2X Controller Creator: K4YT3X Date Created: Feb 24, 2018 -Last Modified: May 11, 2020 +Last Modified: May 15, 2020 Editor: BrianPetkovsek Last Modified: June 17, 2019 @@ -50,6 +50,7 @@ smooth and edges sharp. # local imports from upscaler import AVAILABLE_DRIVERS +from upscaler import UPSCALER_VERSION from upscaler import Upscaler # built-in imports @@ -79,13 +80,14 @@ language.install() _ = language.gettext -VERSION = '4.0.0' +CLI_VERSION = '4.0.0' -LEGAL_INFO = _('''Video2X Version: {} +LEGAL_INFO = _('''Video2X CLI Version: {} +Upscaler Version: {} Author: K4YT3X License: GNU GPL v3 Github Page: https://github.com/k4yt3x/video2x -Contact: k4yt3x@k4yt3x.com''').format(VERSION) +Contact: k4yt3x@k4yt3x.com''').format(CLI_VERSION, UPSCALER_VERSION) LOGO = r''' __ __ _ _ ___ __ __ @@ -135,7 +137,7 @@ def print_logo(): """print video2x logo""" print(LOGO) print(f'\n{"Video2X Video Enlarger".rjust(40, " ")}') - print(f'\n{Avalon.FM.BD}{f"Version {VERSION}".rjust(36, " ")}{Avalon.FM.RST}\n') + print(f'\n{Avalon.FM.BD}{f"Version {CLI_VERSION}".rjust(36, " ")}{Avalon.FM.RST}\n') def read_config(config_file: pathlib.Path) -> dict: diff --git a/src/video2x_gui.py b/src/video2x_gui.py index 520a623..05c9bde 100755 --- a/src/video2x_gui.py +++ b/src/video2x_gui.py @@ -4,10 +4,11 @@ Creator: Video2X GUI Author: K4YT3X Date Created: May 5, 2020 -Last Modified: May 14, 2020 +Last Modified: May 15, 2020 """ # local imports +from upscaler import UPSCALER_VERSION from upscaler import Upscaler from wrappers.ffmpeg import Ffmpeg @@ -30,9 +31,10 @@ from PyQt5.QtWidgets import * import magic # QObject, pyqtSlot, pyqtSignal, QRunnable, QThreadPool, QAbstractTableModel, Qt -VERSION = '2.1.0' +GUI_VERSION = '2.1.0' -LEGAL_INFO = f'''Video2X GUI Version: {VERSION}\\ +LEGAL_INFO = f'''Video2X GUI Version: {GUI_VERSION}\\ +Upscaler Version: {UPSCALER_VERSION}\\ Author: K4YT3X\\ License: GNU GPL v3\\ Github Page: [https://github.com/k4yt3x/video2x](https://github.com/k4yt3x/video2x)\\ @@ -180,7 +182,7 @@ class Video2XMainWindow(QMainWindow): # set window title and icon self.video2x_icon_path = str(resource_path('images/video2x.png')) - self.setWindowTitle(f'Video2X GUI {VERSION}') + self.setWindowTitle(f'Video2X GUI {GUI_VERSION}') self.setWindowIcon(QtGui.QIcon(self.video2x_icon_path)) # menu bar