From 5defe769548a39930f9c47984849ea2b963fb01f Mon Sep 17 00:00:00 2001 From: Thomas Perl Date: Fri, 31 Jan 2014 16:27:39 +0100 Subject: [PATCH] Use common GPodderPlayback component from gpodder-ui-qml --- gpodder-ui-qml | 2 +- qml/Main.qml | 8 ++++---- qml/Player.qml | 37 ------------------------------------- 3 files changed, 5 insertions(+), 42 deletions(-) delete mode 100644 qml/Player.qml diff --git a/gpodder-ui-qml b/gpodder-ui-qml index c1f8db5..a271e6b 160000 --- a/gpodder-ui-qml +++ b/gpodder-ui-qml @@ -1 +1 @@ -Subproject commit c1f8db5500b117d0d704e782bad62cd54579d9fd +Subproject commit a271e6b7644244d63cc9dca83dcab6a461d9186c diff --git a/qml/Main.qml b/qml/Main.qml index 9e6454b..64aea9d 100644 --- a/qml/Main.qml +++ b/qml/Main.qml @@ -45,6 +45,10 @@ PodcastsPage { id: py } + GPodderPlayback { + id: player + } + function loadPage(filename, properties) { var component = Qt.createComponent(filename); if (component.status != Component.Ready) { @@ -58,10 +62,6 @@ PodcastsPage { } } - Player { - id: player - } - BusyIndicator { size: BusyIndicatorSize.Large anchors.centerIn: parent diff --git a/qml/Player.qml b/qml/Player.qml deleted file mode 100644 index cc7c3b7..0000000 --- a/qml/Player.qml +++ /dev/null @@ -1,37 +0,0 @@ - -/** - * - * gPodder QML UI Reference Implementation - * Copyright (c) 2013, Thomas Perl - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - * - */ - -import QtQuick 2.0 -import QtMultimedia 5.0 - -MediaPlayer { - id: player - - property int episode - property var queue: ([]) - - function playbackEpisode(episode_id) { - player.episode = episode_id; - py.call('main.play_episode', [episode_id], function (episode) { - player.source = episode.source; - player.play(); - }); - } -}