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
=== modified file 'data/CMakeLists.txt'
--- data/CMakeLists.txt 2013-06-11 15:54:49 +0000
+++ data/CMakeLists.txt 2014-08-25 13:58:07 +0000
@@ -1,5 +1,6 @@
1set(MEDIAPLAYER_DESKTOP_FILE mediaplayer-app.desktop)1set(MEDIAPLAYER_DESKTOP_FILE mediaplayer-app.desktop)
2set(MEDIAPLAYER_APP_ICON mediaplayer-app.svg)2set(MEDIAPLAYER_APP_ICON mediaplayer-app.svg)
3set(MEDIAPLAYER_URL_DISPATCHER mediaplayer-app.url-dispatcher)
34
4file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/${MEDIAPLAYER_DESKTOP_FILE})5file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/${MEDIAPLAYER_DESKTOP_FILE})
5file(STRINGS ${MEDIAPLAYER_DESKTOP_FILE}.in DESKTOP_FILE_CONTENTS)6file(STRINGS ${MEDIAPLAYER_DESKTOP_FILE}.in DESKTOP_FILE_CONTENTS)
@@ -15,3 +16,7 @@
15install(FILES ${MEDIAPLAYER_APP_ICON}16install(FILES ${MEDIAPLAYER_APP_ICON}
16 DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps17 DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps
17 )18 )
19
20install(FILES ${MEDIAPLAYER_URL_DISPATCHER}
21 DESTINATION ${CMAKE_INSTALL_DATADIR}/url-dispatcher/urls
22 )
1823
=== added file 'data/mediaplayer-app.url-dispatcher'
--- data/mediaplayer-app.url-dispatcher 1970-01-01 00:00:00 +0000
+++ data/mediaplayer-app.url-dispatcher 2014-08-25 13:58:07 +0000
@@ -0,0 +1,5 @@
1[
2 {
3 "protocol": "video"
4 }
5]
06
=== modified file 'debian/changelog'
--- debian/changelog 2014-08-20 14:01:52 +0000
+++ debian/changelog 2014-08-25 13:58:07 +0000
@@ -1,3 +1,9 @@
1mediaplayer-app (0.20.5+14.10.20140820-0ubuntu2) UNRELEASED; urgency=medium
2
3 * Register for video:/// URLs in URL dispatcher
4
5 -- Ted Gould <ted@ubuntu.com> Mon, 25 Aug 2014 08:43:25 -0500
6
1mediaplayer-app (0.20.5+14.10.20140820-0ubuntu1) utopic; urgency=low7mediaplayer-app (0.20.5+14.10.20140820-0ubuntu1) utopic; urgency=low
28
3 [ Martin Pitt ]9 [ Martin Pitt ]
410
=== modified file 'debian/mediaplayer-app.install'
--- debian/mediaplayer-app.install 2014-02-13 18:26:52 +0000
+++ debian/mediaplayer-app.install 2014-08-25 13:58:07 +0000
@@ -4,3 +4,4 @@
4/usr/share/mediaplayer-app/qml/*4/usr/share/mediaplayer-app/qml/*
5/usr/share/icons5/usr/share/icons
6/usr/share/locale/*/LC_MESSAGES/mediaplayer-app.mo6/usr/share/locale/*/LC_MESSAGES/mediaplayer-app.mo
7/usr/share/url-dispatcher/urls/*
78
=== modified file 'src/mediaplayer.cpp'
--- src/mediaplayer.cpp 2014-03-27 22:46:07 +0000
+++ src/mediaplayer.cpp 2014-08-25 13:58:07 +0000
@@ -90,6 +90,11 @@
90 QUrl playUri;90 QUrl playUri;
91 if (args.count() >= 2) {91 if (args.count() >= 2) {
92 QUrl uri(args[1]);92 QUrl uri(args[1]);
93
94 if (uri.scheme() == "video") {
95 uri.setScheme("file");
96 }
97
93 if (uri.isRelative()) {98 if (uri.isRelative()) {
94 uri = QUrl::fromLocalFile(QDir::current().absoluteFilePath(args[1]));99 uri = QUrl::fromLocalFile(QDir::current().absoluteFilePath(args[1]));
95 }100 }

Subscribers

People subscribed via source and target branches

to all changes: