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:
if( m_multiPlayback ) { connect( m_multiPlayback, SIGNAL( playableUrlFetched( const KUrl & ) ), this, SLOT( slotPlayableUrlFetched( const KUrl & ) ) ); m_multiPlayback->fetchFirst(); } - D 2012/1/14 Matěj Laitl <ma...@laitl.cz> > On 13. 1. 2012 Dirley wrote: > > Hello, there. > > Hi Dirley, > > > I've been hacking into Amarok, trying to add an internet service. Turns > out > > that my service is a little bit... uncommon. When the tracks come from > the > > service, they don't have a "playable url". I have to ask the service a > url > > for each track I want to play. How would I do that on Amarok? > > > > I've considered using the MultiSourceCapability, but it didnt work, since > > the "first" url is always invalid, so the engine skips the song. The > > MultiPlayableCapability almost works, since the engine do wait for the > > first source to be fetched. > > > > So I'm missing something? Is it feasible or should I give up and run a > http > > server inside my service that redirects to the playable url? > > I think you can inherit Meta::Track directly and just implement > virtual void prepareToPlay() > Engine controller apparently calls it when it is about to play a song and > it > is called nowhere else in Amarok AFAICS. I would return empty playableUrl() > and false in isPlayable() before prepareToPlay() is called. > > Regards, > Matěj > _______________________________________________ > Amarok-devel mailing list > Amarok-devel@kde.org > https://mail.kde.org/mailman/listinfo/amarok-devel >
_______________________________________________ Amarok-devel mailing list Amarok-devel@kde.org https://mail.kde.org/mailman/listinfo/amarok-devel