Skip to content

Commit

Permalink
Minor release [v3.9.0.0]
Browse files Browse the repository at this point in the history
- Greatly optimized the trimming feature (it was extremely inefficient before, it now trims before doing any other media processing)
- Greatly improved the gif quality
- Improved the file selection dialog (it's now less annoying to use)
- Improved the config system (it's now contained in a single file)
- Removed the webm format (the format is extremely slow to process with ffmpeg, if you need a webm, there are lots of converters that are faster)
- Optimized code
- Updated to yt-dlp 2023.03.04
  • Loading branch information
o7q committed Apr 27, 2023
1 parent 7a9bd0a commit 129ee4a
Show file tree
Hide file tree
Showing 11 changed files with 931 additions and 848 deletions.
9 changes: 9 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
~ v3.9.0.0
- Greatly optimized the trimming feature (it was extremely inefficient before, it now trims before doing any other media processing)
- Greatly improved the gif quality
- Improved the file selection dialog (it's now less annoying to use)
- Improved the config system (it's now contained in a single file)
- Removed the webm format (the format is extremely slow to process with ffmpeg, if you need a webm, there are lots of converters that are faster)
- Optimized code
- Updated to yt-dlp 2023.03.04

~ v3.8.5.0
- Fixed download fails relating to using certain special characters inside non-rich text boxes
- Improved tooltip system
Expand Down
5 changes: 5 additions & 0 deletions src/MediaDownloader/MediaDownloader.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="includes\data\storage.cs" />
<Compile Include="includes\data\structure.cs" />
<Compile Include="includes\data\variables.cs" />
<Compile Include="includes\tools\error.cs" />
<Compile Include="includes\tools\text.cs" />
<Compile Include="program.cs">
<SubType>Form</SubType>
</Compile>
Expand Down
3 changes: 2 additions & 1 deletion src/MediaDownloader/Resources/asciiBanner.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
__ ___ ___ ___ __ __
/ |/ /__ ___/ (_)__ _/ _ \___ _ _____ / /__ ___ ____/ /__ ____
/ /|_/ / -_) _ / / _ `/ // / _ \ |/|/ / _ \/ / _ \/ _ `/ _ / -_) __/
/_/ /_/\__/\_,_/_/\_,_/____/\___/__,__/_//_/_/\___/\_,_/\_,_/\__/_/
/_/ /_/\__/\_,_/_/\_,_/____/\___/__,__/_//_/_/\___/\_,_/\_,_/\__/_/ __VERSION__
by o7q
27 changes: 27 additions & 0 deletions src/MediaDownloader/includes/data/storage.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
namespace MediaDownloader.Data
{
public static class Storage
{
public const string version = "v3.9.0";

public static string CONFIG_main = "MediaDownloader\\config\\config.md";
public static string CONFIG_lock = "MediaDownloader\\config\\_lock";
public static string CONFIG_base = "MediaDownloader\\config\\_base";

public static string WORKING_md = "MediaDownloader\\working\\md.bat";
public static string WORKING_md_header = "MediaDownloader\\working\\md_header";

public static string REDIST_ytdlp = "MediaDownloader\\yt-dlp.exe";
public static string REDIST_ffmpeg = "MediaDownloader\\ffmpeg.exe";

// downloads
public static string baseQuality = " -b:v 100M -b:a 320K ";
public static string state_downloading = "[DOWNLOADING]\n";
public static string state_preprocess = "[PRE-PROCESSING]\n";
public static string state_cpu1 = "[CPU PROCESSING - PASS 1]\n";
public static string state_cpu2 = "[CPU PROCESSING - PASS 2]\n";
public static string state_cpu3 = "[CPU PROCESSING - PASS 3]\n";
public static string state_gpu1 = "[GPU PROCESSING - PASS 1]\n";
public static string state_finished = "[FINISHED]\n";
}
}
24 changes: 24 additions & 0 deletions src/MediaDownloader/includes/data/structure.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
namespace MediaDownloader.Data
{
public static class Structure
{
public struct ConfigBase
{
public string URL;
public string DOWNLOAD_NAME;
public int FORMAT_INDEX;
public string DOWNLOAD_LOCATION;
public bool USE_TIMEFRAME;
public string TIMEFRAME_START;
public string TIMEFRAME_END;
public string GIF_RESOLUTION;
public string GIF_FRAMERATE;
public bool USE_GPU_ENCODER;
public string GPU_ENCODER;
public string YTDLP_ARGUMENTS;
public bool USE_DISPLAY_OUTPUT;
public bool USE_KEEP_OUTPUT;
public bool USE_CPU_ENCODER;
}
}
}
18 changes: 18 additions & 0 deletions src/MediaDownloader/includes/data/variables.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
namespace MediaDownloader.Data
{
public static class Variables
{
// program attributes
public static string title = "";

// batch configuration
public static string downloadName = "";
public static string downloadScript = "";
public static string baseArguments = "";
public static bool useDefaultLocation = true;

// redist check
public static bool ytdlpCheck = false;
public static bool ffmpegCheck = false;
}
}
19 changes: 19 additions & 0 deletions src/MediaDownloader/includes/tools/error.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System;
using System.Windows.Forms;

namespace MediaDownloader.Tools
{
public static class Error
{
public static void redistError(string errMsg)
{
MessageBox.Show("\"" + errMsg + "\" was not found! Exiting MediaDownloader.\n\nMake sure you have \"yt-dlp.exe\" and \"ffmpeg.exe\" in a folder named \"MediaDownloader\" next to \"MediaDownloader.exe\".\nIf you are using scoop please make sure you have installed everything correctly.");
Environment.Exit(1);
}

public static void installError(string file, Exception ex)
{
MessageBox.Show("Error while installing \"" + file + "\" from scoop!\n\nFull Error:\n" + ex);
}
}
}
28 changes: 28 additions & 0 deletions src/MediaDownloader/includes/tools/text.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System;
using System.Linq;

namespace MediaDownloader.Tools
{
public static class Text
{
public static string omitCharacter(string input)
{
string[] invalidChars = { "0x7f" };
for (int i = 0; i < invalidChars.Length; i++)
{
char badChar = (char)Convert.ToUInt32(invalidChars[i], 16);
if (input.Contains(badChar))
input = input.Replace(badChar.ToString(), "");
}

return input;
}

public static string repeatString(string charIn, int amount)
{
string output = "";
for (int i = 0; i <= amount; i++) output += charIn;
return output;
}
}
}
Loading

0 comments on commit 129ee4a

Please sign in to comment.