Update to v2.3.085
This commit is contained in:
parent
23587f264f
commit
5c322d557e
12
.github/ISSUE_TEMPLATE/ask_question.md
vendored
12
.github/ISSUE_TEMPLATE/ask_question.md
vendored
@ -1,12 +0,0 @@
|
|||||||
---
|
|
||||||
name: Ask Question 💡
|
|
||||||
about: Ask a Tartube related question
|
|
||||||
labels: question
|
|
||||||
---
|
|
||||||
Thanks for taking the time to ask a question!
|
|
||||||
|
|
||||||
### Please read the README
|
|
||||||
Perhaps your question is answered there
|
|
||||||
|
|
||||||
### The authors are not experts in python, security, youtube-dl, FFmpeg, Debian/RPM packaging or Windows programming
|
|
||||||
You are welcome to ask a Tartube-related question, but you might get a better answer in forums where those kinds of expert can be found
|
|
31
.github/ISSUE_TEMPLATE/bug_report.md
vendored
31
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -1,31 +0,0 @@
|
|||||||
---
|
|
||||||
name: Bug report 🐞
|
|
||||||
about: Create a report to help us improve
|
|
||||||
title: ''
|
|
||||||
labels: bug
|
|
||||||
assignees: ''
|
|
||||||
---
|
|
||||||
Thanks for taking the time to submit a bug report! Please include the following information:
|
|
||||||
|
|
||||||
### What operating system are you using?
|
|
||||||
If using MS Windows, are you using Windows 10, Windows 7, or something else?
|
|
||||||
|
|
||||||
### What version of Tartube are you using?
|
|
||||||
In Tartube's main window, click Help > About
|
|
||||||
|
|
||||||
### What happens when you run Tartube from a terminal window?
|
|
||||||
Many error messages are only visible in the terminal window. On MS Windows, this is how to do it:
|
|
||||||
|
|
||||||
- First, enable hidden folders on your system
|
|
||||||
- Then, run the application:
|
|
||||||
|
|
||||||
C:\Users\YOURNAME\AppData\Local\Tartube\msys64\mingw64.exe
|
|
||||||
|
|
||||||
- In this new window, type these commands to start Tartube:
|
|
||||||
|
|
||||||
cd /home/user/tartube
|
|
||||||
|
|
||||||
python3 tartube/tartube
|
|
||||||
|
|
||||||
###If your bug report is "I can't download this video", please provide a link to the video
|
|
||||||
This will save a lot of time!
|
|
13
.github/ISSUE_TEMPLATE/feature_request.md
vendored
13
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@ -1,13 +0,0 @@
|
|||||||
---
|
|
||||||
name: Feature Request 💡
|
|
||||||
about: Suggest a new idea for the project.
|
|
||||||
labels: enhancement
|
|
||||||
---
|
|
||||||
Thanks for taking the time to submit a feature request!
|
|
||||||
|
|
||||||
### Make sure you are using the most recent version of Tartube
|
|
||||||
Perhaps your feature request has already been implemented. The most recent version can be downloaded from Github
|
|
||||||
|
|
||||||
### Please read the README
|
|
||||||
Perhaps your feature request is already possible
|
|
||||||
|
|
11
.gitignore
vendored
11
.gitignore
vendored
@ -1,11 +0,0 @@
|
|||||||
# This file copied from
|
|
||||||
# https://python-packaging.readthedocs.io/en/latest/minimal.html?highlight=gitignore
|
|
||||||
|
|
||||||
# Compiled python modules.
|
|
||||||
*.pyc
|
|
||||||
|
|
||||||
# Setuptools distribution folder.
|
|
||||||
/dist/
|
|
||||||
|
|
||||||
# Python egg metadata, regenerated from source files by setuptools.
|
|
||||||
/*.egg-info
|
|
3
AUTHORS
3
AUTHORS
@ -4,6 +4,9 @@ A S Lewis <aslewis@cpan.org>
|
|||||||
Authors ordered by first contribution:
|
Authors ordered by first contribution:
|
||||||
(none yet)
|
(none yet)
|
||||||
|
|
||||||
|
Translations:
|
||||||
|
Dutch: Heimen Stoffels <vistausss@outlook.com>
|
||||||
|
|
||||||
Image credits:
|
Image credits:
|
||||||
Vectorgraphit <https://www.iconfinder.com/vectorgraphit>
|
Vectorgraphit <https://www.iconfinder.com/vectorgraphit>
|
||||||
FatCow Web Hosting https://www.fatcow.com/>
|
FatCow Web Hosting https://www.fatcow.com/>
|
||||||
|
72
CHANGES
72
CHANGES
@ -1,3 +1,75 @@
|
|||||||
|
v2.3.085 (13 Jan 2021)
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
MAJOR NEW FEATURES
|
||||||
|
- Added the Dutch translation compiled by Heimen Stoffels (thanks, Heimen!)
|
||||||
|
(Git #244)
|
||||||
|
- Tartube can now display statistics about the channels and playlists in your
|
||||||
|
database, and about the database as a whole. These are visible in the
|
||||||
|
preferences window, and in the channel/playlist properties windows. If
|
||||||
|
matplotlib is installed on your system, Tartube can draw graphs showing
|
||||||
|
your download history. For help with installing matplotlib on MS Windows,
|
||||||
|
see the README (Git #235)
|
||||||
|
- Added a new system folder called 'Recent videos'. It shows all videos
|
||||||
|
checked/downloaded during the most recent download operation. Browsing this
|
||||||
|
folder is perhaps more convenient than using the lists in the Progress and
|
||||||
|
Classic Mode tabs
|
||||||
|
- You can specify a custom path to the youtube-dl(c) executable. This is not
|
||||||
|
recommended in general, but it might be useful for testing purposes
|
||||||
|
(Git #243)
|
||||||
|
|
||||||
|
MINOR NEW FEATURES
|
||||||
|
- Added a menu item to check for new releases of Tartube (click Help > Check
|
||||||
|
for updates). This function downloads simple text files from Tartube's
|
||||||
|
websites, and should not collect any information about you. If you're still
|
||||||
|
worried about privacy, don't use the feature. You can see exactly what is
|
||||||
|
being downloaded in the Output tab (Git #216, 234 and others)
|
||||||
|
- The path to youtube-dl(c)'s cookie jar file can now be customised, for
|
||||||
|
example in Edit > General download options... > Files Cookies. If not
|
||||||
|
customised, Tartube creates a cookie jar file in Tartube's main data folder
|
||||||
|
(directory), as before (Git #240)
|
||||||
|
- Several improvements to the Classic Mode tab. After clicking the 'Add URLs'
|
||||||
|
button, any duplicate URLs (which are not copied from the top half to the
|
||||||
|
bottom half) can optionally be deleted now. Click Edit > System
|
||||||
|
preferences... > Windows > Main window, and select 'In the Classic Mode
|
||||||
|
Tab, when adding URLs, remove duplicates rather than retaining them' (Git
|
||||||
|
#233)
|
||||||
|
- The first error generated when downloading a video/channel/playlist is now
|
||||||
|
visible in the tooltip (in both the Progress and Classic Mode tabs). The
|
||||||
|
behaviour can be disabled: click Edit > System preferences... > Windows
|
||||||
|
> Main Window, and deselect 'Show errors/warnings in tooltips'. This is a
|
||||||
|
compromise for showing the full error message in the tabs, which is
|
||||||
|
not practical due to youtube-dl(c) limitations (Git #233)
|
||||||
|
- In the Classic Mode Tab, after a download has finished, the name of the
|
||||||
|
video file is no longer cleared, in order to assist with identifying
|
||||||
|
failed downloads (Git #233)
|
||||||
|
- In the Videos Tab, all status icons are now visible for all videos, even when
|
||||||
|
thumbnails are not drawn (Git #233)
|
||||||
|
- In the Classic Mode Tab, added a new 'Clear downloaded' button (Git #233)
|
||||||
|
|
||||||
|
MAJOR FIXES
|
||||||
|
- Fixed the 'No translation file found for domain: base' crashes (Git #245,
|
||||||
|
#247)
|
||||||
|
- Apparent fix for crashes while downloading videos from LinkedIn Video. The
|
||||||
|
fix has not been fully tested yet (Git #240)
|
||||||
|
- Fixed the re-download button in the Classic Mode Tab, which was completely
|
||||||
|
broken
|
||||||
|
- Fixed several problems with translations, which only became apparent after
|
||||||
|
someone submitted a translation file
|
||||||
|
|
||||||
|
MINOR FIXES
|
||||||
|
- In the Videos tab, when a video is marked as 'Can't D/L', right-clicking the
|
||||||
|
video to download it caused a crash. Fixed
|
||||||
|
- In the Classic Mode tab, if duplicate URLs are added in the top half, then
|
||||||
|
both are added to the bottom half after clicking the 'Add URLs' button.
|
||||||
|
Fixed (Git #233)
|
||||||
|
- In the Classic Mode tab, the 'Download all' button re-downloaded a video that
|
||||||
|
had already been downloaded. Fixed (Git #233)
|
||||||
|
- It was not possible to mark multiple videos as not livestreams in a single
|
||||||
|
action. Fixed
|
||||||
|
- After switching the system language in the preferences window, Tartube
|
||||||
|
displayed the wrong icon. Fixed
|
||||||
|
|
||||||
v2.3.042 (24 Dec 2020)
|
v2.3.042 (24 Dec 2020)
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
48
README.rst
48
README.rst
@ -59,14 +59,14 @@ For a full list of new features and fixes, see `recent changes <CHANGES>`__.
|
|||||||
3 Downloads
|
3 Downloads
|
||||||
===========
|
===========
|
||||||
|
|
||||||
Latest version: **v2.3.042 (24 Dec 2020)**
|
Latest version: **v2.3.085 (13 Jan 2020)**
|
||||||
|
|
||||||
Official packages (also available from the `Github release page <https://github.com/axcore/tartube/releases>`__):
|
Official packages (also available from the `Github release page <https://github.com/axcore/tartube/releases>`__):
|
||||||
|
|
||||||
- `MS Windows (64-bit) installer <https://sourceforge.net/projects/tartube/files/v2.3.042/install-tartube-2.3.042-64bit.exe/download>`__ and `portable edition <https://sourceforge.net/projects/tartube/files/v2.3.042/tartube-portable-64bit.zip/download>`__ from Sourceforge
|
- `MS Windows (64-bit) installer <https://sourceforge.net/projects/tartube/files/v2.3.085/install-tartube-2.3.085-64bit.exe/download>`__ and `portable edition <https://sourceforge.net/projects/tartube/files/v2.3.085/tartube-portable-64bit.zip/download>`__ from Sourceforge
|
||||||
- `MS Windows (32-bit) installer <https://sourceforge.net/projects/tartube/files/v2.3.042/install-tartube-2.3.042-32bit.exe/download>`__ and `portable edition <https://sourceforge.net/projects/tartube/files/v2.3.042/tartube-portable-32bit.zip/download>`__ from Sourceforge
|
- `MS Windows (32-bit) installer <https://sourceforge.net/projects/tartube/files/v2.3.085/install-tartube-2.3.085-32bit.exe/download>`__ and `portable edition <https://sourceforge.net/projects/tartube/files/v2.3.085/tartube-portable-32bit.zip/download>`__ from Sourceforge
|
||||||
- `DEB package (for Debian-based distros, e.g. Ubuntu, Linux Mint) <https://sourceforge.net/projects/tartube/files/v2.3.042/python3-tartube_2.3.042.deb/download>`__ from Sourceforge
|
- `DEB package (for Debian-based distros, e.g. Ubuntu, Linux Mint) <https://sourceforge.net/projects/tartube/files/v2.3.085/python3-tartube_2.3.085.deb/download>`__ from Sourceforge
|
||||||
- `RPM package (for RHEL-based distros, e.g. Fedora) <https://sourceforge.net/projects/tartube/files/v2.3.042/tartube-2.3.042.rpm/download>`__ from Sourceforge
|
- `RPM package (for RHEL-based distros, e.g. Fedora) <https://sourceforge.net/projects/tartube/files/v2.3.085/tartube-2.3.085.rpm/download>`__ from Sourceforge
|
||||||
|
|
||||||
There are also some DEB/RPM packages marked STRICT. In these packages, updates to **youtube-dl(c)** from within **Tartube** have been disabled. If **Tartube** is uploaded to a repository with lots of rules, such as the official Debian repository, then you should probably use the STRICT packages.
|
There are also some DEB/RPM packages marked STRICT. In these packages, updates to **youtube-dl(c)** from within **Tartube** have been disabled. If **Tartube** is uploaded to a repository with lots of rules, such as the official Debian repository, then you should probably use the STRICT packages.
|
||||||
|
|
||||||
@ -155,9 +155,9 @@ If you want to perform a manual installation, you can follow this procedure, whi
|
|||||||
|
|
||||||
**pip3 install playsound**
|
**pip3 install playsound**
|
||||||
|
|
||||||
**pacman -S mingw-w64-i686-aria2**
|
**pacman -S mingw-w64-x86_64-aria2**
|
||||||
|
|
||||||
**pacman -S mingw-w64-i686-python-matplotlib**
|
**pacman -S mingw-w64-x86_64-python-matplotlib**
|
||||||
|
|
||||||
- Download the **Tartube** source code from Sourceforge, using the links above
|
- Download the **Tartube** source code from Sourceforge, using the links above
|
||||||
- Extract it into the folder **C:\\msys64\\home\\YOURNAME**, creating a folder called **C:\\msys64\\home\\YOURNAME\\tartube**
|
- Extract it into the folder **C:\\msys64\\home\\YOURNAME**, creating a folder called **C:\\msys64\\home\\YOURNAME\\tartube**
|
||||||
@ -1323,18 +1323,19 @@ If a youtube-dl fork is still compatible with the original, then **Tartube** can
|
|||||||
* `7.18 Toolbar is too big`_
|
* `7.18 Toolbar is too big`_
|
||||||
* `7.19 YouTube name/password not accepted`_
|
* `7.19 YouTube name/password not accepted`_
|
||||||
* `7.20 Georestriction workarounds don't work`_
|
* `7.20 Georestriction workarounds don't work`_
|
||||||
* `7.21 Video website blocks me
|
* `7.21 Video website blocks me`_
|
||||||
* `7.22 MS Windows installer is too big`_
|
* `7.22 MS Windows installer is too big`_
|
||||||
* `7.23 Tartube can't detect livestreams`_
|
* `7.23 Tartube can't detect livestreams`_
|
||||||
* `7.24 Livestream is already finished`_
|
* `7.24 Livestream is already finished`_
|
||||||
* `7.25 Can't hear livestream alarms`_
|
* `7.25 Can't hear livestream alarms`_
|
||||||
* `7.26 Some icons not visible`_
|
* `7.26 Some icons not visible`_
|
||||||
* `7.27 Video thumbnails not visible`_
|
* `7.27 Video thumbnails not visible`_
|
||||||
* `7.28 Tartube is not visible in the system tray`_
|
* `7.28 Graphs not visible`_
|
||||||
* `7.29 Tartube is not portable`_
|
* `7.29 Tartube is not visible in the system tray`_
|
||||||
* `7.30 Run out of disk space`_
|
* `7.30 Tartube is not portable`_
|
||||||
* `7.31 British spelling`_
|
* `7.31 Run out of disk space`_
|
||||||
* `7.32 No puedo hablar inglés`_
|
* `7.32 British spelling`_
|
||||||
|
* `7.33 No puedo hablar inglés`_
|
||||||
|
|
||||||
7.1 Tartube won't install/won't run/doesn't work
|
7.1 Tartube won't install/won't run/doesn't work
|
||||||
------------------------------------------------
|
------------------------------------------------
|
||||||
@ -1721,7 +1722,18 @@ If you have already downloaded a lot of **.webp** images, you can ask **Tartube*
|
|||||||
* Click **Operations > Tidy up files...**
|
* Click **Operations > Tidy up files...**
|
||||||
* In the dialogue window, click **Convert .webp files to .jpg using FFmpeg** to select it, then click the **OK** button
|
* In the dialogue window, click **Convert .webp files to .jpg using FFmpeg** to select it, then click the **OK** button
|
||||||
|
|
||||||
7.28 Tartube is not visible in the system tray
|
7.28 Graphs not visible
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
*Q: My buddy installed Tartube, and he showed me some download history graphs. But when I looked for that on my computer, I couldn't find them!*
|
||||||
|
|
||||||
|
A: Tartube shows download statistics in a number of places, for example **Edit > System preferences... > Files > History**.
|
||||||
|
|
||||||
|
The graphs are created by `matplotlib <https://matplotlib.org/>`__, but none of the Tartube installers use it. If you want graphs, you have to install matplotlib yourself.
|
||||||
|
|
||||||
|
On Linux/BSD, use your system's software manager. On MS Windows, run the application **C:\Users\YOURNAME\AppData\Local\Tartube\msys64\mingw64.exe**, and in the new window type **pacman -S mingw-w64-x86_64-python-matplotlib**.
|
||||||
|
|
||||||
|
7.29 Tartube is not visible in the system tray
|
||||||
----------------------------------------------
|
----------------------------------------------
|
||||||
|
|
||||||
*Q: Tartube is not visible in the system tray! There is just an empty space where the Tartube icon should be!*
|
*Q: Tartube is not visible in the system tray! There is just an empty space where the Tartube icon should be!*
|
||||||
@ -1730,7 +1742,7 @@ A: This problem exists on certain Linux desktop environments (e.g. `Cinnamon <ht
|
|||||||
|
|
||||||
Other desktop environments (e.g. `MATE <https://mate-desktop.org/>`__) display the **Tartube** icon correctly.
|
Other desktop environments (e.g. `MATE <https://mate-desktop.org/>`__) display the **Tartube** icon correctly.
|
||||||
|
|
||||||
7.29 Tartube is not portable
|
7.30 Tartube is not portable
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
*Q: I want to install Tartube on a USB stick. How do I make Tartube portable?*
|
*Q: I want to install Tartube on a USB stick. How do I make Tartube portable?*
|
||||||
@ -1741,7 +1753,7 @@ On other operating systems, just download the source code and run it. Installati
|
|||||||
|
|
||||||
On other operating systems, **Tartube** will attempt to create a config file in the default location for your system. You should create an empty **settings.json** file in the source code directory (i.e. the one containing a **setup.py** file). This will force Tartube to save its config file there, rather than in the system's default location.
|
On other operating systems, **Tartube** will attempt to create a config file in the default location for your system. You should create an empty **settings.json** file in the source code directory (i.e. the one containing a **setup.py** file). This will force Tartube to save its config file there, rather than in the system's default location.
|
||||||
|
|
||||||
7.30 Run out of disk space
|
7.31 Run out of disk space
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
*Q: When I try to download videos, Tartube refuses, complaining "You have only X / Y Mb remaining on your device". But I'm using an external hard drive with over a trillion terabytes of empty space!*
|
*Q: When I try to download videos, Tartube refuses, complaining "You have only X / Y Mb remaining on your device". But I'm using an external hard drive with over a trillion terabytes of empty space!*
|
||||||
@ -1752,14 +1764,14 @@ This seems to be an issue with the virtualisation software itself (we have confi
|
|||||||
|
|
||||||
The only thing that can be done is to disable the checks and warnings altogether. Click **Edit > System preferences > Files > Device**, and deselect both **Warn user if disk space is less than** and **Halt downloads if disk space is less than**.
|
The only thing that can be done is to disable the checks and warnings altogether. Click **Edit > System preferences > Files > Device**, and deselect both **Warn user if disk space is less than** and **Halt downloads if disk space is less than**.
|
||||||
|
|
||||||
7.31 British spelling
|
7.32 British spelling
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
*Q: These British spellings are getting on my nerves!*
|
*Q: These British spellings are getting on my nerves!*
|
||||||
|
|
||||||
A: Click **Edit > System preferences... > General > Language**, then click the drop-down box to select American English, and then restart **Tartube**
|
A: Click **Edit > System preferences... > General > Language**, then click the drop-down box to select American English, and then restart **Tartube**
|
||||||
|
|
||||||
7.32 No puedo hablar inglés
|
7.33 No puedo hablar inglés
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
*Q: ¡No puedo usar YouTube porque no hablo inglés!*
|
*Q: ¡No puedo usar YouTube porque no hablo inglés!*
|
||||||
|
BIN
icons/locale/flag_nl_NL.png
Normal file
BIN
icons/locale/flag_nl_NL.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 230 B |
File diff suppressed because it is too large
Load Diff
BIN
locale/nl_NL/LC_MESSAGES/base.mo
Normal file
BIN
locale/nl_NL/LC_MESSAGES/base.mo
Normal file
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
|||||||
# Tartube v2.3.072 installer script for MS Windows
|
# Tartube v2.3.085 installer script for MS Windows
|
||||||
#
|
#
|
||||||
# Copyright (C) 2019-2021 A S Lewis
|
# Copyright (C) 2019-2021 A S Lewis
|
||||||
#
|
#
|
||||||
@ -249,7 +249,7 @@
|
|||||||
|
|
||||||
;Name and file
|
;Name and file
|
||||||
Name "Tartube"
|
Name "Tartube"
|
||||||
OutFile "install-tartube-2.3.072-32bit.exe"
|
OutFile "install-tartube-2.3.085-32bit.exe"
|
||||||
|
|
||||||
;Default installation folder
|
;Default installation folder
|
||||||
InstallDir "$LOCALAPPDATA\Tartube"
|
InstallDir "$LOCALAPPDATA\Tartube"
|
||||||
@ -352,7 +352,7 @@ Section "Tartube" SecClient
|
|||||||
# "Publisher" "A S Lewis"
|
# "Publisher" "A S Lewis"
|
||||||
# WriteRegStr HKLM \
|
# WriteRegStr HKLM \
|
||||||
# "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tartube" \
|
# "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tartube" \
|
||||||
# "DisplayVersion" "2.3.072"
|
# "DisplayVersion" "2.3.085"
|
||||||
|
|
||||||
# Create uninstaller
|
# Create uninstaller
|
||||||
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Tartube v2.3.072 installer script for MS Windows
|
# Tartube v2.3.085 installer script for MS Windows
|
||||||
#
|
#
|
||||||
# Copyright (C) 2019-2021 A S Lewis
|
# Copyright (C) 2019-2021 A S Lewis
|
||||||
#
|
#
|
||||||
@ -249,7 +249,7 @@
|
|||||||
|
|
||||||
;Name and file
|
;Name and file
|
||||||
Name "Tartube"
|
Name "Tartube"
|
||||||
OutFile "install-tartube-2.3.072-64bit.exe"
|
OutFile "install-tartube-2.3.085-64bit.exe"
|
||||||
|
|
||||||
;Default installation folder
|
;Default installation folder
|
||||||
InstallDir "$LOCALAPPDATA\Tartube"
|
InstallDir "$LOCALAPPDATA\Tartube"
|
||||||
@ -352,7 +352,7 @@ Section "Tartube" SecClient
|
|||||||
# "Publisher" "A S Lewis"
|
# "Publisher" "A S Lewis"
|
||||||
# WriteRegStr HKLM \
|
# WriteRegStr HKLM \
|
||||||
# "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tartube" \
|
# "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tartube" \
|
||||||
# "DisplayVersion" "2.3.072"
|
# "DisplayVersion" "2.3.085"
|
||||||
|
|
||||||
# Create uninstaller
|
# Create uninstaller
|
||||||
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
||||||
|
@ -42,8 +42,8 @@ import mainapp
|
|||||||
|
|
||||||
# 'Global' variables
|
# 'Global' variables
|
||||||
__packagename__ = 'tartube'
|
__packagename__ = 'tartube'
|
||||||
__version__ = '2.3.072'
|
__version__ = '2.3.085'
|
||||||
__date__ = '7 Jan 2021'
|
__date__ = '13 Jan 2021'
|
||||||
__copyright__ = 'Copyright \xa9 2019-2021 A S Lewis'
|
__copyright__ = 'Copyright \xa9 2019-2021 A S Lewis'
|
||||||
__license__ = """
|
__license__ = """
|
||||||
Copyright \xa9 2019-2021 A S Lewis.
|
Copyright \xa9 2019-2021 A S Lewis.
|
||||||
|
@ -42,8 +42,8 @@ import mainapp
|
|||||||
|
|
||||||
# 'Global' variables
|
# 'Global' variables
|
||||||
__packagename__ = 'tartube'
|
__packagename__ = 'tartube'
|
||||||
__version__ = '2.3.072'
|
__version__ = '2.3.085'
|
||||||
__date__ = '7 Jan 2021'
|
__date__ = '13 Jan 2021'
|
||||||
__copyright__ = 'Copyright \xa9 2019-2021 A S Lewis'
|
__copyright__ = 'Copyright \xa9 2019-2021 A S Lewis'
|
||||||
__license__ = """
|
__license__ = """
|
||||||
Copyright \xa9 2019-2021 A S Lewis.
|
Copyright \xa9 2019-2021 A S Lewis.
|
||||||
|
@ -42,8 +42,8 @@ import mainapp
|
|||||||
|
|
||||||
# 'Global' variables
|
# 'Global' variables
|
||||||
__packagename__ = 'tartube'
|
__packagename__ = 'tartube'
|
||||||
__version__ = '2.3.072'
|
__version__ = '2.3.085'
|
||||||
__date__ = '7 Jan 2021'
|
__date__ = '13 Jan 2021'
|
||||||
__copyright__ = 'Copyright \xa9 2019-2021 A S Lewis'
|
__copyright__ = 'Copyright \xa9 2019-2021 A S Lewis'
|
||||||
__license__ = """
|
__license__ = """
|
||||||
Copyright \xa9 2019-2021 A S Lewis.
|
Copyright \xa9 2019-2021 A S Lewis.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.TH man 1 "7 Jan 2021" "2.3.072" "tartube man page"
|
.TH man 1 "13 Jan 2021" "2.3.085" "tartube man page"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
tartube \- GUI front-end for youtube-dl
|
tartube \- GUI front-end for youtube-dl
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Name=Tartube
|
Name=Tartube
|
||||||
Version=2.3.072
|
Version=2.3.085
|
||||||
Exec=tartube
|
Exec=tartube
|
||||||
Icon=tartube
|
Icon=tartube
|
||||||
Type=Application
|
Type=Application
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 27 KiB |
2
setup.py
2
setup.py
@ -182,7 +182,7 @@ for path in glob.glob('sounds/*'):
|
|||||||
# Setup
|
# Setup
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name='tartube',
|
name='tartube',
|
||||||
version='2.3.072',
|
version='2.3.085',
|
||||||
description='GUI front-end for youtube-dl',
|
description='GUI front-end for youtube-dl',
|
||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
long_description_content_type='text/plain',
|
long_description_content_type='text/plain',
|
||||||
|
@ -13892,7 +13892,7 @@ class SystemPrefWin(GenericPrefWin):
|
|||||||
# youtube-dlc. Use an event box so the downloader can be selected by
|
# youtube-dlc. Use an event box so the downloader can be selected by
|
||||||
# clicking anywhere in the frame
|
# clicking anywhere in the frame
|
||||||
event_box = Gtk.EventBox()
|
event_box = Gtk.EventBox()
|
||||||
grid.attach(event_box, 0, 1, 1, 1)
|
grid.attach(event_box, 0, 2, 1, 1)
|
||||||
# (Signal connect appears below)
|
# (Signal connect appears below)
|
||||||
|
|
||||||
frame = Gtk.Frame()
|
frame = Gtk.Frame()
|
||||||
@ -13921,7 +13921,7 @@ class SystemPrefWin(GenericPrefWin):
|
|||||||
|
|
||||||
# youtube-dl
|
# youtube-dl
|
||||||
event_box2 = Gtk.EventBox()
|
event_box2 = Gtk.EventBox()
|
||||||
grid.attach(event_box2, 0, 2, 1, 1)
|
grid.attach(event_box2, 0, 1, 1, 1)
|
||||||
# (Signal connect appears below)
|
# (Signal connect appears below)
|
||||||
|
|
||||||
frame2 = Gtk.Frame()
|
frame2 = Gtk.Frame()
|
||||||
@ -14051,7 +14051,7 @@ class SystemPrefWin(GenericPrefWin):
|
|||||||
_('_File paths'),
|
_('_File paths'),
|
||||||
inner_notebook,
|
inner_notebook,
|
||||||
)
|
)
|
||||||
grid_width = 2
|
grid_width = 3
|
||||||
|
|
||||||
# Downloader file paths
|
# Downloader file paths
|
||||||
self.add_label(grid,
|
self.add_label(grid,
|
||||||
@ -14075,6 +14075,10 @@ class SystemPrefWin(GenericPrefWin):
|
|||||||
_('Use local path') + ' (' + self.app_obj.ytdl_bin + ')',
|
_('Use local path') + ' (' + self.app_obj.ytdl_bin + ')',
|
||||||
self.app_obj.ytdl_bin,
|
self.app_obj.ytdl_bin,
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
_('Use custom path'),
|
||||||
|
None, # Set by the callback
|
||||||
|
],
|
||||||
]
|
]
|
||||||
if os.name != 'nt':
|
if os.name != 'nt':
|
||||||
|
|
||||||
@ -14096,17 +14100,43 @@ class SystemPrefWin(GenericPrefWin):
|
|||||||
combo.pack_start(renderer_text, True)
|
combo.pack_start(renderer_text, True)
|
||||||
combo.add_attribute(renderer_text, 'text', 0)
|
combo.add_attribute(renderer_text, 'text', 0)
|
||||||
combo.set_entry_text_column(0)
|
combo.set_entry_text_column(0)
|
||||||
if self.app_obj.ytdl_path == self.app_obj.ytdl_path_default:
|
|
||||||
combo.set_active(0)
|
|
||||||
elif self.app_obj.ytdl_path == self.app_obj.ytdl_path_pypi:
|
|
||||||
combo.set_active(2)
|
|
||||||
else:
|
|
||||||
combo.set_active(1)
|
|
||||||
# (Signal connect appears below)
|
# (Signal connect appears below)
|
||||||
|
|
||||||
|
entry = self.add_entry(grid,
|
||||||
|
None,
|
||||||
|
False,
|
||||||
|
1, 2, 1, 1,
|
||||||
|
)
|
||||||
|
|
||||||
|
button = Gtk.Button(_('Set'))
|
||||||
|
grid.attach(button, 2, 2, 1, 1)
|
||||||
|
# (Signal connect appears below)
|
||||||
|
|
||||||
|
# Set up those widgets
|
||||||
|
if self.app_obj.ytdl_path_custom_flag:
|
||||||
|
combo.set_active(2)
|
||||||
|
elif self.app_obj.ytdl_path == self.app_obj.ytdl_path_default:
|
||||||
|
combo.set_active(0)
|
||||||
|
elif self.app_obj.ytdl_path == self.app_obj.ytdl_path_pypi:
|
||||||
|
combo.set_active(3)
|
||||||
|
else:
|
||||||
|
combo.set_active(1)
|
||||||
|
|
||||||
|
if self.app_obj.ytdl_path_custom_flag:
|
||||||
|
|
||||||
|
# (If this window is loaded due to
|
||||||
|
# mainapp.TartubeApp.debug_open_pref_win_flag, this value will be
|
||||||
|
# None)
|
||||||
|
if self.app_obj.ytdl_path:
|
||||||
|
entry.set_text(self.app_obj.ytdl_path)
|
||||||
|
|
||||||
|
else:
|
||||||
|
button.set_sensitive(False)
|
||||||
|
|
||||||
|
# Now set up the next combo
|
||||||
self.add_label(grid,
|
self.add_label(grid,
|
||||||
_('Command for update operations'),
|
_('Command for update operations'),
|
||||||
0, 2, 1, 1,
|
0, 3, 1, 1,
|
||||||
)
|
)
|
||||||
|
|
||||||
self.cmd_liststore = Gtk.ListStore(str, str)
|
self.cmd_liststore = Gtk.ListStore(str, str)
|
||||||
@ -14114,7 +14144,7 @@ class SystemPrefWin(GenericPrefWin):
|
|||||||
self.cmd_liststore.append( [item, formats.YTDL_UPDATE_DICT[item]] )
|
self.cmd_liststore.append( [item, formats.YTDL_UPDATE_DICT[item]] )
|
||||||
|
|
||||||
combo2 = Gtk.ComboBox.new_with_model(self.cmd_liststore)
|
combo2 = Gtk.ComboBox.new_with_model(self.cmd_liststore)
|
||||||
grid.attach(combo2, 1, 2, (grid_width - 1), 1)
|
grid.attach(combo2, 1, 3, (grid_width - 1), 1)
|
||||||
|
|
||||||
renderer_text = Gtk.CellRendererText()
|
renderer_text = Gtk.CellRendererText()
|
||||||
combo2.pack_start(renderer_text, True)
|
combo2.pack_start(renderer_text, True)
|
||||||
@ -14135,7 +14165,13 @@ class SystemPrefWin(GenericPrefWin):
|
|||||||
self.update_ytdl_combos()
|
self.update_ytdl_combos()
|
||||||
|
|
||||||
# (Signal connects from above)
|
# (Signal connects from above)
|
||||||
combo.connect('changed', self.on_ytdl_path_combo_changed)
|
combo.connect(
|
||||||
|
'changed',
|
||||||
|
self.on_ytdl_path_combo_changed,
|
||||||
|
entry,
|
||||||
|
button,
|
||||||
|
)
|
||||||
|
button.connect('clicked', self.on_ytdl_path_button_clicked, entry)
|
||||||
combo2.connect('changed', self.on_update_combo_changed)
|
combo2.connect('changed', self.on_update_combo_changed)
|
||||||
|
|
||||||
|
|
||||||
@ -17539,7 +17575,7 @@ class SystemPrefWin(GenericPrefWin):
|
|||||||
grid2.set_row_spacing(self.spacing_size)
|
grid2.set_row_spacing(self.spacing_size)
|
||||||
|
|
||||||
frame = self.add_image(grid2,
|
frame = self.add_image(grid2,
|
||||||
self.app_obj.main_win_obj.icon_dict['tool_quit_large'],
|
self.app_obj.main_win_obj.icon_dict['warning_large'],
|
||||||
0, 2, 1, 1,
|
0, 2, 1, 1,
|
||||||
)
|
)
|
||||||
# (The frame looks cramped without this. The icon itself is
|
# (The frame looks cramped without this. The icon itself is
|
||||||
@ -19752,7 +19788,49 @@ class SystemPrefWin(GenericPrefWin):
|
|||||||
self.update_ytdl_combos()
|
self.update_ytdl_combos()
|
||||||
|
|
||||||
|
|
||||||
def on_ytdl_path_combo_changed(self, combo):
|
def on_ytdl_path_button_clicked(self, button, entry):
|
||||||
|
|
||||||
|
"""Called from callback in self.setup_downloader_paths_tab().
|
||||||
|
|
||||||
|
Sets a custom path to the youtube-dl(c) executable.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
button (Gtk.Button): The widget clicked
|
||||||
|
|
||||||
|
entry (Gtk.Entry): Another widget to update
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
# Prompt the user for the new youtube-dl(c) executable
|
||||||
|
dialogue_win = self.app_obj.dialogue_manager_obj.show_file_chooser(
|
||||||
|
_('Select the youtube-dl-compatible executable'),
|
||||||
|
self,
|
||||||
|
'open',
|
||||||
|
)
|
||||||
|
|
||||||
|
# (When the user first selects a custom path, using the combobox, the
|
||||||
|
# default youtube-dl(c) path is used until they have selected a new
|
||||||
|
# path)
|
||||||
|
if self.app_obj.ytdl_path != self.app_obj.ytdl_path_default:
|
||||||
|
dialogue_win.set_current_folder(self.app_obj.ytdl_path)
|
||||||
|
|
||||||
|
# Get the user's response
|
||||||
|
response = dialogue_win.run()
|
||||||
|
if response == Gtk.ResponseType.OK:
|
||||||
|
new_path = dialogue_win.get_filename()
|
||||||
|
|
||||||
|
dialogue_win.destroy()
|
||||||
|
if response == Gtk.ResponseType.OK:
|
||||||
|
|
||||||
|
self.app_obj.set_ytdl_path(new_path)
|
||||||
|
self.app_obj.ytdl_update_dict['ytdl_update_custom_path'] \
|
||||||
|
= ['python3', self.app_obj.ytdl_path, '-U']
|
||||||
|
|
||||||
|
entry.set_text(new_path)
|
||||||
|
|
||||||
|
|
||||||
|
def on_ytdl_path_combo_changed(self, combo, entry, button):
|
||||||
|
|
||||||
"""Called from a callback in self.setup_downloader_paths_tab().
|
"""Called from a callback in self.setup_downloader_paths_tab().
|
||||||
|
|
||||||
@ -19763,11 +19841,35 @@ class SystemPrefWin(GenericPrefWin):
|
|||||||
|
|
||||||
combo (Gtk.ComboBox): The widget clicked
|
combo (Gtk.ComboBox): The widget clicked
|
||||||
|
|
||||||
|
entry (Gtk.Entry): Another entry to check
|
||||||
|
|
||||||
|
button (Gtk.Button): Another widget to modify
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
tree_iter = combo.get_active_iter()
|
tree_iter = combo.get_active_iter()
|
||||||
model = combo.get_model()
|
model = combo.get_model()
|
||||||
self.app_obj.set_ytdl_path(model[tree_iter][1])
|
ytdl_path = model[tree_iter][1]
|
||||||
|
|
||||||
|
if ytdl_path is not None:
|
||||||
|
|
||||||
|
self.app_obj.set_ytdl_path(ytdl_path)
|
||||||
|
self.app_obj.set_ytdl_path_custom_flag(False)
|
||||||
|
entry.set_text('')
|
||||||
|
button.set_sensitive(False)
|
||||||
|
|
||||||
|
else:
|
||||||
|
|
||||||
|
# Custom youtube-dl(c) path, set by the entry/button
|
||||||
|
# Until the user has selected their own executable, use the default
|
||||||
|
# one
|
||||||
|
self.app_obj.set_ytdl_path(self.app_obj.ytdl_path_default)
|
||||||
|
self.app_obj.ytdl_update_dict['ytdl_update_custom_path'] \
|
||||||
|
= ['python3', self.app_obj.ytdl_path, '-U']
|
||||||
|
self.app_obj.set_ytdl_path_custom_flag(True)
|
||||||
|
|
||||||
|
entry.set_text(self.app_obj.ytdl_path)
|
||||||
|
button.set_sensitive(True)
|
||||||
|
|
||||||
|
|
||||||
def on_ytsc_priority_button_toggled(self, checkbutton, spinbutton,
|
def on_ytsc_priority_button_toggled(self, checkbutton, spinbutton,
|
||||||
@ -19987,7 +20089,7 @@ class SystemPrefWin(GenericPrefWin):
|
|||||||
)
|
)
|
||||||
|
|
||||||
self.path_liststore.set(
|
self.path_liststore.set(
|
||||||
self.path_liststore.get_iter(Gtk.TreePath(2)),
|
self.path_liststore.get_iter(Gtk.TreePath(3)),
|
||||||
0,
|
0,
|
||||||
_('Use PyPI path') + ' (' + ytdl_path_pypi + ')',
|
_('Use PyPI path') + ' (' + ytdl_path_pypi + ')',
|
||||||
)
|
)
|
||||||
|
@ -1656,6 +1656,8 @@ class DownloadList(object):
|
|||||||
self.operation_classic_flag = True
|
self.operation_classic_flag = True
|
||||||
|
|
||||||
# Compile the list
|
# Compile the list
|
||||||
|
|
||||||
|
# Scheduled downloads
|
||||||
if media_data_list and isinstance(media_data_list[0], media.Scheduled):
|
if media_data_list and isinstance(media_data_list[0], media.Scheduled):
|
||||||
|
|
||||||
# media_data_list is a list of scheduled downloads
|
# media_data_list is a list of scheduled downloads
|
||||||
@ -1708,6 +1710,7 @@ class DownloadList(object):
|
|||||||
|
|
||||||
check_dict[name] = None
|
check_dict[name] = None
|
||||||
|
|
||||||
|
# Normal downloads
|
||||||
elif not self.operation_classic_flag:
|
elif not self.operation_classic_flag:
|
||||||
|
|
||||||
# For each media data object to be downloaded, create a
|
# For each media data object to be downloaded, create a
|
||||||
@ -1760,6 +1763,7 @@ class DownloadList(object):
|
|||||||
# media data object can't be both a master and a slave)
|
# media data object can't be both a master and a slave)
|
||||||
self.reorder_master_slave()
|
self.reorder_master_slave()
|
||||||
|
|
||||||
|
# Downloads from the Classic Mode tab
|
||||||
else:
|
else:
|
||||||
|
|
||||||
# The download operation was launched from the Classic Mode Tab.
|
# The download operation was launched from the Classic Mode Tab.
|
||||||
@ -1796,7 +1800,13 @@ class DownloadList(object):
|
|||||||
|
|
||||||
# For each dummy media.Video object, create a
|
# For each dummy media.Video object, create a
|
||||||
# downloads.DownloadItem object, and update the IVs above
|
# downloads.DownloadItem object, and update the IVs above
|
||||||
|
# Don't re-download a video already marked as downloaded (if the
|
||||||
|
# user actually wants to re-download a video, then
|
||||||
|
# mainapp.TartubeApp.on_button_classic_redownload() has reset the
|
||||||
|
# flag)
|
||||||
for dummy_obj in obj_list:
|
for dummy_obj in obj_list:
|
||||||
|
|
||||||
|
if not dummy_obj.dl_flag:
|
||||||
self.create_dummy_item(dummy_obj)
|
self.create_dummy_item(dummy_obj)
|
||||||
|
|
||||||
# We can now merge the two DownloadItem lists
|
# We can now merge the two DownloadItem lists
|
||||||
@ -3246,6 +3256,8 @@ class VideoDownloader(object):
|
|||||||
if self.dl_classic_flag:
|
if self.dl_classic_flag:
|
||||||
|
|
||||||
media_data_obj = self.download_item_obj.media_data_obj
|
media_data_obj = self.download_item_obj.media_data_obj
|
||||||
|
|
||||||
|
media_data_obj.set_dl_flag(True)
|
||||||
media_data_obj.set_dummy_path(
|
media_data_obj.set_dummy_path(
|
||||||
os.path.abspath(os.path.join(dir_path, filename + extension)),
|
os.path.abspath(os.path.join(dir_path, filename + extension)),
|
||||||
)
|
)
|
||||||
@ -3342,6 +3354,7 @@ class VideoDownloader(object):
|
|||||||
# media.Video object
|
# media.Video object
|
||||||
if self.dl_classic_flag:
|
if self.dl_classic_flag:
|
||||||
|
|
||||||
|
media_data_obj.set_dl_flag(True)
|
||||||
media_data_obj.set_dummy_path(
|
media_data_obj.set_dummy_path(
|
||||||
os.path.abspath(os.path.join(dir_path, filename + extension)),
|
os.path.abspath(os.path.join(dir_path, filename + extension)),
|
||||||
)
|
)
|
||||||
@ -4835,6 +4848,9 @@ class VideoDownloader(object):
|
|||||||
|
|
||||||
# Use some empty values in dl_stat_dict so that the Progress Tab
|
# Use some empty values in dl_stat_dict so that the Progress Tab
|
||||||
# doesn't show arbitrary data from the last file downloaded
|
# doesn't show arbitrary data from the last file downloaded
|
||||||
|
# Exception: in Classic Mode, don't do that for self.ALREADY, otherwise
|
||||||
|
# the filename will never be visible
|
||||||
|
if not self.dl_classic_flag or self.return_code != self.ALREADY:
|
||||||
dl_stat_dict['filename'] = ''
|
dl_stat_dict['filename'] = ''
|
||||||
dl_stat_dict['extension'] = ''
|
dl_stat_dict['extension'] = ''
|
||||||
dl_stat_dict['percent'] = ''
|
dl_stat_dict['percent'] = ''
|
||||||
@ -6100,6 +6116,10 @@ class JSONFetcher(object):
|
|||||||
ytdl_path = re.sub('^\~', os.path.expanduser('~'), ytdl_path)
|
ytdl_path = re.sub('^\~', os.path.expanduser('~'), ytdl_path)
|
||||||
|
|
||||||
# Generate the system command...
|
# Generate the system command...
|
||||||
|
if app_obj.ytdl_path_custom_flag:
|
||||||
|
cmd_list = ['python3'] + [ytdl_path] + ['--dump-json'] \
|
||||||
|
+ [self.video_source]
|
||||||
|
else:
|
||||||
cmd_list = [ytdl_path] + ['--dump-json'] + [self.video_source]
|
cmd_list = [ytdl_path] + ['--dump-json'] + [self.video_source]
|
||||||
# ...and create a new child process using that command
|
# ...and create a new child process using that command
|
||||||
self.create_child_process(cmd_list)
|
self.create_child_process(cmd_list)
|
||||||
@ -6667,6 +6687,10 @@ class MiniJSONFetcher(object):
|
|||||||
ytdl_path = re.sub('^\~', os.path.expanduser('~'), ytdl_path)
|
ytdl_path = re.sub('^\~', os.path.expanduser('~'), ytdl_path)
|
||||||
|
|
||||||
# Generate the system command...
|
# Generate the system command...
|
||||||
|
if app_obj.ytdl_path_custom_flag:
|
||||||
|
cmd_list = ['python3'] + [ytdl_path] + ['--dump-json'] \
|
||||||
|
+ [self.video_obj.source]
|
||||||
|
else:
|
||||||
cmd_list = [ytdl_path] + ['--dump-json'] + [self.video_obj.source]
|
cmd_list = [ytdl_path] + ['--dump-json'] + [self.video_obj.source]
|
||||||
# ...and create a new child process using that command
|
# ...and create a new child process using that command
|
||||||
self.create_child_process(cmd_list)
|
self.create_child_process(cmd_list)
|
||||||
|
@ -38,6 +38,7 @@ from mainapp import _
|
|||||||
locale_setup_list = [
|
locale_setup_list = [
|
||||||
'en_GB', 'English',
|
'en_GB', 'English',
|
||||||
'en_US', 'English (American)',
|
'en_US', 'English (American)',
|
||||||
|
'nl_NL', 'Nederlands',
|
||||||
]
|
]
|
||||||
|
|
||||||
LOCALE_DEFAULT = locale_setup_list[0]
|
LOCALE_DEFAULT = locale_setup_list[0]
|
||||||
@ -835,6 +836,8 @@ def do_translate(config_flag=False):
|
|||||||
_('Update using default youtube-dl path'),
|
_('Update using default youtube-dl path'),
|
||||||
'ytdl_update_local_path':
|
'ytdl_update_local_path':
|
||||||
_('Update using local youtube-dl path'),
|
_('Update using local youtube-dl path'),
|
||||||
|
'ytdl_update_custom_path':
|
||||||
|
_('Update using custom youtube-dl path'),
|
||||||
'ytdl_update_pip':
|
'ytdl_update_pip':
|
||||||
_('Update using pip'),
|
_('Update using pip'),
|
||||||
'ytdl_update_pip_omit_user':
|
'ytdl_update_pip_omit_user':
|
||||||
|
@ -238,6 +238,9 @@ class InfoManager(threading.Thread):
|
|||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
||||||
|
if app_obj.ytdl_path_custom_flag:
|
||||||
|
cmd_list = ['python3'] + [ytdl_path]
|
||||||
|
else:
|
||||||
cmd_list = [ytdl_path]
|
cmd_list = [ytdl_path]
|
||||||
|
|
||||||
if self.options_string is not None \
|
if self.options_string is not None \
|
||||||
|
@ -29,6 +29,7 @@ from gi.repository import Gtk, GObject, GdkPixbuf
|
|||||||
# Import Python standard modules
|
# Import Python standard modules
|
||||||
from gi.repository import Gio
|
from gi.repository import Gio
|
||||||
import datetime
|
import datetime
|
||||||
|
import locale
|
||||||
import json
|
import json
|
||||||
import math
|
import math
|
||||||
import os
|
import os
|
||||||
@ -279,8 +280,8 @@ class TartubeApp(Gtk.Application):
|
|||||||
|
|
||||||
# Instance variable (IV) list - other
|
# Instance variable (IV) list - other
|
||||||
# -----------------------------------
|
# -----------------------------------
|
||||||
# Custom locale (matches one of the values in formats.LOCALE_LIST)
|
# Custom locale (can match one of the values in formats.LOCALE_LIST)
|
||||||
self.custom_locale = 'en_GB'
|
self.custom_locale = locale.getdefaultlocale()[0]
|
||||||
|
|
||||||
# Default window sizes (in pixels)
|
# Default window sizes (in pixels)
|
||||||
self.main_win_width = 1000
|
self.main_win_width = 1000
|
||||||
@ -765,11 +766,14 @@ class TartubeApp(Gtk.Application):
|
|||||||
self.ytdl_path_pypi = '~/.local/bin/youtube-dl'
|
self.ytdl_path_pypi = '~/.local/bin/youtube-dl'
|
||||||
# The actual path to use in the shell command during a download or
|
# The actual path to use in the shell command during a download or
|
||||||
# update operation. Initially given the same value as
|
# update operation. Initially given the same value as
|
||||||
# self.ytdl_path_default
|
# self.ytdl_path_default. After configurations, its value might be
|
||||||
# On MSWin, this value doesn't change. On Linux, depending on how
|
# '/usr/bin/youtube-dl', '~/.local/bin/youtube-dl', just 'youtube-dl'
|
||||||
# youtube-dl was installed, it might be '/usr/bin/youtube-dl',
|
# or a custom path specified by the user
|
||||||
# '~/.local/bin/youtube-dl' or just 'youtube-dl'
|
|
||||||
self.ytdl_path = None
|
self.ytdl_path = None
|
||||||
|
# When the user has selected a custom path, this flag is set to True
|
||||||
|
# (even when that path is '/usr/bin/youtube-dl' or one of the other
|
||||||
|
# values listed above)
|
||||||
|
self.ytdl_path_custom_flag = False
|
||||||
# The shell command to use during an update operation depends on how
|
# The shell command to use during an update operation depends on how
|
||||||
# youtube-dl was installed
|
# youtube-dl was installed
|
||||||
# Depending on the operating system, Tartube provides some of these
|
# Depending on the operating system, Tartube provides some of these
|
||||||
@ -2674,7 +2678,16 @@ class TartubeApp(Gtk.Application):
|
|||||||
) or os.path.isfile(self.config_file_path):
|
) or os.path.isfile(self.config_file_path):
|
||||||
new_config_flag = self.load_config()
|
new_config_flag = self.load_config()
|
||||||
|
|
||||||
elif self.debug_no_dialogue_flag:
|
else:
|
||||||
|
|
||||||
|
# The system locale is applied in the call to self.load_config().
|
||||||
|
# Since we aren't calling that now, we must apply the locale
|
||||||
|
# directly
|
||||||
|
if self.custom_locale != formats.LOCALE_DEFAULT:
|
||||||
|
self.apply_locale()
|
||||||
|
|
||||||
|
# Now respond to the missing config file
|
||||||
|
if self.debug_no_dialogue_flag:
|
||||||
self.save_config()
|
self.save_config()
|
||||||
new_config_flag = True
|
new_config_flag = True
|
||||||
|
|
||||||
@ -3158,7 +3171,7 @@ class TartubeApp(Gtk.Application):
|
|||||||
Error codes for this function and for self.system_warning are
|
Error codes for this function and for self.system_warning are
|
||||||
currently assigned thus:
|
currently assigned thus:
|
||||||
|
|
||||||
100-199: mainapp.py (in use: 101-169)
|
100-199: mainapp.py (in use: 101-170)
|
||||||
200-299: mainwin.py (in use: 201-264)
|
200-299: mainwin.py (in use: 201-264)
|
||||||
300-399: downloads.py (in use: 301-308)
|
300-399: downloads.py (in use: 301-308)
|
||||||
400-499: config.py (in use: 401-405)
|
400-499: config.py (in use: 401-405)
|
||||||
@ -3359,35 +3372,7 @@ class TartubeApp(Gtk.Application):
|
|||||||
self.custom_locale = json_dict['custom_locale']
|
self.custom_locale = json_dict['custom_locale']
|
||||||
|
|
||||||
if self.custom_locale != formats.LOCALE_DEFAULT:
|
if self.custom_locale != formats.LOCALE_DEFAULT:
|
||||||
|
self.apply_locale()
|
||||||
if not self.custom_locale in formats.LOCALE_LIST:
|
|
||||||
# Invalid; use the default value
|
|
||||||
self.custom_locale = formats.LOCALE_DEFAULT
|
|
||||||
|
|
||||||
else:
|
|
||||||
|
|
||||||
LOCALE = gettext.translation(
|
|
||||||
'base',
|
|
||||||
localedir='locale',
|
|
||||||
languages=[self.custom_locale],
|
|
||||||
)
|
|
||||||
LOCALE.install()
|
|
||||||
|
|
||||||
# (Apply to this file)
|
|
||||||
_ = LOCALE.gettext
|
|
||||||
# (Apply to other files)
|
|
||||||
mainwin._ = _
|
|
||||||
config._ = _
|
|
||||||
downloads._ = _
|
|
||||||
formats._ = _
|
|
||||||
info._ = _
|
|
||||||
media._ = _
|
|
||||||
refresh._ = _
|
|
||||||
tidy._ = _
|
|
||||||
updates._ = _
|
|
||||||
# (Update download operation stages, e.g.
|
|
||||||
# formats.MAIN_STAGE_QUEUED
|
|
||||||
formats.do_translate(True)
|
|
||||||
|
|
||||||
# Set IVs to their new values
|
# Set IVs to their new values
|
||||||
if version >= 2002075: # v2.2.075
|
if version >= 2002075: # v2.2.075
|
||||||
@ -4052,6 +4037,22 @@ class TartubeApp(Gtk.Application):
|
|||||||
|
|
||||||
self.ytdl_fork = json_dict['ytdl_fork']
|
self.ytdl_fork = json_dict['ytdl_fork']
|
||||||
|
|
||||||
|
# (In version v2.3.082, these IVs were modified a little on all
|
||||||
|
# systems)
|
||||||
|
if version < 2003082: # v2.3.082
|
||||||
|
|
||||||
|
self.ytdl_update_dict['ytdl_update_custom_path'] \
|
||||||
|
= ['python3', self.ytdl_path, '-U']
|
||||||
|
|
||||||
|
self.ytdl_update_list.insert(
|
||||||
|
(len(self.ytdl_update_list) - 1),
|
||||||
|
'ytdl_update_custom_path',
|
||||||
|
)
|
||||||
|
|
||||||
|
else:
|
||||||
|
|
||||||
|
self.ytdl_path_custom_flag = json_dict['ytdl_path_custom_flag']
|
||||||
|
|
||||||
|
|
||||||
def load_config_import_scheduled(self, version, json_dict):
|
def load_config_import_scheduled(self, version, json_dict):
|
||||||
|
|
||||||
@ -4345,6 +4346,7 @@ class TartubeApp(Gtk.Application):
|
|||||||
'ytdl_bin': self.ytdl_bin,
|
'ytdl_bin': self.ytdl_bin,
|
||||||
'ytdl_path_default': self.ytdl_path_default,
|
'ytdl_path_default': self.ytdl_path_default,
|
||||||
'ytdl_path': self.ytdl_path,
|
'ytdl_path': self.ytdl_path,
|
||||||
|
'ytdl_path_custom_flag': self.ytdl_path_custom_flag,
|
||||||
'ytdl_update_dict': self.ytdl_update_dict,
|
'ytdl_update_dict': self.ytdl_update_dict,
|
||||||
'ytdl_update_list': self.ytdl_update_list,
|
'ytdl_update_list': self.ytdl_update_list,
|
||||||
'ytdl_update_current': self.ytdl_update_current,
|
'ytdl_update_current': self.ytdl_update_current,
|
||||||
@ -7083,7 +7085,10 @@ class TartubeApp(Gtk.Application):
|
|||||||
self.ytdl_path_default, '-U',
|
self.ytdl_path_default, '-U',
|
||||||
],
|
],
|
||||||
'ytdl_update_local_path': [
|
'ytdl_update_local_path': [
|
||||||
'youtube-dl', '-U',
|
self.ytdl_bin, '-U',
|
||||||
|
],
|
||||||
|
'ytdl_update_custom_path': [
|
||||||
|
'python3', self.ytdl_path, '-U',
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
self.ytdl_update_list = [
|
self.ytdl_update_list = [
|
||||||
@ -7092,6 +7097,7 @@ class TartubeApp(Gtk.Application):
|
|||||||
'ytdl_update_pip',
|
'ytdl_update_pip',
|
||||||
'ytdl_update_default_path',
|
'ytdl_update_default_path',
|
||||||
'ytdl_update_local_path',
|
'ytdl_update_local_path',
|
||||||
|
'ytdl_update_custom_path',
|
||||||
]
|
]
|
||||||
self.ytdl_update_current = recommended
|
self.ytdl_update_current = recommended
|
||||||
|
|
||||||
@ -7132,7 +7138,10 @@ class TartubeApp(Gtk.Application):
|
|||||||
self.ytdl_path_default, '-U',
|
self.ytdl_path_default, '-U',
|
||||||
],
|
],
|
||||||
'ytdl_update_local_path': [
|
'ytdl_update_local_path': [
|
||||||
'youtube-dl', '-U',
|
self.ytdl_bin, '-U',
|
||||||
|
],
|
||||||
|
'ytdl_update_custom_path': [
|
||||||
|
'python3', self.ytdl_path, '-U',
|
||||||
],
|
],
|
||||||
'ytdl_update_pypi_path': [
|
'ytdl_update_pypi_path': [
|
||||||
self.ytdl_path_pypi, '-U',
|
self.ytdl_path_pypi, '-U',
|
||||||
@ -7145,6 +7154,7 @@ class TartubeApp(Gtk.Application):
|
|||||||
'ytdl_update_pip_omit_user',
|
'ytdl_update_pip_omit_user',
|
||||||
'ytdl_update_default_path',
|
'ytdl_update_default_path',
|
||||||
'ytdl_update_local_path',
|
'ytdl_update_local_path',
|
||||||
|
'ytdl_update_custom_path',
|
||||||
'ytdl_update_pypi_path',
|
'ytdl_update_pypi_path',
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -8092,6 +8102,63 @@ class TartubeApp(Gtk.Application):
|
|||||||
return proxy
|
return proxy
|
||||||
|
|
||||||
|
|
||||||
|
def apply_locale(self):
|
||||||
|
|
||||||
|
"""Called by self.start() and .load_config().
|
||||||
|
|
||||||
|
Calls the python gettext module to apply the locale specified by
|
||||||
|
self.custom_locale (which may have been selected by the user, but it
|
||||||
|
otherwise determined by the system).
|
||||||
|
"""
|
||||||
|
|
||||||
|
if DEBUG_FUNC_FLAG:
|
||||||
|
utils.debug_time('app 7711 apply_locale')
|
||||||
|
|
||||||
|
# Git #245. #247, crash when the gettext.translation() call fails
|
||||||
|
success_flag = False
|
||||||
|
|
||||||
|
if self.custom_locale in formats.LOCALE_LIST:
|
||||||
|
|
||||||
|
try:
|
||||||
|
|
||||||
|
LOCALE = gettext.translation(
|
||||||
|
'base',
|
||||||
|
localedir='locale',
|
||||||
|
languages=[self.custom_locale],
|
||||||
|
)
|
||||||
|
LOCALE.install()
|
||||||
|
|
||||||
|
# (Apply to this file)
|
||||||
|
_ = LOCALE.gettext
|
||||||
|
# (Apply to other files)
|
||||||
|
config._ = _
|
||||||
|
downloads._ = _
|
||||||
|
formats._ = _
|
||||||
|
info._ = _
|
||||||
|
mainwin._ = _
|
||||||
|
media._ = _
|
||||||
|
process._ = _
|
||||||
|
refresh._ = _
|
||||||
|
tidy._ = _
|
||||||
|
updates._ = _
|
||||||
|
utils._ = _
|
||||||
|
wizwin._ = _
|
||||||
|
# (Update download operation stages, e.g.
|
||||||
|
# formats.MAIN_STAGE_QUEUED
|
||||||
|
formats.do_translate(True)
|
||||||
|
|
||||||
|
success_flag = True
|
||||||
|
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
if not success_flag:
|
||||||
|
|
||||||
|
# Locale is invalid, or Tartube does not provide translations for
|
||||||
|
# it; so use the default locale instead
|
||||||
|
self.custom_locale = formats.LOCALE_DEFAULT
|
||||||
|
|
||||||
|
|
||||||
# (Operations)
|
# (Operations)
|
||||||
|
|
||||||
|
|
||||||
@ -17718,6 +17785,8 @@ class TartubeApp(Gtk.Application):
|
|||||||
video_obj = self.main_win_obj.classic_media_dict[dbid]
|
video_obj = self.main_win_obj.classic_media_dict[dbid]
|
||||||
video_list.append(video_obj)
|
video_list.append(video_obj)
|
||||||
|
|
||||||
|
# Mark the video as not downloaded
|
||||||
|
video_obj.set_dl_flag(False)
|
||||||
# Delete the files associated with the video
|
# Delete the files associated with the video
|
||||||
self.delete_video_files(video_obj)
|
self.delete_video_files(video_obj)
|
||||||
|
|
||||||
@ -21570,6 +21639,17 @@ class TartubeApp(Gtk.Application):
|
|||||||
self.ytdl_path = path
|
self.ytdl_path = path
|
||||||
|
|
||||||
|
|
||||||
|
def set_ytdl_path_custom_flag(self, flag):
|
||||||
|
|
||||||
|
if DEBUG_FUNC_FLAG:
|
||||||
|
utils.debug_time('app 20703 set_ytdl_path_custom_flag')
|
||||||
|
|
||||||
|
if not flag:
|
||||||
|
self.ytdl_path_custom_flag = False
|
||||||
|
else:
|
||||||
|
self.ytdl_path_custom_flag = True
|
||||||
|
|
||||||
|
|
||||||
def set_ytdl_update_current(self, string):
|
def set_ytdl_update_current(self, string):
|
||||||
|
|
||||||
if DEBUG_FUNC_FLAG:
|
if DEBUG_FUNC_FLAG:
|
||||||
|
@ -3785,24 +3785,19 @@ class MainWin(Gtk.ApplicationWindow):
|
|||||||
|
|
||||||
downloader = self.app_obj.get_downloader();
|
downloader = self.app_obj.get_downloader();
|
||||||
|
|
||||||
|
self.download_media_button.set_label('...')
|
||||||
if operation_type == 'ffmpeg':
|
if operation_type == 'ffmpeg':
|
||||||
self.check_media_button.set_label(_('Installing'))
|
self.check_media_button.set_label(_('Installing FFmpeg'))
|
||||||
self.download_media_button.set_label('FFmpeg')
|
|
||||||
elif operation_type == 'ytdl':
|
elif operation_type == 'ytdl':
|
||||||
self.check_media_button.set_label(_('Updating'))
|
self.check_media_button.set_label(_('Updating downloader'))
|
||||||
self.download_media_button.set_label(downloader)
|
|
||||||
elif operation_type == 'formats':
|
elif operation_type == 'formats':
|
||||||
self.check_media_button.set_label(_('Fetching'))
|
self.check_media_button.set_label(_('Fetching formats'))
|
||||||
self.download_media_button.set_label('format list')
|
|
||||||
elif operation_type == 'subs':
|
elif operation_type == 'subs':
|
||||||
self.check_media_button.set_label(_('Fetching'))
|
self.check_media_button.set_label(_('Fetching subtitles'))
|
||||||
self.download_media_button.set_label('subtitle list')
|
|
||||||
elif operation_type == 'test_ytdl':
|
elif operation_type == 'test_ytdl':
|
||||||
self.check_media_button.set_label(_('Testing'))
|
self.check_media_button.set_label(_('Testing downloader'))
|
||||||
self.download_media_button.set_label(downloader)
|
|
||||||
else:
|
else:
|
||||||
self.check_media_button.set_label(_('Contacting website'))
|
self.check_media_button.set_label(_('Contacting website'))
|
||||||
self.download_media_button.set_label(downloader)
|
|
||||||
|
|
||||||
self.check_media_button.set_sensitive(False)
|
self.check_media_button.set_sensitive(False)
|
||||||
self.download_media_button.set_sensitive(False)
|
self.download_media_button.set_sensitive(False)
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -42,8 +42,8 @@ import mainapp
|
|||||||
|
|
||||||
# 'Global' variables
|
# 'Global' variables
|
||||||
__packagename__ = 'tartube'
|
__packagename__ = 'tartube'
|
||||||
__version__ = '2.3.072'
|
__version__ = '2.3.085'
|
||||||
__date__ = '7 Jan 2021'
|
__date__ = '13 Jan 2021'
|
||||||
__copyright__ = 'Copyright \xa9 2019-2021 A S Lewis'
|
__copyright__ = 'Copyright \xa9 2019-2021 A S Lewis'
|
||||||
__license__ = """
|
__license__ = """
|
||||||
Copyright \xa9 2019-2021 A S Lewis.
|
Copyright \xa9 2019-2021 A S Lewis.
|
||||||
|
@ -610,7 +610,7 @@ def disk_get_free_space(path, bytes_flag=False):
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
||||||
def disk_get_total_space(path, bytes_flag=False):
|
def disk_get_total_space(path=None, bytes_flag=False):
|
||||||
|
|
||||||
"""Can be called by anything.
|
"""Can be called by anything.
|
||||||
|
|
||||||
@ -626,10 +626,19 @@ def disk_get_total_space(path, bytes_flag=False):
|
|||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
The total size in MB (or in bytes, if the flag is specified)
|
The total size in MB (or in bytes, if the flag is specified). If no
|
||||||
|
path or an invalid path is specified, returns 0
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
if path is None \
|
||||||
|
or (
|
||||||
|
not os.path.isdir(path) and not os.path.isfile(path)
|
||||||
|
):
|
||||||
|
return 0
|
||||||
|
|
||||||
|
else:
|
||||||
|
|
||||||
total_bytes, used_bytes, free_bytes = shutil.disk_usage(
|
total_bytes, used_bytes, free_bytes = shutil.disk_usage(
|
||||||
os.path.realpath(path),
|
os.path.realpath(path),
|
||||||
)
|
)
|
||||||
@ -640,7 +649,7 @@ def disk_get_total_space(path, bytes_flag=False):
|
|||||||
return total_bytes
|
return total_bytes
|
||||||
|
|
||||||
|
|
||||||
def disk_get_used_space(path, bytes_flag=False):
|
def disk_get_used_space(path=None, bytes_flag=False):
|
||||||
|
|
||||||
"""Can be called by anything.
|
"""Can be called by anything.
|
||||||
|
|
||||||
@ -657,10 +666,19 @@ def disk_get_used_space(path, bytes_flag=False):
|
|||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
The used space in MB (or in bytes, if the flag is specified)
|
The used space in MB (or in bytes, if the flag is specified). If no
|
||||||
|
path or an invalid path is specified, returns 0
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
if path is None \
|
||||||
|
or (
|
||||||
|
not os.path.isdir(path) and not os.path.isfile(path)
|
||||||
|
):
|
||||||
|
return 0
|
||||||
|
|
||||||
|
else:
|
||||||
|
|
||||||
total_bytes, used_bytes, free_bytes = shutil.disk_usage(
|
total_bytes, used_bytes, free_bytes = shutil.disk_usage(
|
||||||
os.path.realpath(path),
|
os.path.realpath(path),
|
||||||
)
|
)
|
||||||
@ -1255,7 +1273,11 @@ divert_mode=None):
|
|||||||
if os.name != 'nt':
|
if os.name != 'nt':
|
||||||
ytdl_path = re.sub('^\~', os.path.expanduser('~'), ytdl_path)
|
ytdl_path = re.sub('^\~', os.path.expanduser('~'), ytdl_path)
|
||||||
|
|
||||||
# Set the list
|
# Set the list. At the moment, a custom path must be preceeded by 'python3'
|
||||||
|
# (Git #243)
|
||||||
|
if app_obj.ytdl_path_custom_flag:
|
||||||
|
cmd_list = ['python3'] + [ytdl_path] + options_list + [source]
|
||||||
|
else:
|
||||||
cmd_list = [ytdl_path] + options_list + [source]
|
cmd_list = [ytdl_path] + options_list + [source]
|
||||||
|
|
||||||
return cmd_list
|
return cmd_list
|
||||||
|
@ -594,9 +594,9 @@ class SetupWizWin(GenericWizWin):
|
|||||||
# self.apply_changes() is called)
|
# self.apply_changes() is called)
|
||||||
# Path to Tartube's data directory
|
# Path to Tartube's data directory
|
||||||
self.data_dir = None
|
self.data_dir = None
|
||||||
# The name of the youtube-dl fork to use ('None' when youtube-dl itself
|
# The name of the youtube-dl fork to use, by default ('None' when
|
||||||
# should be used)
|
# youtube-dl itself should be used)
|
||||||
self.ytdl_fork = 'youtube-dlc'
|
self.ytdl_fork = None
|
||||||
# The new value of mainapp.TartubeApp.ytdl_update_current(), if any.
|
# The new value of mainapp.TartubeApp.ytdl_update_current(), if any.
|
||||||
self.ytdl_update_current = None
|
self.ytdl_update_current = None
|
||||||
|
|
||||||
@ -907,7 +907,7 @@ class SetupWizWin(GenericWizWin):
|
|||||||
|
|
||||||
# youtube-dlc
|
# youtube-dlc
|
||||||
radiobutton = self.setup_set_downloader_page_add_button(
|
radiobutton = self.setup_set_downloader_page_add_button(
|
||||||
1, # Row number
|
2, # Row number
|
||||||
'<b>youtube-dlc</b>: <i>' \
|
'<b>youtube-dlc</b>: <i>' \
|
||||||
+ self.app_obj.ytdl_fork_descrip_dict['youtube-dlc'] \
|
+ self.app_obj.ytdl_fork_descrip_dict['youtube-dlc'] \
|
||||||
+ '</i>',
|
+ '</i>',
|
||||||
@ -916,7 +916,7 @@ class SetupWizWin(GenericWizWin):
|
|||||||
|
|
||||||
# youtube-dl
|
# youtube-dl
|
||||||
radiobutton2 = self.setup_set_downloader_page_add_button(
|
radiobutton2 = self.setup_set_downloader_page_add_button(
|
||||||
2, # Row number
|
1, # Row number
|
||||||
'<b>youtube-dl</b>: <i>' \
|
'<b>youtube-dl</b>: <i>' \
|
||||||
+ self.app_obj.ytdl_fork_descrip_dict['youtube-dl'] \
|
+ self.app_obj.ytdl_fork_descrip_dict['youtube-dl'] \
|
||||||
+ '</i>',
|
+ '</i>',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user