[prev in list] [next in list] [prev in thread] [next in thread] 

List:       amarok-devel
Subject:    Re: How to get the playableUrl only when the track is about to be played?
From:       Matěj Laitl <matej () laitl ! cz>
Date:       2012-01-14 9:54:44
Message-ID: 2483287.RYXh3SSdEz () edgy
[Download RAW message or body]

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic