Tuesday, February 27, 2007

Amarok playing directly from MTP device - part 2

Here is the part I promised yesterday with the changes I did to the mtpmediadevice files. The diff file can be found here. It is basically an implementation of the getProxyUrl(KURL&) call the way daapclient uses similar setup to map one url to another. Currently it is being done at the mediabrowser level as I could not figure out to do on-demand caching at mediaitem level. Moreover the MTP device has to be locked during each transfer which can be done only at MtpMediaDevice, so implementing it at MtpMediaItem/MtpTrack would have involved more complication. I will try to figure out if I can utilize any design pattern for this.
Another thing to note is I have only enabled it for doubleclick and returnpressed events so dnd and right click hasn't been enabled. Moreover copying the track to collectiondb and others do not use the cached file and neither are the cached files deleted after Amarok is shut down.

No comments: