From 0a5f4888afd478f0bae06c784ae4e900e91b30e0 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Sun, 21 Feb 2010 20:19:58 +0000 Subject: some engine improvements git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1562 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/Engines/mplayer/mplayerengine.cpp | 16 +++++++++++++--- src/plugins/Engines/mplayer/mplayerengine.h | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'src/plugins/Engines') diff --git a/src/plugins/Engines/mplayer/mplayerengine.cpp b/src/plugins/Engines/mplayer/mplayerengine.cpp index bf315c2eb..fec80a46e 100644 --- a/src/plugins/Engines/mplayer/mplayerengine.cpp +++ b/src/plugins/Engines/mplayer/mplayerengine.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2009 by Ilya Kotov * + * Copyright (C) 2008-2010 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -120,11 +120,21 @@ bool MplayerEngine::enqueue(InputSource *source) } if(!supports) return FALSE; - source->deleteLater(); + if(m_process->state() == QProcess::NotRunning) m_url = url; else - m_files.enqueue(url); + { + if(source->isQueued()) + m_files.enqueue(url); + else + { + stop(); + m_url = url; + start(); + } + } + source->deleteLater(); return TRUE; } diff --git a/src/plugins/Engines/mplayer/mplayerengine.h b/src/plugins/Engines/mplayer/mplayerengine.h index cc6b12d16..bd34b535c 100644 --- a/src/plugins/Engines/mplayer/mplayerengine.h +++ b/src/plugins/Engines/mplayer/mplayerengine.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2009 by Ilya Kotov * + * Copyright (C) 2008-2010 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * -- cgit v1.2.3-13-gbd6f