Skip to content

Commit

Permalink
use yt-dlp from nicolaasjan when using windows7 since upstream yt-dlp…
Browse files Browse the repository at this point in the history
… nolonger supports windows7
  • Loading branch information
mhogomchungu committed Oct 19, 2024
1 parent 38ccb8e commit fe5eb4e
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/engines.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,14 @@ engines::engine::engine( Logger& logger,
m_downloadUrl = svtplay_dl::downloadUrl() ;
}

if( utility::platformIsWindows7() ){

if( m_downloadUrl == "https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest" ){

m_downloadUrl = "https://api.github.com/repos/nicolaasjan/yt-dlp/releases/latest" ;
}
}

auto defaultPath = utility::stringConstants::defaultPath() ;
auto backendPath = utility::stringConstants::backendPath() ;

Expand Down
22 changes: 22 additions & 0 deletions src/utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,20 @@ bool utility::platformIsWindows()
return false ;
}

bool utility::platformIsWindows7()
{
return false ;
}

#endif

#ifdef Q_OS_LINUX

bool utility::platformIsWindows7()
{
return false ;
}

bool utility::platformisOS2()
{
return false ;
Expand All @@ -93,6 +103,11 @@ bool utility::platformIsWindows()

#ifdef Q_OS_MACOS

bool utility::platformIsWindows7()
{
return false ;
}

bool utility::platformisOS2()
{
return false ;
Expand Down Expand Up @@ -150,6 +165,13 @@ bool utility::platformisOS2()
return false ;
}

bool utility::platformIsWindows7()
{
auto m = QOperatingSystemVersion::current() ;

return m == QOperatingSystemVersion::Windows7 ;
}

QString utility::windowsApplicationDirPath()
{
std::array< char,4096 > buffer ;
Expand Down
1 change: 1 addition & 0 deletions src/utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ namespace utility
bool copyFile( const QString& src,const QString& dst,bool = true ) ;
bool pathIsFolderAndExists( const QString& ) ;
bool platformIsWindows() ;
bool platformIsWindows7() ;
bool platformIs32Bit() ;
bool platformIsLinux() ;
bool platformIsOSX() ;
Expand Down
Binary file modified translations/it_IT.qm
Binary file not shown.

0 comments on commit fe5eb4e

Please sign in to comment.