On Wed, 19 Feb 2020 at 12:12:51 +0100, Solene Rapenne wrote:
> On Wed, Feb 19, 2020 at 11:35:52AM +0100, Solene Rapenne wrote:
> > Hi,
> > 
> > smtube uses the website tonvid.com but it uses http:// by default, this 
> > patch
> > will make it use https://tonvid.com instead.
> > 
> > (and a crash report below the patch)
> > 
> > 
> 
> better patch doing https instead of wwws
> 
> many thanks bin on irc who spotted it
> 
> Index: Makefile
> ===================================================================
> RCS file: /data/cvs/ports/x11/smtube/Makefile,v
> retrieving revision 1.35
> diff -u -p -r1.35 Makefile
> --- Makefile  15 Jul 2019 13:21:51 -0000      1.35
> +++ Makefile  19 Feb 2020 10:30:13 -0000
> @@ -5,6 +5,7 @@ USE_WXNEEDED =                Yes
>  COMMENT =            browse and download YouTube videos
>  
>  DISTNAME =           smtube-19.6.0
> +REVISION =           0
>  
>  CATEGORIES =         multimedia x11
>  
> Index: patches/patch-src_browserwindow_cpp
> ===================================================================
> RCS file: patches/patch-src_browserwindow_cpp
> diff -N patches/patch-src_browserwindow_cpp
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_browserwindow_cpp       19 Feb 2020 11:12:01 -0000
> @@ -0,0 +1,23 @@
> +$OpenBSD$
> +
> +Index: src/browserwindow.cpp
> +--- src/browserwindow.cpp.orig
> ++++ src/browserwindow.cpp
> +@@ -70,7 +70,7 @@ BrowserWindow::BrowserWindow(const QString & config_pa
> + {
> +     setWindowTitle("SMTube");
> +     setWindowIcon(QPixmap(":/icons/smtube.png"));
> +-    home_page = "http://www.tonvid.com/";;
> ++    home_page = "https://www.tonvid.com/";;
> + 
> +     settings = new QSettings(config_path + "/smtube2.ini", 
> QSettings::IniFormat, this);
> + 
> +@@ -442,7 +442,7 @@ void BrowserWindow::openYTUrl(QString title, QString e
> +     if (current_player == WebBrowser) {
> +             QString u = url;
> +             #if 1
> +-            u = "http://www.tonvid.com/video.php?u="; + 
> url.toUtf8().toBase64().toPercentEncoding() +
> ++            u = "https://www.tonvid.com/video.php?u="; + 
> url.toUtf8().toBase64().toPercentEncoding() +
> +             "&t=" + title.toUtf8().toBase64().toPercentEncoding();
> +             #endif
> +             QDesktopServices::openUrl(u);
> 

How about this diff?


-- 

                - gonzalo
Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/smtube/Makefile,v
retrieving revision 1.35
diff -u -p -r1.35 Makefile
--- Makefile    15 Jul 2019 13:21:51 -0000      1.35
+++ Makefile    19 Feb 2020 15:30:18 -0000
@@ -4,7 +4,7 @@ USE_WXNEEDED =          Yes
 
 COMMENT =              browse and download YouTube videos
 
-DISTNAME =             smtube-19.6.0
+DISTNAME =             smtube-20.1.0
 
 CATEGORIES =           multimedia x11
 
Index: distinfo
===================================================================
RCS file: /cvs/ports/x11/smtube/distinfo,v
retrieving revision 1.24
diff -u -p -r1.24 distinfo
--- distinfo    15 Jul 2019 13:21:51 -0000      1.24
+++ distinfo    19 Feb 2020 15:30:18 -0000
@@ -1,2 +1,2 @@
-SHA256 (smtube-19.6.0.tar.bz2) = 9UIz7MJWP9iCF/+lhDsjL8WoUUwJyZ4E/qFkZdrUcDQ=
-SIZE (smtube-19.6.0.tar.bz2) = 748844
+SHA256 (smtube-20.1.0.tar.bz2) = vx1BGf6L6sP6rMm7IIEU8s65nMsLMxpyhgE0A6Z/pwM=
+SIZE (smtube-20.1.0.tar.bz2) = 749306
Index: patches/patch-src_browserwindow_cpp
===================================================================
RCS file: patches/patch-src_browserwindow_cpp
diff -N patches/patch-src_browserwindow_cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_browserwindow_cpp 19 Feb 2020 15:30:18 -0000
@@ -0,0 +1,32 @@
+$OpenBSD$
+
+Index: src/browserwindow.cpp
+--- src/browserwindow.cpp.orig
++++ src/browserwindow.cpp
+@@ -70,7 +70,7 @@ BrowserWindow::BrowserWindow(const QString & config_pa
+ {
+       setWindowTitle("SMTube");
+       setWindowIcon(QPixmap(":/icons/smtube.png"));
+-      home_page = "http://www.tonvid.com/";;
++      home_page = "https://www.tonvid.com/";;
+ 
+       settings = new QSettings(config_path + "/smtube2.ini", 
QSettings::IniFormat, this);
+ 
+@@ -442,7 +442,7 @@ void BrowserWindow::openYTUrl(QString title, QString e
+       if (current_player == WebBrowser) {
+               QString u = url;
+               #if 1
+-              u = "http://www.tonvid.com/video.php?u="; + 
url.toUtf8().toBase64().toPercentEncoding() +
++              u = "https://www.tonvid.com/video.php?u="; + 
url.toUtf8().toBase64().toPercentEncoding() +
+             "&t=" + title.toUtf8().toBase64().toPercentEncoding();
+               #endif
+               QDesktopServices::openUrl(u);
+@@ -713,7 +713,7 @@ void BrowserWindow::loadConfig() {
+ #ifdef D_BUTTON
+       add_download_button = settings->value("add_download_button", 
false).toBool();
+ 
+-      QString default_url = "http://www.dlvyoutube.com/%YT_URL%";;
++      QString default_url = "https://www.dlvyoutube.com/%YT_URL%";;
+       external_download_url = settings->value("external_download_url", 
default_url).toString();
+ #endif
+ 

Reply via email to