Skip to content

Commit

Permalink
Merge pull request #44 from dantheman213/release/v0.8.1
Browse files Browse the repository at this point in the history
Release/v0.8.1
  • Loading branch information
dantheman213 authored Sep 3, 2022
2 parents 8892814 + df1f824 commit 4643c62
Show file tree
Hide file tree
Showing 16 changed files with 431 additions and 347 deletions.
19 changes: 17 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
# v0.9.0 - upcoming release
# v0.9.0 - updating release

* Add transcoding options to media ingestion
* Transcoding status update fixes
* Add visual progress bar for download and transcoding
* Remove old separate ingestion dialog choice
* Updated app icon
* Added Get Command feature to list after media ingestion has started
* Added write subs to file option
* Add video thumbnail as icon in list items when downloading or transcoding
* Fixed issue with media not opening when double clicking item after it's completed
* Use workspace area for files still being downloaded or transcoded
* Improved media ingestion format selection UI/UX
* Add visual progress bar for download and transcoding
* Updated authentication section UI in ingestion dialog

# v0.8.1

* Fixed issue with yt-dlp not auto updating
* Added dialog when yt-dlp is automatically updated
* Moved Settings into a centralized place and out of WinForms
* Improved menu item organization
* Updated location for vcredist_x86.exe dependency
* Fixed update check issue when app starts up
* Fix uninstaller missing some files
* Fixed installer not attempting to install yt-dlp.exe

# v0.8.0

* Upgraded .NET framework to 6.x from 4.x.
Expand Down
4 changes: 2 additions & 2 deletions JackTheVideoRipper.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<ImplicitUsings>enable</ImplicitUsings>
<StartupObject>JackTheVideoRipper.Program</StartupObject>
<ApplicationIcon>assets\app.ico</ApplicationIcon>
<AssemblyVersion>0.8.0</AssemblyVersion>
<FileVersion>0.8.0</FileVersion>
<AssemblyVersion>0.8.1</AssemblyVersion>
<FileVersion>0.8.1</FileVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
6 changes: 4 additions & 2 deletions install/CREATE_INSTALLER.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
* Download Dependencies and place them into deps/
- [ffmpeg.exe and ffprobe.exe](https://www.ffmpeg.org/download.html#build-windows)
- [AtomicParsley.exe](http://atomicparsley.sourceforge.net/)
- [vcredist_x86.exe](https://www.microsoft.com/en-us/download/details.aspx?id=5555)
- [vcredist_x86.exe](https://www.microsoft.com/en-us/download/details.aspx?id=26999)
- [windowsdesktop-runtime-6.0.8-win-x64.exe](https://dotnet.microsoft.com/en-us/download/dotnet/6.0)
* Compile Release version of app
* Compile and build Release version of app within Visual Studio
* Increment the version within installer.nsi, version file at root, and in AssemblyInfo in *.csproj
* Use NSIS to compile `installer.nsi`
* Installer should be generated within install/
36 changes: 18 additions & 18 deletions install/installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
!define APP_NAME "JackTheVideoRipper"
!define COMP_NAME "dantheman213"
!define WEB_SITE "https://github.com/dantheman213/JackTheVideoRipper"
!define VERSION "0.8.0"
!define VERSION "0.8.1"
!define COPYRIGHT "Dan � 2022"
!define DESCRIPTION "Download media easily with a few point and clicks."
!define LICENSE_TXT "..\LICENSE"
Expand Down Expand Up @@ -93,8 +93,9 @@ SectionEnd

Section -Additional
SetShellVarContext all
!define INSTDIR_DATA "$APPDATA\${APP_NAME}\bin"
SetOutPath "${INSTDIR_DATA}"
!define INSTDIR_DATA_BASE "$APPDATA\${APP_NAME}"
!define INSTDIR_DATA_BIN "$APPDATA\${APP_NAME}\bin"
SetOutPath "${INSTDIR_DATA_BIN}"
File "deps\AtomicParsley.exe"
File "deps\ffmpeg.exe"
File "deps\ffprobe.exe"
Expand All @@ -104,11 +105,11 @@ File "deps\windowsdesktop-runtime-6.0.8-win-x64.exe"
# Download latest version of youtube-dl for end-user
# TODO: This currently runs in background and silently. On computers with slow or spotty Internet connections may be an issue
# This should wait until finished before continuing...
nsExec::ExecToStack 'powershell.exe -Command "(new-object System.Net.WebClient).DownloadFile(\"https://yt-dl.org/downloads/latest/youtube-dl.exe\", \"${INSTDIR_DATA}\youtube-dl.exe\")"'
nsExec::ExecToStack 'powershell.exe -Command "(new-object System.Net.WebClient).DownloadFile(\"https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.exe\", \"${INSTDIR_DATA_BIN}\yt-dlp.exe\")"'

# Run external installer
ExecWait "${INSTDIR_DATA}\vcredist_x86.exe"
ExecWait "${INSTDIR_DATA}\windowsdesktop-runtime-6.0.8-win-x64.exe"
ExecWait "${INSTDIR_DATA_BIN}\vcredist_x86.exe"
ExecWait "${INSTDIR_DATA_BIN}\windowsdesktop-runtime-6.0.8-win-x64.exe"

SectionEnd

Expand Down Expand Up @@ -157,26 +158,25 @@ SectionEnd
Section Uninstall
${INSTALL_TYPE}
Delete "$INSTDIR\JackTheVideoRipper.exe"
Delete "$INSTDIR\JackTheVideoRipper.dll"
Delete "$INSTDIR\JackTheVideoRipper.runtimeconfig.json"
Delete "$INSTDIR\Newtonsoft.Json.dll"
Delete "$INSTDIR\Newtonsoft.Json.xml"
Delete "$INSTDIR\System.IO.Compression.dll"
Delete "$INSTDIR\System.IO.Compression.ZipFile.dll"
Delete "$INSTDIR\System.Management.dll"
Delete "$INSTDIR\uninstall.exe"
!ifdef WEB_SITE
Delete "$INSTDIR\${APP_NAME} website.url"
!endif

RmDir "$INSTDIR"
RmDir /r "$INSTDIR"

!ifndef NEVER_UNINSTALL
Delete "${INSTDIR_DATA}\AtomicParsley.exe"
Delete "${INSTDIR_DATA}\ffmpeg.exe"
Delete "${INSTDIR_DATA}\ffprobe.exe"
Delete "${INSTDIR_DATA}\vcredist_x86.exe"
Delete "${INSTDIR_DATA}\windowsdesktop-runtime-6.0.8-win-x64.exe"
Delete "${INSTDIR_DATA_BIN}\AtomicParsley.exe"
Delete "${INSTDIR_DATA_BIN}\ffmpeg.exe"
Delete "${INSTDIR_DATA_BIN}\ffprobe.exe"
Delete "${INSTDIR_DATA_BIN}\vcredist_x86.exe"
Delete "${INSTDIR_DATA_BIN}\windowsdesktop-runtime-6.0.8-win-x64.exe"

RmDir "$TEMP\${APP_NAME}"
!endif
RmDir /r "${INSTDIR_DATA_BASE}"
RmDir /r "$TEMP\${APP_NAME}"

!ifdef REG_START_MENU
!insertmacro MUI_STARTMENU_GETFOLDER "Application" $SM_Folder
Expand Down
2 changes: 1 addition & 1 deletion src/AppUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static AppVersionModel checkForNewAppVersion()
model.version = serverVersion;

// substring(1) used to removed "v" from versions to compare
var dstVersion = new Version(serverVersion.Substring(1));
var dstVersion = new Version(model.version.Substring(1));
var localVersion = new Version(Common.getAppVersion().Substring(1));

var result = dstVersion.CompareTo(localVersion);
Expand Down
14 changes: 13 additions & 1 deletion src/Common.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ public static string getAppVersion()
System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();
FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(assembly.Location);
string version = fvi.FileVersion;
return String.Format("v{0}", version.Substring(0, version.LastIndexOf(".")));

return String.Format("v{0}", version);
}

public static bool isValidURL(string URL)
Expand Down Expand Up @@ -198,5 +199,16 @@ public static string RandomString(int length)
return new string(Enumerable.Repeat(chars, length)
.Select(s => s[random.Next(s.Length)]).ToArray());
}

public static string RemoveAllNonNumericValuesFromString(string str)
{
var nums = Regex.Replace(str, @"[^\d]", String.Empty);
if (nums == "")
{
nums = "0";
}

return nums;
}
}
}
31 changes: 31 additions & 0 deletions src/Settings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JackTheVideoRipper.src
{
internal class Settings
{
public static SettingsModel Data;

public static void Save()
{
File.WriteAllText(SettingsModel.filePath, JsonConvert.SerializeObject(Data));
}

public static void Load()
{
if (!SettingsModel.Exists())
{
Directory.CreateDirectory(SettingsModel.dir);
File.WriteAllText(SettingsModel.filePath, JsonConvert.SerializeObject(SettingsModel.generateDefaultSettings()));
}

var json = File.ReadAllText(SettingsModel.filePath);
Data = JsonConvert.DeserializeObject<SettingsModel>(json);
}
}
}
19 changes: 18 additions & 1 deletion src/YouTubeDL.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.IO;
using System.Net;
using System.Security.AccessControl;
using JackTheVideoRipper.src;
using Newtonsoft.Json;
using static System.Environment;

Expand Down Expand Up @@ -53,7 +54,23 @@ public static void checkForUpdates()
{
if (isInstalled())
{
CLI.runCommand(binName + " -U");
CLI.runCommand(binName + " -U", YouTubeDL.installPath);
var previousVersion = Settings.Data.lastVersionYouTubeDL;
var currentVersion = getVersion();

if (previousVersion == "")
{
Settings.Data.lastVersionYouTubeDL = currentVersion;
Settings.Save();
return;
}

if (previousVersion != currentVersion)
{
Settings.Data.lastVersionYouTubeDL = currentVersion;
Settings.Save();
MessageBox.Show(String.Format("Dependency yt-dlp has been upgraded from {0} to {1}!", previousVersion, currentVersion), "yt-dlp update", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}

Expand Down
9 changes: 6 additions & 3 deletions src/models/Settings.cs → src/models/SettingsModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,26 @@

namespace JackTheVideoRipper
{
public class Settings
public class SettingsModel
{
public static string dir = String.Format("{0}\\JackTheVideoRipper\\settings", Environment.GetFolderPath(SpecialFolder.CommonApplicationData));
public static string filePath = String.Format("{0}\\settings.json", dir);
public string defaultDownloadPath { get; set; }
public int maxConcurrentDownloads { get; set; }
public string lastVersionYouTubeDL { get; set; }

public static bool Exists()
{
return File.Exists(filePath);
}

public static Settings generateDefaultSettings()
public static SettingsModel generateDefaultSettings()
{
var s = new Settings();
var s = new SettingsModel();
s.defaultDownloadPath = YouTubeDL.defaultDownloadPath;
s.maxConcurrentDownloads = 5;
s.lastVersionYouTubeDL = "";

return s;
}
}
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.8.0
v0.8.1
Loading

0 comments on commit 4643c62

Please sign in to comment.