From 128023ce2f9167ad0c3f1585fb85cdf9821b7e4a Mon Sep 17 00:00:00 2001 From: mhogomchungu Date: Fri, 16 Aug 2024 14:44:38 +0300 Subject: [PATCH] this commit marks the release point of version 5.0.0 --- CMakeLists.txt | 2 +- README.md | 6 +++--- changelog | 2 +- src/batchdownloader.cpp | 5 ++++- .../io.github.mhogomchungu.media-downloader.json | 3 ++- ....github.mhogomchungu.media-downloader.metainfo.xml | 10 ++++++++++ src/settings.cpp | 3 ++- src/utility.cpp | 11 +++++++---- 8 files changed, 30 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3ce1bc6d..8117a2c4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) -set( PGR_VERSION "4.9.0" ) +set( PGR_VERSION "5.0.0" ) set( COPYRIGHT_YEARS "2021-2024" ) INCLUDE(GNUInstallDirs) diff --git a/README.md b/README.md index 8a7b42d6..f6ceacb6 100644 --- a/README.md +++ b/README.md @@ -42,17 +42,17 @@ Make sure you have access to the internet before you run the media-downloader fo #### Bundle for MacOS -Bundle for MacOS is [here](https://github.com/mhogomchungu/media-downloader/releases/download/4.9.0/MediaDownloader-4.9.0.dmg). This bundle is not notarized and your system may report it as "corrupted". Search the internet on how to install bundles that are not notarized if you want to use this app on MacOS. +Bundle for MacOS is [here](https://github.com/mhogomchungu/media-downloader/releases/download/5.0.0/MediaDownloader-5.0.0.dmg). This bundle is not notarized and your system may report it as "corrupted". Search the internet on how to install bundles that are not notarized if you want to use this app on MacOS. #### Installer for Microsoft Windows -Installer for Microsoft Windows is [here](https://github.com/mhogomchungu/media-downloader/releases/download/4.9.0/MediaDownloader-4.9.0.setup.exe). +Installer for Microsoft Windows is [here](https://github.com/mhogomchungu/media-downloader/releases/download/5.0.0/MediaDownloader-5.0.0.setup.exe). #### Portable version for Microsoft Windows A portable version is a self-contained version that keeps everything in the application folder and does not need to be installed first. -Portable version for Microsoft Windows is [here](https://github.com/mhogomchungu/media-downloader/releases/download/4.9.0/MediaDownloader-4.9.0.zip). +Portable version for Microsoft Windows is [here](https://github.com/mhogomchungu/media-downloader/releases/download/5.0.0/MediaDownloader-5.0.0.zip). You can also install the portable version for Windows using scoop with the following commands: diff --git a/changelog b/changelog index ef02ce61..61ffff46 100644 --- a/changelog +++ b/changelog @@ -297,7 +297,7 @@ Version 1.2.0(April 1st, 2021) - Add improvements to Lux backend. - Version 5.0.0(Unreleased) + Version 5.0.0(August 16th, 2024) [Linux] - Add support for flatpak and a flatpak package is hosted at flathub(https://flathub.org/apps/io.github.mhogomchungu.media-downloader). diff --git a/src/batchdownloader.cpp b/src/batchdownloader.cpp index 6f4ca549..8af886b3 100644 --- a/src/batchdownloader.cpp +++ b/src/batchdownloader.cpp @@ -1653,7 +1653,10 @@ void batchdownloader::getListFromFile( const QString& e,bool deleteFile ) for( const auto& it : util::split( list,'\n',true ) ){ - items.add( it ) ; + if( it.startsWith( "http" ) ){ + + items.add( it ) ; + } } const auto& engine = this->defaultEngine() ; diff --git a/src/flatpak/io.github.mhogomchungu.media-downloader.json b/src/flatpak/io.github.mhogomchungu.media-downloader.json index 166b7219..c824abf2 100644 --- a/src/flatpak/io.github.mhogomchungu.media-downloader.json +++ b/src/flatpak/io.github.mhogomchungu.media-downloader.json @@ -10,7 +10,8 @@ "--socket=fallback-x11", "--filesystem=xdg-download", "--share=network", - "--device=dri" + "--device=dri", + "--talk-name=org.kde.StatusNotifierWatcher" ], "modules": [ { diff --git a/src/flatpak/io.github.mhogomchungu.media-downloader.metainfo.xml b/src/flatpak/io.github.mhogomchungu.media-downloader.metainfo.xml index e6eff4c1..648794a8 100644 --- a/src/flatpak/io.github.mhogomchungu.media-downloader.metainfo.xml +++ b/src/flatpak/io.github.mhogomchungu.media-downloader.metainfo.xml @@ -54,6 +54,16 @@ + + https://github.com/mhogomchungu/media-downloader/releases/download/5.0.0/media-downloader-5.0.0.tar.xz/ + +

Changelog

+
    +
  • Add support for flatpak and a flatpak package.
  • +
  • Various bug fixes and improvements.
  • +
+
+
https://github.com/mhogomchungu/media-downloader/releases/download/4.9.0/media-downloader-4.9.0.1.tar.xz/ diff --git a/src/settings.cpp b/src/settings.cpp index 8d0b35d0..8aa7afef 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -1197,7 +1197,8 @@ void settings::mediaPlayer::action::logError() const static QByteArray _hash( time_t i,const QString& s ) { - auto m = std::time( nullptr ) ; + auto m = static_cast< int >( time( nullptr ) ) ; + auto e = QString::number( m + i ) + s ; QCryptographicHash hash( QCryptographicHash::Sha256 ) ; diff --git a/src/utility.cpp b/src/utility.cpp index b614171f..e743c5d8 100644 --- a/src/utility.cpp +++ b/src/utility.cpp @@ -1168,9 +1168,7 @@ void utility::saveDownloadList( const Context& ctx,QMenu& m,tableWidget& tableWi filePath = utility::homePath() + "/MediaDowloaderList.json" ; } - auto s = QFileDialog::getSaveFileName( &ctx.mainWidget(), - toolTip, - filePath ) ; + auto s = QFileDialog::getSaveFileName( &ctx.mainWidget(),toolTip,filePath ) ; if( !s.isEmpty() ){ const auto e = _saveDownloadList( tableWidget,false ) ; @@ -1185,7 +1183,12 @@ void utility::saveDownloadList( const Context& ctx,QMenu& m,tableWidget& tableWi for( const auto& it : e ){ - m.append( it.toObject().value( "url" ).toString().toUtf8() + "\n" ) ; + auto obj = it.toObject() ; + + auto title = obj.value( "title" ).toString().toUtf8() ; + auto url = obj.value( "url" ).toString().toUtf8() ; + + m.append( "#" + title + "\n" + url + "\n\n" ) ; } engines::file( s,ctx.logger() ).write( m ) ;