This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Smart-Playlist: Expert Mode

Tags: None
(comma "," separated)
Lemming
Karma
0

Smart-Playlist: Expert Mode

Wed May 04, 2005 7:24 pm
The Smart-Playlist is a nice feature but its boring to create a playlist, close amarok, edit the text-file and restart amarok just because there is no way to enter SQL-code.
It would be great to have an expert-button for plain sql-code. Also it would be great to have a button that shows the database-scheme so you don\'t need to look it up in the db every time.
DanielW
Karma
0

Re:Smart-Playlist: Expert Mode

Wed May 04, 2005 7:37 pm
Hi,

i don\'t think, that that would be a good idea.

First, most normal users don\'t know much about sql.

Second, i think it is bad that the smartplaylists are stored as SQL-Querys. That is one reason why it is not possible to edit the smartplaylists.

So i think it would be much better, to make the features you want to have for your smartplaylist usable without knowing sql.

So please tell what you want to archive with your sql query what is not possible with the smartplaylisteditor yet.
Lemming
Karma
0

Re:Smart-Playlist: Expert Mode

Wed May 04, 2005 7:50 pm
My current playlist is:

SELECT DISTINCT tags.url, statistics.percentage + random(100) as score FROM tags, statistics WHERE statistics.url = tags.url ORDER BY score DESC LIMIT 0,100;

You will never be able to enter that without knowing what sql is.

BTW: Whats the problem when parsing the SQL-Statement ? It should be easy to parse the statements you can enter using the gui, any other are expert-mode queries.
DanielW
Karma
0

Re:Smart-Playlist: Expert Mode

Wed May 04, 2005 9:39 pm
OK, you are right i don\'t think that a UI which can handle that input would be impossible.

But your SQL query is a good example for what a current problem in amarok is.

You use

SELECT DISTINCT tags.url, statistics.percentage + random(100) as score FROM tags, statistics WHERE
statistics.url = tags.url ORDER BY score DESC LIMIT 0,100;

that works, but much faster (on large collections and with sqlite) is:

SELECT DISTINCT tags.url, statistics.percentage + random(100) as score FROM tags INNER JOIN statistics ON
statistics.url = tags.url ORDER BY score DESC LIMIT 0,100;

On that query it is no big problem, but there are querys which takes 50 seconds ore more when you do it as you have done, but only 0.x seconds the way it should be done.

amarK has a QueryBuilder class to generate sql querys. But at the moment it is not used everywhere when querys are generated.

If that would be the cause we could just update the querybuilder and everywhere the faster querys would be used.

So and that is where the parsing problem begins:

the form of the querys or even the database layout could change in the future. I would like to have it database layout and a specific queryform independet. And if you write me a parser for every possible sql query which fills the Smartplaylisteditor dialog, ok then an export mode would be possible.


ok, if in future the smartplaylists are not anymore stored as sql querys, it could still be possible to store expert smartplaylist as sql querys. I will kept that in mind when i change the querybuilder.


On questions: why are you not just using the score weighted random mode for a smartplaylist?
Lemming
Karma
0

Re:Smart-Playlist: Expert Mode

Wed May 04, 2005 10:14 pm
DanielW wrote:
On questions: why are you not just using the score weighted random mode for a smartplaylist?


My query is custom, when it gets slow, I can tweak it, when it plays too much bad or too much top-rated songs, I can adjust the 100-value. I could also give a -50 on songs lower than 128kbit. Its just what I want.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft