Skip to content

Commit

Permalink
Very large commit to merge into next
Browse files Browse the repository at this point in the history
- yt_dlp integration is complete. Download thread can now accept a video download instance and connect to yt_dlp directly so video downloads no longer have to be redirected to aria2. yt_dlp native error messages are also shown in the error dialogs. FFmpeg is built directly from source.
- Torrent seeding toggle and seeding ratio settings added to preferences.
- Layout is now adaptable with the sidebar now collapsing if the window is shrinked to a certain width.
- Preferences page now has separate tabs for Basic, Torrent and Advanced settings.
- Scheduler settings page is changed from its own dialog into a navigation page on top of the Preferences dialog. It is also slightly redesigned to make it adaptable.
- .torrent files can now be dragged and dropped onto the window to be loaded (fixes #132).
- New downloads are now added on the top of the list. Downloads that were paused now stay paused when Varia is launched again, and they load in the same order as before.
- A lot of code is refined and deduplicated without any deprecated functionality for better performance and easier maintenance in the future.
- Localization improvements, option for translators to pick if the percentage sign is put before or after a percentage number in order to conform with that language.
- .desktop file now includes many new keywords (including "bittorrent" as proposed in issue #134).
- Each download's state (.varia file) is now saved immediately once the download instance is created instead of when the app is exiting or if the user presses pause.
- New .doap file to identify the project is added.
- Dependencies information directories changed to include new licenses.
- build-for-windows.sh updated to include FFmpeg. It now also downloads aria2c.exe from its GitHub repository automatically instead of asking the user to provide it on their own. Also adjusted to switch to the UCRT runtime of MSYS2.
- CONTRIBUTING.md updated to include the new Weblate instance link.
  • Loading branch information
giantpinkrobots committed Jan 16, 2025
1 parent 83995f4 commit 799d002
Show file tree
Hide file tree
Showing 38 changed files with 2,261 additions and 818 deletions.
7 changes: 5 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ If you have any questions you can always reach me via email (giantpinkrobots@pro

## Code

If you want to contribute code, you mainly want the 'next' branch for things like new features that'll land in the next major version, as that branch is for active development. For important bug fixes however, you want the 'main' branch, so I can release a hotfix quickly from there without having to also release all the untested new features in development. These fixes can be applied to the 'next' branch later.
If you want to contribute code, you mainly want the 'next' branch for things like new features that'll land in the next major version, as that branch is for active development. For very important bug fixes however, you want the 'main' branch, so I can release a hotfix quickly from there without having to also release all the untested new features in development. These fixes can be applied to the 'next' branch later.

## Translations

In the case of translations, you want the 'next' branch unless if there is a really embarassing mistake that needs immediate correction with a hotfix, in which case you want the 'main' branch. Translations are done with .po files that you can create with a program like Poedit for example.
There is now a Weblate instance for Varia, kindly provided by Weblate for free (thanks Weblate! <3). As such, the hosted Weblate instance will be used for translations from now on. It makes following through with Varia's development much easier if you're a translator. There's no need to open pull requests for each time you want to push forward an addition or change.

https://hosted.weblate.org/git/varia/glossary/

The Weblate instance is for the 'next' branch, which is the development branch of Varia. However, if there is a really embarassing mistake that needs immediate correction with a hotfix, you should do a pull request for the 'main' branch here. **Please don't do this for corrections or additions that aren't super important though.**
25 changes: 18 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
### *Important for translators: There's now a Weblate instance for Varia, please refer to [the contributing page](https://github.com/giantpinkrobots/varia/blob/main/CONTRIBUTING.md).*

<br>

#
<br>

<center>
<p><img src="https://raw.githubusercontent.com/giantpinkrobots/varia/main/windows/icon.ico" width=200 /></p>

# Varia

<h3>Download manager based on aria2</h3>
<h3>Quick and efficient download manager</h3>

<h3><a href="https://giantpinkrobots.github.io/varia">🌐 Homepage</a></h3>

Expand All @@ -16,13 +23,12 @@

<br>

Varia is a simple download manager that conforms to the latest Libadwaita design guidelines, integrating nicely with GNOME. It uses the amazing aria2 to handle the downloads.
Varia is a simple download manager that conforms to the latest Libadwaita design guidelines, integrating nicely with GNOME. It utilizes aria2 and yt-dlp to handle regular files, torrents and video/audio stream downloads.

</center>

<p float="left" align="middle">
<img src="https://raw.githubusercontent.com/giantpinkrobots/varia/main/screenshots/Screenshot-Varia-1.png" width=400 />
<img src="https://raw.githubusercontent.com/giantpinkrobots/varia/main/screenshots/Screenshot-Varia-2.png" width=400 />
</p>

<p>
Expand Down Expand Up @@ -68,21 +74,24 @@ To build Varia without Flatpak or GNOME Builder though, you'll need:
- Libadwaita
- gettext
- aria2 and the aria2p python package.
- yt-dlp python package
- FFmpeg (without GPL is okay)

To install the ones besides aria2p on some Linux systems:
```
Ubuntu, Debian, Mint etc:
sudo apt install meson ninja-build aria2 python-setuptools libgtk-4-dev libadwaita-1-0 gettext
sudo apt install meson ninja-build aria2 python-setuptools libgtk-4-dev libadwaita-1-0 gettext ffmpeg
Fedora, RHEL etc:
sudo dnf install meson ninja-build aria2 python-setuptools gtk4-devel libadwaita gettext
sudo dnf install meson ninja-build aria2 python-setuptools gtk4-devel libadwaita gettext ffmpeg
Arch, EndeavourOS, Manjaro etc:
sudo pacman -S meson aria2 python-setuptools gtk4 libadwaita gettext
sudo pacman -S meson aria2 python-setuptools gtk4 libadwaita gettext ffmpeg
```
To install aria2p using pip (your distro probably doesn't have it in its repos - it's on the AUR for Arch):
To install aria2p and yt-dlp using pip (your distro probably doesn't have them in its repos - they're on the AUR for Arch):
```
pip install aria2p
pip install yt-dlp
```
Then, you can use meson commands to build Varia:
```
Expand Down Expand Up @@ -117,6 +126,8 @@ Varia will be built into src/dist/variamain. Main executable is variamain.exe.

But, it also relies on the following pieces of software and libraries:
- aria2
- yt-dlp
- FFmpeg
- OpenSSL
- aria2p
- GTK4
Expand Down
37 changes: 24 additions & 13 deletions build-for-windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,31 @@ while getopts "hu" flag; do
esac
done

if [ ! -f ./aria2c.exe ]; then
echo "aria2c.exe does not exist. You need to copy it here before you can run this."
exit
fi

echo "Installing dependencies..."

pacman -S --noconfirm --needed mingw-w64-x86_64-python
pacman -S --noconfirm --needed mingw-w64-x86_64-gtk4
pacman -S --noconfirm --needed mingw-w64-x86_64-libadwaita
pacman -S --noconfirm --needed mingw-w64-x86_64-python-pillow
pacman -S --noconfirm --needed mingw-w64-x86_64-python-gobject
pacman -S --noconfirm --needed mingw-w64-x86_64-python-pip
pacman -S --noconfirm --needed mingw-w64-ucrt-x86_64-python
pacman -S --noconfirm --needed mingw-w64-ucrt-x86_64-gtk4
pacman -S --noconfirm --needed mingw-w64-ucrt-x86_64-libadwaita
pacman -S --noconfirm --needed mingw-w64-ucrt-x86_64-python-pillow
pacman -S --noconfirm --needed mingw-w64-ucrt-x86_64-python-gobject
pacman -S --noconfirm --needed mingw-w64-ucrt-x86_64-python-pip
pacman -S --noconfirm --needed mingw-w64-ucrt-x86_64-yt-dlp
pacman -S --noconfirm --needed unzip
pip install aria2p
pip install pyinstaller

echo "Downloading aria2 and ffmpeg..."

aria2="aria2-1.37.0-win-64bit-build1"
ffmpeg="ffmpeg-n7.1-latest-win64-lgpl-shared-7.1"

wget "https://github.com/aria2/aria2/releases/download/release-1.37.0/$aria2.zip"
wget "https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/$ffmpeg.zip"
mkdir aria2
unzip -d aria2 $aria2.zip
mkdir ffmpeg
unzip -d ffmpeg $ffmpeg.zip

echo "Generating locales..."

rm -rf locale
Expand All @@ -48,13 +57,15 @@ pyinstaller varia.spec
cd ..
cp -r locale src/dist/variamain/
cp data/icons/hicolor/symbolic/apps/io.github.giantpinkrobots.varia-symbolic.svg src/dist/variamain/
cp data/icons/hicolor/symbolic/apps/network-computer-symbolic.svg src/dist/variamain/
cp data/icons/hicolor/scalable/apps/io.github.giantpinkrobots.varia.svg src/dist/variamain/
cp -r dependencies_information src/dist/variamain/
cp ./aria2c.exe src/dist/variamain/
cp ./aria2/$aria2/aria2c.exe src/dist/variamain/
cp -r ./ffmpeg/$ffmpeg/bin/* src/dist/variamain/

if [ $updater -eq 1 ]; then
touch src/dist/variamain/updater-function-enabled
fi

echo "Build complete."
echo "src/dist/variamain/variamain.exe"
echo "src/dist/variamain/variamain.exe"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions data/icons/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ install_data(
)

symbolic_dir = 'hicolor' / 'symbolic' / 'apps'
install_data(
symbolic_dir / ('@0@-symbolic.svg').format(application_id),
install_dir: get_option('datadir') / 'icons' / symbolic_dir
)
install_subdir(
symbolic_dir,
install_dir: get_option('datadir') / 'icons' / 'hicolor/symbolic'
)
4 changes: 2 additions & 2 deletions data/io.github.giantpinkrobots.varia.desktop.in
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[Desktop Entry]
# Translators: Do NOT translate or localize the application name.
Name=Varia
Comment=Download files and torrents quickly
Comment=Download files, videos and torrents
Exec=varia
Icon=io.github.giantpinkrobots.varia
Terminal=false
Type=Application
Categories=Network
# Translators: These are search terms to find this application. Do NOT translate or localize the semicolons. The list MUST also end with a semicolon.
Keywords=varia;aria;download;manager;torrent;
Keywords=varia;aria;download;manager;torrent;bittorrent;video;audio;media;ytdlp;YouTube;downloader
StartupNotify=true
16 changes: 11 additions & 5 deletions data/io.github.giantpinkrobots.varia.metainfo.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,23 @@

<description>
<p>
Varia is a download manager for all your download needs. It can download regular files and torrents, and do it very quickly.
Varia is better than your browser at downloading stuff.
</p>
<p>
Supporting videos and torrents on top of just regular files, and with a variety of advanced features wrapped inside an easy to understand interface, Varia is both quite powerful and dead simple to use:
</p>
<ul>
<li>
Download files and torrents quickly - potentially faster than your browser, continue incomplete downloads even after reboots
Download anything you want quickly - potentially faster than your browser, continue incomplete downloads even after reboots
</li>
<li>
Download video and audio from thousands of websites (anything supported by yt-dlp) including YouTube, TikTok, Twitter etc
</li>
<li>
Integrate with Firefox and Chrome (or any Chromium based browser) to redirect downloads
Integrate with Firefox and Chrome (or any Chromium based browser like Brave or Opera) to redirect downloads
</li>
<li>
Schedule downloads with a powerful scheduler allowing for custom timespans for each day of the week
Schedule downloads with a powerful scheduler function allowing for custom timespans for each day of the week
</li>
<li>
Download from protected areas with basic auth and cookies.txt import support
Expand All @@ -62,7 +68,7 @@ Control a remote aria2 instance running on any server
</li>
</ul>
<p>
Varia uses GTK4 and Libadwaita for the user interface and utilizes Aria2 for the downloads underneath. It is free software licensed under the Mozilla Public License 2.0. A list of dependencies can be viewed through the Legal section in the About Varia page.
Varia uses GTK4 and Libadwaita for the user interface and utilizes Aria2 for the downloads underneath, as well as yt-dlp for videos. It is free software licensed under the Mozilla Public License 2.0. A list of dependencies can be viewed through the Legal section in the About Varia page.
</p>
</description>

Expand Down
Loading

0 comments on commit 799d002

Please sign in to comment.