Ok, I tried that, but it didnt work. Right after prepareToPlay, the EngineController calls `play(track.playableUrl())`. Since the playable url is being retrieved, the track playableUrl is still empty. So Amarok stops the playback. I need a way to make the engine wait for the url to be retrieved, like in MultiPlayback:<div>
<br></div><div><font face="'courier new', monospace">    if( m_multiPlayback )<br>    {<br>        connect( m_multiPlayback, SIGNAL( playableUrlFetched( const KUrl & ) ), this, SLOT( slotPlayableUrlFetched( const KUrl & ) ) );<br>
        m_multiPlayback->fetchFirst();<br>    }</font><div><br></div>- D<br>
<br><br><div class="gmail_quote">2012/1/14 Matěj Laitl <span dir="ltr"><<a href="mailto:matej@laitl.cz">matej@laitl.cz</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 13. 1. 2012 Dirley wrote:<br>
> Hello, there.<br>
<br>
Hi Dirley,<br>
<div><div class="h5"><br>
> I've been hacking into Amarok, trying to add an internet service. Turns out<br>
> that my service is a little bit... uncommon. When the tracks come from the<br>
> service, they don't have a "playable url". I have to ask the service a url<br>
> for each track I want to play. How would I do that on Amarok?<br>
><br>
> I've considered using the MultiSourceCapability, but it didnt work, since<br>
> the "first" url is always invalid, so the engine skips the song. The<br>
> MultiPlayableCapability almost works, since the engine do wait for the<br>
> first source to be fetched.<br>
><br>
> So I'm missing something? Is it feasible or should I give up and run a http<br>
> server inside my service that redirects to the playable url?<br>
<br>
</div></div>I think you can inherit Meta::Track directly and just implement<br>
virtual void prepareToPlay()<br>
Engine controller apparently calls it when it is about to play a song and it<br>
is called nowhere else in Amarok AFAICS. I would return empty playableUrl()<br>
and false in isPlayable() before prepareToPlay() is called.<br>
<br>
Regards,<br>
                        Matěj<br>
_______________________________________________<br>
Amarok-devel mailing list<br>
<a href="mailto:Amarok-devel@kde.org">Amarok-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/amarok-devel" target="_blank">https://mail.kde.org/mailman/listinfo/amarok-devel</a><br>
</blockquote></div><br></div>