-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from jeanslack/fix_minor_bugs
fix minor bugs
- Loading branch information
Showing
6 changed files
with
50 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
videomass (3.5.6-1) UNRELEASED; urgency=medium | ||
|
||
* Fixed downloader log names. | ||
* Improved log management (the log folder is created at program startup | ||
* Improved log management (the log folder is created at program startup | ||
instead of ondemand). | ||
* Fixed ffmpeg `invalid argument` when converting with double pass. | ||
* Fixed the ffmpeg audio output mapping string error on | ||
`AV-Conversion.on_audioOUTstream` method, which raises | ||
* Fixed ffmpeg `invalid argument` when converting using double pass. | ||
* Fixed the ffmpeg audio output mapping string error on | ||
`AV-Conversion.on_audioOUTstream` method, which raises | ||
`Invalid stream specifier: a1` type error. | ||
* Fixed the 'xdg-open' command execution which blocks the Videomass GUI | ||
on Linux. | ||
|
||
-- Gianluca Pernigotto <[email protected]> Mon, 21 Feb 2022 13:38:00 +0200 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,32 +38,32 @@ def info(parent, videomass_icon): | |
""" | ||
# ------------------ | ||
cr = current_release() | ||
Name = cr[0] | ||
name = cr[1] | ||
Version = cr[2] | ||
name_upper = cr[0] | ||
name_lower = cr[1] | ||
version = cr[2] | ||
Release = cr[3] | ||
Copyright = cr[4] | ||
Website = cr[5] | ||
Author = cr[6] | ||
Mail = cr[7] | ||
Comment = cr[8] | ||
copyright = cr[4] | ||
website = cr[5] | ||
author = cr[6] | ||
mail = cr[7] | ||
comment = cr[8] | ||
# ----------------- | ||
dr = descriptions_release() | ||
Short_Dscrp = dr[0] | ||
Long_Dscrp = dr[1] | ||
Short_Lic = dr[2] | ||
Long_Lic = dr[3] | ||
long_lic = dr[3] | ||
# ------------------ | ||
info = wx.adv.AboutDialogInfo() | ||
info.SetIcon(wx.Icon(videomass_icon, type=wx.BITMAP_TYPE_PNG)) | ||
info.SetName("%s" % Name) | ||
info.SetVersion("v%s" % Version) | ||
info.SetName(f"{name_upper}") | ||
info.SetVersion(f"v{version}") | ||
info.SetDescription(_("Cross-platform graphical interface " | ||
"for FFmpeg and youtube-dl.\n")) | ||
info.SetCopyright("Copyright %s %s %s" % (Copyright, Author[0], Author[1])) | ||
info.SetWebSite(Website) | ||
info.SetLicence(Long_Lic) | ||
info.AddDeveloper("%s <%s>" % (Author[0], Mail)) | ||
info.SetCopyright(f"Copyright {copyright} {author[0]} {author[1]}") | ||
info.SetWebSite(website) | ||
info.SetLicence(long_lic) | ||
info.AddDeveloper(f"{author[0]} <{mail}>") | ||
info.AddDocWriter("Gianluca Pernigotto <[email protected]>") | ||
info.AddTranslator("Gianluca Pernigotto <[email protected]> (it_IT)") | ||
info.AddTranslator("ChourS <[email protected]> (ru_RU)") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,9 +4,9 @@ | |
Porpose: open file browser on given pathname | ||
Compatibility: Python3 (Unix, Windows) | ||
Author: Gianluca Pernigotto <[email protected]> | ||
Copyright: (c) 2018/2021 Gianluca Pernigotto <[email protected]> | ||
Copyright: (c) 2018/2022 Gianluca Pernigotto <[email protected]> | ||
license: GPL3 | ||
Rev: May.11.2021 | ||
Rev: Feb.22.2022 | ||
Code checker: | ||
flake8: --ignore F821, W504 | ||
pylint: --ignore E0602, E1101 | ||
|
@@ -30,63 +30,35 @@ | |
import os | ||
|
||
|
||
def browse(opsyst, pathname): | ||
def browse(ostype, pathname): | ||
""" | ||
open file browser in a specific location (OS independent) | ||
open file in a specific location (OS independent) | ||
""" | ||
status = 'Unrecognized error' | ||
|
||
if opsyst == 'Windows': | ||
if ostype == 'Windows': | ||
try: | ||
os.startfile(os.path.realpath(pathname)) | ||
|
||
except FileNotFoundError as pathnotfound: | ||
return '%s' % pathnotfound | ||
return f'{pathnotfound}' | ||
|
||
except Exception as anyerr: | ||
return '%s' % anyerr | ||
return f'{anyerr}' | ||
|
||
return None | ||
|
||
if opsyst == 'Darwin': | ||
if ostype == 'Darwin': | ||
cmd = ['open', pathname] | ||
|
||
else: # xdg-open *should* be supported by recent Gnome, KDE, Xfce | ||
cmd = ['xdg-open', pathname] | ||
|
||
try: | ||
with subprocess.Popen(cmd, | ||
stdout=subprocess.PIPE, | ||
stderr=subprocess.STDOUT, | ||
universal_newlines=True, # mod text | ||
) as proc: | ||
|
||
out = proc.communicate() | ||
|
||
if proc.returncode: # if returncode == 1 | ||
status = out[0] | ||
else: | ||
status = None | ||
|
||
except (OSError, FileNotFoundError) as oserr: # exec. do not exist | ||
status = '%s' % oserr | ||
|
||
return status | ||
proc = subprocess.run(cmd, check=True, shell=False) | ||
except FileNotFoundError as err: | ||
return err | ||
|
||
""" | ||
NOTE The following code work, but on MS-Windows it show a short of | ||
Dos-window | ||
----------------- | ||
if proc.returncode: | ||
return "EXIT: {proc.returncode}\nERROR: {proc.stderr}" | ||
|
||
try: | ||
p = subprocess.run(cmd) | ||
if p.stderr: | ||
return(p.stderr.decode()) | ||
''' | ||
if not *capture_output=True* on subprocess instance | ||
use .decode() here. | ||
''' | ||
except FileNotFoundError as err: | ||
return('%s' % (err)) | ||
""" | ||
return None |