Skip to content

Commit

Permalink
Merge pull request #4 from PyFlat/v1.3.0
Browse files Browse the repository at this point in the history
V1.3.0
  • Loading branch information
PyFlat-JR authored Dec 14, 2023
2 parents 35dd2be + fb43421 commit aa40f77
Show file tree
Hide file tree
Showing 21 changed files with 2,560 additions and 387 deletions.
13 changes: 5 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,17 @@
build/
Downloads/

ui_to_py.bat

setup.py

mainwindow.ui
logs/

mainwindow_ui.py

ui_mainwindow.py

build_exe.bat

*.iss
yt_dlp

update_ui.py
*.ini
FFmpeg/

mainwindow.ui
env/
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

PyFlat Youtube Downloader Copyright (C) 2023 Johannes Rößler
PyFlat Youtube Downloader Copyright (C) 2023 Johannes Roessler
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
Expand Down
66 changes: 42 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
YOUTUBE DOWNLOADER
</div>

* [INSTALLATION](#installation)
* [USAGE](#usage)
* [SHOWCASE](#showcase)
* [Credits](#credits)
- [INSTALLATION](#installation)
- [USAGE](#usage)
- [SHOWCASE](#showcase)
- [Credits](#credits)

# Installation:

- Download the [latest version](https://github.com/PyFlat/YT-Downloader/releases/latest)
- Portable:
- Unzip the .zip folder
Expand All @@ -18,13 +19,14 @@ YOUTUBE DOWNLOADER
- Start the downloader

# Usage:

- Let the downloader install [ffmpeg](https://ffmpeg.org/) and [yt-dlp](https://github.com/yt-dlp/yt-dlp) on first use
- Add a video or playlist URL or a search term to the entry
- Wait until the downloader has loaded the information

- ### Video:
- Select the output format (mp3, mp4)
- Choose the resolution if you want to download mp4
- Select the output folder, this is by default the /Download folder
- Press Download and wait until you see the button again, then you can download more videos or another format
- ### Playlist:
- Choose which range of the playlist should be downloaded
Expand All @@ -36,42 +38,58 @@ YOUTUBE DOWNLOADER
- Wait until the results are displayed (Can take a bit with slow Wifi)
- With left click you can open a video in the download page
- With right click you can see the uploader and title of the video
- ### Settings:
- **Change FFmpeg Path:** Set the path to your local ffmpeg location
- **Download FFmpeg:** Automatically downloads and installs the latest FFmpeg version (**Warning:** Overwrites FFmpeg location)
- **Update yt-dlp:** Automatically downloads and installs the latest yt-dlp version
- **Search For Updates:** Searches for a new version of *PyFlat Youtube Downloader* and shows a link if a new version is available
- **Check for Updates:** If this is checked the downloader automatically searches for updates
- **Set Maximum Threads:** Set the maximum number of videos that can be downloaded at the same time (If you add more videos they will be added to the queue)
- **Show Thumbnails:** If set to false no thumbnails will be loaded -> *faster*
- ### Menubar:

- The download speed depends on the internet connection and the length and resolution of the video!
- **File**
- _Change Download Folder:_ Set the folder in which the downloaded files are saved
- _Reveal in File Explorer:_ Opens the current download folder in explorer
- _Open Log-Files Folder:_ Opens the folder in which the saved log files are located
- **Edit**
- _Auto Update Check:_ Automatically searches for updates
- _Show Thumbnails:_ If set to false no thumbnails will be loaded -> _faster_
- _Default Resolution:_ Set the default resolution for downloading a video
- _Maximum Threads:_ Set the maximum number of videos that can be downloaded at the same time (If you add more videos they will be added to the queue)
- _Change Log-Level:_ Set the amount of information the developer receives. With debug, personal data may be passed on
- **Tools**
- _Set FFmpeg-Path:_ Set the path to your local ffmpeg location
- _Download FFmpeg:_ Automatically downloads and installs the latest FFmpeg version (**Warning:** Overwrites FFmpeg location)
- _Update Yt-dlp:_ Automatically downloads and installs the latest yt-dlp version
- **Help**
- _Search for Updates:_ Searches for a new version of _PyFlat Youtube Downloader_
- _Show on GitHub:_ Opens the repository on GitHub
- _Show Changelog:_ Shows the changelog for the current version

- **The download speed depends on the internet connection and the length and resolution of the video!**

# Showcase:
All images were created with the *Show Thumbnails* setting: Off
## Start

All images were created with the _Show-Thumbnails_ setting: **Off**

## Start-Page

[![](showcase/Startpage.png)](#usage)
## Search

## Search-Page

[![](showcase/Search.png)](#search)

## Download-Page for videos

[![](showcase/Download_Video.png)](#video)

## Range-Selection-Page for playlists

[![](showcase/Select_Playlist_Range.png)](#playlist)
## Download-Page for playlist

## Download-Page for playlists

[![](showcase/Download_Playlist.png)](#playlist)
## Download control window

[![](showcase/Download_Overview.png)](#usage)
## Settings
## Download-Control-Page

[![](showcase/Settings.png)](#settings)
[![](showcase/Download_Overview.png)](#usage)

# Credits:
- <a href="https://github.com/Make-Lemonade/iconicicons">Menu, Search, Download, Folder, Settings, Exit, Dropdown Arrow - Icons</a>
- <a href="https://github.com/twbs/icons">Checkbox Icon</a>

- <a href="https://github.com/Make-Lemonade/iconicicons">Menu, Search, Download, Folder, Exit, Dropdown Arrow - Icons</a>
- <a href="https://github.com/twbs/icons">Checkbox Icon</a>
18 changes: 13 additions & 5 deletions appdata/changelog.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
<strong>New Features:</strong>

<ul>
<li style="text-align: left;">When the program is opened for the first time after installing or updating, the changelog is displayed.</li>
<li style="text-align: left;">It is now possible to update directly if you are not using the portable version.</li>
<li style="text-align: left;">The old settings page has been replaced by a menubar.</li>
<li style="text-align: left;">You can now set the default resolution.</li>
<li style="text-align: left;">There is now logging to make it easier to find errors.</li>
<li style="text-align: left;">The video search no longer takes place automatically instead you have to click on the button to start the search.</li>
</ul>
<br>
<strong>Bug Fixes:</strong>
<ul>
<li style="text-align: left;">Fixed a bug where downloading FFmpeg or yt-dlp did not complete correctly.</li>
<li style="text-align: left;">Fixed a bug where it did not immediately show that FFmpeg or yt-dlp was started downloading.</li>
</ul>
<li style="text-align: left;">
Fix for issues
<a href="https://github.com/PyFlat/YT-Downloader/issues/2" style="color: white; text-decoration: underline; font-weight: bold;">#2</a> and
<a href="https://github.com/PyFlat/YT-Downloader/issues/3" style="color: white; text-decoration: underline; font-weight: bold;">#3</a>
</li>
<li style="text-align: left;">Fixed a bug where the program crashed when a video was opened in the download overview.</li>
<li style="text-align: left;">Other small bug fixes.</li>
</ul>
73 changes: 59 additions & 14 deletions appdata/style.qss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
background-color: #323C5A;
}

QFrame#sidebar, QFrame#topbar, QFrame#topframe, QFrame#sb_top_frame{
QFrame#sidebar, QMenuBar, QFrame#sb_top_frame{
background-color: #2A2D43;
}

Expand All @@ -18,20 +18,18 @@ QPushButton {
text-align: center;
padding: 0px 10px 0px 10px;
}
QPushButton#search_btn,
QPushButton#settings_btn,
QPushButton#search_btn,
QPushButton#download_btn,
QPushButton#file_btn,
QPushButton#exit_btn,
QPushButton#exit_btn,
QPushButton#toggle_sidebar_btn {
border-radius: 0px;
border: 0;
text-align: left;
padding-left: 12.5px;
}
QPushButton#search_btn:checked,
QPushButton#settings_btn:checked,
QPushButton#download_btn:checked,
QPushButton#search_btn:checked,
QPushButton#download_btn:checked,
QPushButton#file_btn:checked {
border-right: 3px solid white;

Expand All @@ -48,19 +46,18 @@ QLabel{
qproperty-alignment: AlignCenter;
}

QLabel#search_labels, QLineEdit, QLabel#image_label, QLabel#top_label{
QLabel#search_labels, QLineEdit, QLabel#image_label{
background: #2A2D43;
border: 3px solid white;
border-radius: 5px;
}
QLineEdit{
border-width: 2px;
}
QLabel#search_labels:disabled{
border-color: black;
}

QLabel#top_label{
padding: 0px 10px 0px 10px;
}

QPushButton:disabled, QLineEdit:disabled{
color: #b2b2b2;
border-color: #b2b2b2;
Expand Down Expand Up @@ -92,7 +89,7 @@ QComboBox::down-arrow:disabled {
QListView {
background-color: #323C5A;
padding: 5px;

}

QComboBox:drop-down {
Expand Down Expand Up @@ -159,7 +156,7 @@ QSlider::groove:horizontal {
background: #414361;
height: 20px;
border-radius: 10px;

}

SliderLabel {
Expand Down Expand Up @@ -212,4 +209,52 @@ QTableView::item{

QTableView::item:selected{
background-color: #515670;
}

QMenu {
icon-size: 25px;
border: 1px solid white;
border-radius: 2px;
}

QMenu::item {
background: transparent;
}
QMenu::item:selected {
background: #515670;
}

QMenuBar::item:selected{
background: #3f435a;
}

QScrollBar {
width: 8px;
padding-top: 10px;
padding-bottom: 10px;
}
QScrollBar::sub-line:vertical, QScrollBar::add-line:vertical {
border: 0;
background: none;
}

QScrollBar::handle:vertical{
background: white;
border: 0;
border-radius: 4px;
}

QScrollBar::sub-page:vertical, QScrollBar::add-page:vertical{
background: #323C5A;
}

QTableWidget QScrollBar{
width: 12px;
margin-left: 5px;
border: 0;
padding: 0;
}

QTextBrowser {
border: none;
}
7 changes: 7 additions & 0 deletions dev_tools/ui_to_py.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pyside6-uic ../mainwindow.ui -o ui_mainwindow.py

py update_ui.py

del ui_mainwindow.py

del ..\mainwindow_ui.py
7 changes: 7 additions & 0 deletions dev_tools/update_ui.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
main_win = open("ui_mainwindow.py", "r").read()
new = main_win[main_win.find("self.actionSearch_For_Updates = "):]


main_win_new = open("../src/Ui_MainWindow.py", "r+").read()
old = main_win_new[:main_win_new.find("self.actionSearch_For_Updates")]
open("../src/Ui_MainWindow.py", "w").write(old+new)
72 changes: 72 additions & 0 deletions exe_installer_setup.iss
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "PyFlat Youtube Downloader"
#define MyAppVersion "1.3.0"
#define MyAppPublisher "PyFlat Studios"
#define MyAppExeName "main.exe"

[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
SignTool=signtool
AppId={{C07689AF-CD91-4D65-BF7E-33F6F1D6F556}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
DefaultDirName={autopf}\{#MyAppName}
DefaultGroupName={#MyAppName}
LicenseFile=C:\Users\Johannes\Documents\GitHub\YT-Downloader\LICENSE
AllowNoIcons=yes
; Remove the following line to run in administrative install mode (install for all users.)
PrivilegesRequired=lowest
OutputDir=C:\Users\Johannes\Documents\GitHub\YT-Downloader\build
OutputBaseFilename=win_installer_v{#MyAppVersion}
Compression=lzma
SolidCompression=yes
WizardStyle=modern

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "german"; MessagesFile: "compiler:Languages\German.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Files]
Source: "C:\Users\Johannes\Documents\GitHub\YT-Downloader\build\exe.win-amd64-3.11\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Johannes\Documents\GitHub\YT-Downloader\build\exe.win-amd64-3.11\api-ms-win-core-console-l1-2-0.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Johannes\Documents\GitHub\YT-Downloader\build\exe.win-amd64-3.11\api-ms-win-core-fibers-l1-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Johannes\Documents\GitHub\YT-Downloader\build\exe.win-amd64-3.11\api-ms-win-eventing-provider-l1-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Johannes\Documents\GitHub\YT-Downloader\build\exe.win-amd64-3.11\frozen_application_license.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Johannes\Documents\GitHub\YT-Downloader\build\exe.win-amd64-3.11\python3.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Johannes\Documents\GitHub\YT-Downloader\build\exe.win-amd64-3.11\python311.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Johannes\Documents\GitHub\YT-Downloader\build\exe.win-amd64-3.11\appdata\*"; DestDir: "{app}\appdata"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "C:\Users\Johannes\Documents\GitHub\YT-Downloader\build\exe.win-amd64-3.11\lib\*"; DestDir: "{app}\lib"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent

[Code]
procedure EditIniFileIfNeeded;
var
IniFilePath: string;
begin
IniFilePath := ExpandConstant('{app}\appdata\config.ini');
if FileExists(IniFilePath) then
begin
SetIniString('DEFAULT', 'first-use-since-update', 'True', IniFilePath);
end;
end;
procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep = ssPostInstall then
EditIniFileIfNeeded;
end;
Loading

0 comments on commit aa40f77

Please sign in to comment.