Shard.DownloadAssistant 0.1.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Shard.DownloadAssistant --version 0.1.1
NuGet\Install-Package Shard.DownloadAssistant -Version 0.1.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Shard.DownloadAssistant" Version="0.1.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Shard.DownloadAssistant --version 0.1.1
#r "nuget: Shard.DownloadAssistant, 0.1.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Shard.DownloadAssistant as a Cake Addin
#addin nuget:?package=Shard.DownloadAssistant&version=0.1.1

// Install Shard.DownloadAssistant as a Cake Tool
#tool nuget:?package=Shard.DownloadAssistant&version=0.1.1

NuGet Downloads License Maintainability

DownloadAssistant

Shard Library to handle download Requests

The download assistant library is based on .Net 6.0 and manages your download requests. This dowloader uses the Shard.Requests library to handle the downloads. It contains classes that help you to download your desired files.

Tested with more than 5000 simultaneously HTTP Requests and file sized over 80Gb

  • Easy to use! 🔓
  • Efficient ♾️
  • ✨ Resume able file downloader! ✨

Table of Contents

Features

At the moment:

  • StatusRequest: Calls a HEAD request and returns a response message with the header information.🔎
  • SiteRequest: Is parsing a the HTML body of a website and list all references and files. 🔖
  • LoadRequest: To download the response content into a file.
    • This is an HTTP file downloader with these functions:
    • Pause and Start a download ▶
    • Get the filename and extension from the server 📥
    • Timeout function ⌛
    • Monitor the progress of the download with IProgress<float>
    • Can set path and filename
    • Set download speed limit
    • Download a specified range of a file 🔛
    • Download a file into chunks ⛓️
    • Exclude extensions for safety (.exe; .bat; etc...) 🛡️

Tech

It is available on Github:

Installation

Use NuGet to install the actual version.

How to use

Import the Library.

using DownloadAssistant.Request;

Then create a new LoadRequest. This downloads a file into the download's folder of the PC with a ".part" file and uses the name that the server provides.

//To download a file and store it in "Downloads" folder
new LoadRequest("[Your URL]"); // e.g. https://www.sample-videos.com/video123/mkv/240/big_buck_bunny_240p_30mb.mkv

To set options on the Request create a RequestOption or for a LoadRequest a LoadRequestOption.

// Create an option for a LoadRequest
  LoadRequestOptions requestOptions = new()
        {
            // Sets the filename of the download without the extension
            // The extension will be added automatically!
            FileName = "downloadfile", 
            // If this download has priority (default is false)
            Priority = RequestPriority.High, 
            //(default is download folder)
            DestinationPath = "C:\\Users\\[Your Username]\\Desktop", 
            // If this Request contains a heavy request put it in second thread (default is false)
            IsDownload = true,
            //If the downloader should Override, Create a new file or Append (default is Append)
            //Resume function only available with append!
            Mode = LoadMode.Create,
            //Chunk a file to download faster
            Chunks = 3
        };

And use it in the request.

//To download a file and store it on the Desktop with a different name
new LoadRequest("https://speed.hetzner.de/100MB.bin",requestOptions);

To wait on the request, use await or Wait();.

await new LoadRequest("https://speed.hetzner.de/100MB.bin",requestOptions).Task;
//new LoadRequest("https://speed.hetzner.de/100MB.bin",requestOptions).Wait();

TODO:

  • M3U downloads
  • Restart a download with previously downloaded length

License

MIT

Free Code and Free to Use

Have fun!
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Shard.DownloadAssistant:

Package Downloads
Shard.WebsiteScraper

WebsiteScraper is a powerful tool that allows you to effortlessly download your favorite comics and manga from various websites. You can easily provide a JSON file containing the website links, and the scraper will do the rest. Using the advanced parsing capabilities of Angelsharp and Regex, the tool efficiently extracts the desired content from the website and saves it onto your device for offline reading. With WebsiteScraper, you can enjoy your favorite comics and manga anytime, anywhere, without any hassle.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 91 5/6/2024
0.1.3 233 12/14/2023
0.1.2 149 12/10/2023
0.1.1 161 11/20/2023
0.1.0 146 10/21/2023

Fix Issue: LoadRequest Task does not finish