[SCM] ktp-text-ui packaging branch, master, updated. debian/15.12.1-1-1918-gdf4b0ec

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:23:50 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=f0b091b

The following commit has been merged in the master branch:
commit f0b091b2eb48f4e94e08f9f8002f48b46dcd716c
Author: Anant Kamath <kamathanant at gmail.com>
Date:   Tue Apr 16 07:05:06 2013 +0530

    Added youtu.be preview support
---
 filters/youtube/youtube-filter.cpp | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/filters/youtube/youtube-filter.cpp b/filters/youtube/youtube-filter.cpp
index 50986a4..5ee66b9 100644
--- a/filters/youtube/youtube-filter.cpp
+++ b/filters/youtube/youtube-filter.cpp
@@ -56,7 +56,21 @@ void YoutubeFilter::filterMessage(KTp::Message &message, const KTp::MessageConte
             kDebug() << "v =" << v;
 
             if (validId.exactMatch(v)){
-                message.appendMessagePart(html.arg(url.queryItemValue(QLatin1String("v"))));
+                message.appendMessagePart(html.arg(v));
+            }
+        }
+        else if (url.host() == QLatin1String("www.youtu.be") ||
+                url.host() == QLatin1String("youtu.be")) {
+            kDebug() << "found youtube url :" << url.url();
+
+            QString v = url.path().mid(1);
+            if (v.endsWith(QLatin1Char('/'))) {
+                v.chop(1);
+            }
+            kDebug() << "v =" << v;
+
+            if (validId.exactMatch(v)){
+                message.appendMessagePart(html.arg(v));
             }
         }
     }

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list