PDA

View Full Version : Music Library - Recently Added Songs


Jace
2007-05-30, 19:17
Is there anyway to get the recently added songs in the music library versus the already available recently added albums? I ususally add new songs a couple from this album and a couple from that album and it would be great if I didn't have to try and remember all the newest ones. I don't think this is possible using smart playlists from what I have read and my search of the forums didn't turn anything up. I have some basic programming knowledge but have never played with the XBMC builds if that will be necessary. Love this programs...:D

Thanks,

Jason

Jace
2007-06-01, 05:18
Anybody have any suggestions?

jmarshall
2007-06-01, 05:30
Not currently implemented I don't think (can't remember if I added a lastadded param to smartplayists or not) but it'd be pretty easy to add it in.

A patch is welcome (you just have to come up with the sql query and add the generating of it in to SmartPlaylist.cpp - pretty easy stuff), otherwise you'll have to wait until I have some spare time.

Cheers,
Jonathan

Jace
2007-06-02, 00:51
OK. Any examples of previous patches that I could work from? I haven't tried this before but would be willing too give it a shot. Any information or tutorials available? Thanks

Jason

jmarshall
2007-06-02, 02:29
Well, I guess it depends on what you are wanting.

Currently, the only thing to go on in terms of "recently added" is the song id in the database.

New songs have higher song ids.

Unfortunately, this isn't particularly useful for smart playlists as it's not very friendly from a users point of view, who would be more interested in the date they were added (eg added in the last 2 weeks).

Perhaps a sort by criteria could be added to smart playlist for this instead. We can easily sort by date added (that's just song id) and limit. Will see if I can hack this up real quick.

Cheers,
Jonathan

jmarshall
2007-06-06, 00:45
I've added the above criteria for sort order.

It'll only work if you have a rule that matches all the songs you want to match if you use the GUI, but if you do one manually via XML you should be able to setup something that'll do recently added songs:


<smartplaylist>
<name>Recently Added</name>
<match>all</match>
<limit>100</limit>
<order direction="descending">dateadded</order>
</smartplaylist>


Next time I update the musicdatabase layout I'll add a date added field to it so that you can do better matching.

Cheers,
Jonathan

Jace
2007-06-08, 00:11
Thanks that would be great but the availability to use it in smart palylists created manually will give me everything I need at this point. I will wait for the next T3CH release to try this out, or I may try to learn how to build from the source files. Thanks again, I really appreciate the help.

Jason