fixing #1809
This commit is contained in:
parent
1db206fb55
commit
1e7014ae01
|
@ -804,7 +804,32 @@ GLiveSupport :: acquirePlaylist(Ptr<const UniqueId>::Ref id)
|
|||
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* Acquire an Playable object.
|
||||
* Open a Playable object.
|
||||
*----------------------------------------------------------------------------*/
|
||||
Ptr<Playable>::Ref
|
||||
LiveSupport :: GLiveSupport ::
|
||||
GLiveSupport :: getPlayable(Ptr<const UniqueId>::Ref id)
|
||||
throw (XmlRpcException)
|
||||
{
|
||||
Ptr<Playable>::Ref playable;
|
||||
|
||||
if (existsPlaylist(id)) {
|
||||
playable = getPlaylist(id);
|
||||
|
||||
} else if (existsAudioClip(id)) {
|
||||
playable = getAudioClip(id);
|
||||
|
||||
} else {
|
||||
throw XmlRpcInvalidArgumentException(
|
||||
"invalid ID in GLiveSupport::acquirePlayable");
|
||||
}
|
||||
|
||||
return playable;
|
||||
}
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* Acquire a Playable object.
|
||||
*----------------------------------------------------------------------------*/
|
||||
Ptr<Playable>::Ref
|
||||
LiveSupport :: GLiveSupport ::
|
||||
|
|
|
@ -678,6 +678,20 @@ class GLiveSupport : public LocalizedConfigurable,
|
|||
acquirePlaylist(Ptr<const UniqueId>::Ref id)
|
||||
throw (XmlRpcException);
|
||||
|
||||
/**
|
||||
* Open a playable object, for reading only.
|
||||
* Calls either getAudioClip() or getPlaylist().
|
||||
* You do not need to release the returned Playable object.
|
||||
*
|
||||
* @param id the id of the playable object.
|
||||
* @return the playable object opened.
|
||||
* @exception XmlRpcException if no Playable with the specified
|
||||
* id exists, or there was a communication problem.
|
||||
*/
|
||||
Ptr<Playable>::Ref
|
||||
getPlayable(Ptr<const UniqueId>::Ref id)
|
||||
throw (XmlRpcException);
|
||||
|
||||
/**
|
||||
* Acquire a playable object.
|
||||
* Calls either acquireAudioClip() or acquirePlaylist().
|
||||
|
|
|
@ -754,6 +754,7 @@ SearchWindow :: onAddToLiveMode(void) throw ()
|
|||
if (playable) {
|
||||
try {
|
||||
gLiveSupport->addToScratchpad(playable);
|
||||
playable = gLiveSupport->getPlayable(playable->getId());
|
||||
gLiveSupport->addToLiveMode(playable);
|
||||
} catch (XmlRpcException &e) {
|
||||
Ptr<Glib::ustring>::Ref errorMessage(new Glib::ustring(
|
||||
|
|
Loading…
Reference in New Issue