Merge lp:~ted/mediaplayer-app/video-uri-support into lp:mediaplayer-app

Proposed by Ted Gould
Status: Merged
Approved by: Jim Hodapp
Approved revision: 271
Merged at revision: 273
Proposed branch: lp:~ted/mediaplayer-app/video-uri-support
Merge into: lp:mediaplayer-app
Diff against target: 67 lines (+22/-0)
5 files modified
data/CMakeLists.txt (+5/-0)
data/mediaplayer-app.url-dispatcher (+5/-0)
debian/changelog (+6/-0)
debian/mediaplayer-app.install (+1/-0)
src/mediaplayer.cpp (+5/-0)
To merge this branch: bzr merge lp:~ted/mediaplayer-app/video-uri-support
Reviewer Review Type Date Requested Status
Jim Hodapp (community) code Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+232085@code.launchpad.net

Commit message

Register for video:/// URLs in URL dispatcher

Description of the change

Make this use a custom URL format so that we can know who to route the videos to. Registers the scheme with URL dispatcher and handles it in the startup code.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Jim Hodapp (jhodapp) wrote :

Looks good, thanks.

review: Approve (code)
Revision history for this message
Bill Filler (bfiller) wrote :

don't think you need to update the debian/changelog file.
Also, what is best way to test this? Does it depend on anything else landing?

Revision history for this message
Bill Filler (bfiller) wrote :

tested, works

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/CMakeLists.txt'
2--- data/CMakeLists.txt 2013-06-11 15:54:49 +0000
3+++ data/CMakeLists.txt 2014-08-25 13:58:07 +0000
4@@ -1,5 +1,6 @@
5 set(MEDIAPLAYER_DESKTOP_FILE mediaplayer-app.desktop)
6 set(MEDIAPLAYER_APP_ICON mediaplayer-app.svg)
7+set(MEDIAPLAYER_URL_DISPATCHER mediaplayer-app.url-dispatcher)
8
9 file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/${MEDIAPLAYER_DESKTOP_FILE})
10 file(STRINGS ${MEDIAPLAYER_DESKTOP_FILE}.in DESKTOP_FILE_CONTENTS)
11@@ -15,3 +16,7 @@
12 install(FILES ${MEDIAPLAYER_APP_ICON}
13 DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps
14 )
15+
16+install(FILES ${MEDIAPLAYER_URL_DISPATCHER}
17+ DESTINATION ${CMAKE_INSTALL_DATADIR}/url-dispatcher/urls
18+ )
19
20=== added file 'data/mediaplayer-app.url-dispatcher'
21--- data/mediaplayer-app.url-dispatcher 1970-01-01 00:00:00 +0000
22+++ data/mediaplayer-app.url-dispatcher 2014-08-25 13:58:07 +0000
23@@ -0,0 +1,5 @@
24+[
25+ {
26+ "protocol": "video"
27+ }
28+]
29
30=== modified file 'debian/changelog'
31--- debian/changelog 2014-08-20 14:01:52 +0000
32+++ debian/changelog 2014-08-25 13:58:07 +0000
33@@ -1,3 +1,9 @@
34+mediaplayer-app (0.20.5+14.10.20140820-0ubuntu2) UNRELEASED; urgency=medium
35+
36+ * Register for video:/// URLs in URL dispatcher
37+
38+ -- Ted Gould <ted@ubuntu.com> Mon, 25 Aug 2014 08:43:25 -0500
39+
40 mediaplayer-app (0.20.5+14.10.20140820-0ubuntu1) utopic; urgency=low
41
42 [ Martin Pitt ]
43
44=== modified file 'debian/mediaplayer-app.install'
45--- debian/mediaplayer-app.install 2014-02-13 18:26:52 +0000
46+++ debian/mediaplayer-app.install 2014-08-25 13:58:07 +0000
47@@ -4,3 +4,4 @@
48 /usr/share/mediaplayer-app/qml/*
49 /usr/share/icons
50 /usr/share/locale/*/LC_MESSAGES/mediaplayer-app.mo
51+/usr/share/url-dispatcher/urls/*
52
53=== modified file 'src/mediaplayer.cpp'
54--- src/mediaplayer.cpp 2014-03-27 22:46:07 +0000
55+++ src/mediaplayer.cpp 2014-08-25 13:58:07 +0000
56@@ -90,6 +90,11 @@
57 QUrl playUri;
58 if (args.count() >= 2) {
59 QUrl uri(args[1]);
60+
61+ if (uri.scheme() == "video") {
62+ uri.setScheme("file");
63+ }
64+
65 if (uri.isRelative()) {
66 uri = QUrl::fromLocalFile(QDir::current().absoluteFilePath(args[1]));
67 }

Subscribers

People subscribed via source and target branches

to all changes: