Importing Tracks into a collection

Maximilian Kossick maximilian.kossick at googlemail.com
Tue Oct 28 11:53:45 CET 2008


a quick and dirty way would be to check the current thread in the
sqlcollectionlocation showdestination dialog method, and use a default
way to determine the file location if the thread is not the gui
thread.

another way would be to add a setParameters(QMap<QString, QVariant>)
method to collectionlocation, and check for some magic values in
sqlcollectionlocation

Cheers, Max

On Tue, Oct 28, 2008 at 11:22 AM, Seb Ruiz <ruiz at kde.org> wrote:
> Hi Max or anybody else,
> With the importer I need to be able to insert Meta::TrackPtrs into the
> SqlCollection. I've seen that when copying files to a collection this
> is done through the CollectionLocation. There doesn't seem to be any
> straight forward method of doing this. The only solution I can think
> of is to use a dummy FileCollectionLocation and do a prepareCopy() on
> the track that I need to import. However this is inappropriate since
> the Collection Location will try to spawn an "organise" dialog should
> not be done (as the file location shouldn't actually change) and
> cannot be done since it is being executed outside of a GUI thread.
>
> Can you suggest another more appropriate method as to solving this?
>
> Thanks
>
> --
> Seb Ruiz
>
> http://www.sebruiz.net/
> http://amarok.kde.org/
> _______________________________________________
> Amarok-devel mailing list
> Amarok-devel at kde.org
> https://mail.kde.org/mailman/listinfo/amarok-devel
>


More information about the Amarok-devel mailing list