Hi Andy,
On Wed, Jan 17, 2007 at 08:02:26AM +1100, Andy Kelk wrote:
> > The Banshee plugin does this by setting the song's url to
> > file://.../fids0/_XXXX/YY0 for each song. Obviously this wouldn't work
> > in network mode, but that isn't supported under the plugin either. Not
> > sure how Amarok is organized but perhaps you can do the same?
>
> That's not a bad idea and should probably work. I'll take a look at it in
> the near future. At the moment though, my Karma is somewhere in a customs
> shed with a lot of my other possessions... :-)
I took a stab it this, the attached diff is the result. It seem like it
should do the trick; unfortunately, it's not working for some strange
reason... The first debug statement shows the url properly, but calling
setUrl() doesn't seem to do what it should. For example, I get:
amarok: [RioKarmaMediaDevice] Generated url =
'file:///media/karma/fids0/_00000/040'.
amarok: [RioKarmaMediaDevice] Set item #64 url = ''
So, either I'm doing something wrong or not understanding how this is
supposed to work... Can you help?
Thanks,
--Joe
--- riokarmamediadevice.cpp.orig 2007-01-19 03:50:03.000000000 +0000
+++ riokarmamediadevice.cpp 2007-01-19 03:52:43.000000000 +0000
@@ -506,8 +506,15 @@ RioKarmaMediaDevice::readKarmaMusic()
}
else
{
+ QString url;
+ url.sprintf( "file://%s/fids0/_%05x/%03x",
+ mountPoint().ascii(), i >> 12, i & 0x00000FFF );
+ debug() << "Generated url = '" << url << "'." << endl;
RioKarmaTrack *track = new RioKarmaTrack( ret[i] );
track->readMetaData();
+ track->bundle()->setUrl( url );
+ debug() << "Set item #" << i << " url = '" << track->bundle()->url() << "'" << endl;
+
addTrackToView( track );
}
progress++;
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-karma-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-karma-devel