summaryrefslogtreecommitdiffstats
path: root/kaboodle/player.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kaboodle/player.cpp')
-rw-r--r--kaboodle/player.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/kaboodle/player.cpp b/kaboodle/player.cpp
index af53a91b..4ec345c7 100644
--- a/kaboodle/player.cpp
+++ b/kaboodle/player.cpp
@@ -88,15 +88,17 @@ KMediaPlayer::View *Kaboodle::Player::view(void)
// notice how this is just an expanded stop() ? weird.
bool Kaboodle::Player::openURL(const KURL &f)
{
- if(!current.isEmpty())
+ bool previousLoad = !current.isEmpty();
+ if (previousLoad)
{
uncompleted = false;
engine->stop();
+ current = f;
}
emit started(0);
current = f;
- if(!engine->load(current))
+ if (!engine->load(current))
{
current = KURL();
setState(Empty);
@@ -104,12 +106,18 @@ bool Kaboodle::Player::openURL(const KURL &f)
return false;
}
+ if (previousLoad)
+ {
+ TQTimer::singleShot( 0, this, SLOT(play()) );
+ return true;
+ }
+
stopAction->setEnabled(false);
playAction->setEnabled(true);
pauseAction->setEnabled(false);
setState(Empty); // so stateChanged() is emitted and autoPlay works
setState(Stop);
-
+
tickerTimeout();
return true;
}