Hi ,<br><br>I am working on this JJ, 185397 wis NOR Linu amarok-bugs-dist kde org NEW JJ: Saved playlist default name could be smarter <br>In the SqlPlaylist:: savetoDb(bool tracks) <br>
<br>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 .<br><br>SqlStorage *sql = CollectionManager::instance()->sqlStorage();<br>
QString sqlQuery = "SELECT playlist_id from playlists WHERE name='%1'";<br> sqlQuery = sqlQuery.arg( sql->escape( m_name ) );<br> QStringList value = sql->query( sqlQuery );<br> if ( !value.isEmpty() )<br>
m_name = m_name + KGlobal::locale()->formatDateTime( QDateTime::currentDateTime(), KLocale::LongDate, true );<br><br>~Chinmaya<br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Chinmaya Padhi</b> <span dir="ltr"><<a href="mailto:padhi.chinmaya@gmail.com">padhi.chinmaya@gmail.com</a>></span><br>
Date: Sun, Oct 10, 2010 at 10:01 PM<br>Subject: Re: Amarok ... was Re: Junior Jobs<br>To: Stefan Derkits <<a href="mailto:stefan@derkits.at">stefan@derkits.at</a>><br><br><br>HI ,<br>
<br>
I have implemented the changes for the saving the playlist in the db. But there was no info about this usecase:<br>
<br>
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 <br>
the same will create confusion. So i am appending the time stamp incase the playlist name already exists.<br>
<br>
Let me try with your approach.<br>
<br>
Thanks for the inputs :)<br><font color="#888888">
~Chinmaya</font><div><div></div><div class="h5"><br><br><div class="gmail_quote">On Sun, Oct 10, 2010 at 5:34 PM, Stefan Derkits <span dir="ltr"><<a href="mailto:stefan@derkits.at" target="_blank">stefan@derkits.at</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br>
Hey,<br>
<br>
did you already solve your Problem from today morning (well it was<br>
morning in my Timezone ;) ) about the SQL Query?<br>
I think it could have to do with the SQL count(*) ... I think that only<br>
works if you use Group by or something.<br>
Try to do "select playlistid" or something, instead of "select count(*)"<br>
and see if your problem that you don't find something with existing<br>
playlistnames continues to be there.<br>
<br>
Stefan<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.10 (GNU/Linux)<br>
<br>
iEYEARECAAYFAkyxq9gACgkQlZvAMV/NgGJWbACfSyVV9c12EwCXNTDj4DzxaZ2i<br>
QR8An1VkWP3zdT3WTZN/wBaTKtZpednG<br>
=m+7Q<br>
-----END PGP SIGNATURE-----<br>
</blockquote></div><br>
</div></div></div><br>