Merge lp:~axlrose112/midori/midori into lp:midori

Proposed by axlrose112
Status: Work in progress
Proposed branch: lp:~axlrose112/midori/midori
Merge into: lp:midori
Diff against target: 28 lines (+7/-2)
1 file modified
extensions/webmedia-now-playing.vala (+7/-2)
To merge this branch: bzr merge lp:~axlrose112/midori/midori
Reviewer Review Type Date Requested Status
gue5t gue5t Needs Information
Review via email: mp+245437@code.launchpad.net

Description of the change

Add coub http://coub.com, improve youtube url

To post a comment you must log in.
Revision history for this message
gue5t gue5t (gue5t) wrote :

Is it supposed to be "coub" or "coud"?

review: Needs Information
Revision history for this message
axlrose112 (axlrose112) wrote :

it is COUB, sorry

2015-03-17 12:37 GMT+00:00 gue5t gue5t <email address hidden>:

> Review: Needs Information
>
> Is it supposed to be "coub" or "coud"?
> --
> https://code.launchpad.net/~axlrose112/midori/midori/+merge/245437
> You are the owner of lp:~axlrose112/midori/midori.
>

Revision history for this message
axlrose112 (axlrose112) wrote :

it is COUB Thank you

Revision history for this message
Cris Dywan (kalikiana) wrote :

This needs updating, some of the code is using coud, other parts are using coub.

Revision history for this message
axlrose112 (axlrose112) wrote :

of course i am going to update it now

Unmerged revisions

6859. By axlrose112

Add COUB http://coub.com

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'extensions/webmedia-now-playing.vala'
2--- extensions/webmedia-now-playing.vala 2014-07-31 13:25:05 +0000
3+++ extensions/webmedia-now-playing.vala 2014-12-30 00:49:46 +0000
4@@ -33,17 +33,22 @@
5 web_media_uri = browser.uri;
6 web_media_title = browser.title;
7 try {
8- var youtube = new Regex("""(http|https)://www.youtube.com/watch\?v=[&=_\-A-Za-z0-9.]+""");
9+ var youtube = new Regex("""(http|https)://www.youtube.com/watch\?v=[&=_\-A-Za-z0-9.\|]+""");
10 var vimeo = new Regex("""(http|https)://vimeo.com/[0-9]+""");
11 var dailymotion = new Regex("""(http|https)://www.dailymotion.com/video/[_\-A-Za-z0-9]+""");
12+ var coud = new Regex("""(http|https)://coub.com/view/[&=_\-A-Za-z0-9.\|]+""");
13+
14 string website = null;
15- if (web_media_uri.contains("youtube") || web_media_uri.contains("vimeo") || web_media_uri.contains ("dailymotion")) {
16+ if (web_media_uri.contains("youtube") || web_media_uri.contains("vimeo") ||
17+ web_media_uri.contains ("dailymotion") || web_media_uri.contains ("coub")) {
18 if (youtube.match(web_media_uri))
19 website = "Youtube";
20 else if (vimeo.match(web_media_uri))
21 website = "Vimeo";
22 else if (dailymotion.match(web_media_uri))
23 website = "Dailymotion";
24+ else if (coud.match(web_media_uri))
25+ website = "Coud";
26
27 if (website != null) {
28 dbus_service.video_title = web_media_title;

Subscribers

People subscribed via source and target branches

to all changes: