Fwd: Amarok ... was Re: Junior Jobs
Chinmaya Padhi
padhi.chinmaya at gmail.com
Sun Oct 10 19:50:27 CEST 2010
Hi ,
I am working on this JJ, 185397 wis NOR Linu
amarok-bugs-dist kde org NEW JJ: Saved playlist default name
could be smarter
In the SqlPlaylist:: savetoDb(bool tracks)
I have added the below code to check for unique playlist names but every
time i run this query , the value.IsEmpty is always zero. I dont understand
what is wrong with the code .
SqlStorage *sql = CollectionManager::instance()->sqlStorage();
QString sqlQuery = "SELECT playlist_id from playlists WHERE name='%1'";
sqlQuery = sqlQuery.arg( sql->escape( m_name ) );
QStringList value = sql->query( sqlQuery );
if ( !value.isEmpty() )
m_name = m_name + KGlobal::locale()->formatDateTime(
QDateTime::currentDateTime(), KLocale::LongDate, true );
~Chinmaya
---------- Forwarded message ----------
From: Chinmaya Padhi <padhi.chinmaya at gmail.com>
Date: Sun, Oct 10, 2010 at 10:01 PM
Subject: Re: Amarok ... was Re: Junior Jobs
To: Stefan Derkits <stefan at derkits.at>
HI ,
I have implemented the changes for the saving the playlist in the db. But
there was no info about this usecase:
Lets say we have an album with artist named Amarok. We save it. Then again
some other album for the artist amarok , in that case multiple playlist with
the same will create confusion. So i am appending the time stamp incase the
playlist name already exists.
Let me try with your approach.
Thanks for the inputs :)
~Chinmaya
On Sun, Oct 10, 2010 at 5:34 PM, Stefan Derkits <stefan at derkits.at> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hey,
>
> did you already solve your Problem from today morning (well it was
> morning in my Timezone ;) ) about the SQL Query?
> I think it could have to do with the SQL count(*) ... I think that only
> works if you use Group by or something.
> Try to do "select playlistid" or something, instead of "select count(*)"
> and see if your problem that you don't find something with existing
> playlistnames continues to be there.
>
> Stefan
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iEYEARECAAYFAkyxq9gACgkQlZvAMV/NgGJWbACfSyVV9c12EwCXNTDj4DzxaZ2i
> QR8An1VkWP3zdT3WTZN/wBaTKtZpednG
> =m+7Q
> -----END PGP SIGNATURE-----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/amarok-devel/attachments/20101010/cf9eee0e/attachment.htm
More information about the Amarok-devel
mailing list