Browse for albums added most recently ?

General discussion about the media server. Feature requests. Hints, tips and tricks.
Locked
w8rn8r
Posts:31
Joined:Mon Nov 26, 2007 12:34 pm
Location:Stuttgart, Germany
Browse for albums added most recently ?

Post by w8rn8r » Sat Jan 01, 2011 8:23 pm

Is there a way to have the Twonky server present a list of albums that have been added recently ?

Thanks,
Werner

User avatar
phibertron
Posts:1566
Joined:Sun Jan 30, 2011 5:52 pm
AV Hardware:Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: Browse for albums added most recently ?

Post by phibertron » Wed Mar 02, 2011 3:46 pm

If I had to guess on how to do it...

Takeing from what is done for the following playlist, it uses the filteron='pv:addedLast60'

<container name='playlistrecentlyadded' filteron='pv:addedLast60' sortcriteria='-pv:addedTime' createClass='object.item.audioItem.musicTrack' maxitems='500' upnp:originalTrackNumber='3' restricted='1' class='object.container.playlistContainer' flags='pv:smartplaylist=1' />

Takeing from what is done for the following playlist, it uses the buildon='upnp:album'

<container buildon='upnp:album' albumart='1' sortcriteria='+pv:numberOfThisDisc,+upnp:originalTrackNumber' createClass='object.item.audioItem.musicTrack' class='object.container.album.musicAlbum' />


I would attempt to create something like this using both buildon='upnp:album' and filteron='pv:addedLast60'
And make a new container looking something like this

<container buildon='upnp:album' name='Recently Added Albums' filteron='pv:addedLast60' albumart='1' sortcriteria='+pv:numberOfThisDisc,+upnp:originalTrackNumber' createClass='object.item.audioItem.musicTrack' class='object.container.album.musicAlbum' />

( I havent tryed this yet, but in theory it should work )
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

User avatar
phibertron
Posts:1566
Joined:Sun Jan 30, 2011 5:52 pm
AV Hardware:Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: Browse for albums added most recently ?

Post by phibertron » Wed Mar 02, 2011 4:34 pm

I went ahead and tryed it, it works but I made a few changes

If you want the tracks in the albums sorted by added time use this

<container name='Recently Added Albums' albumart='1' filteron='pv:addedLast60' sortcriteria='-pv:addedTime' createClass='object.item.audioItem.musicTrack' class='object.container.album.musicAlbum' >
<container buildon='upnp:album' albumart='1' filteron='pv:addedLast60' sortcriteria='-pv:addedTime' createClass='object.item.audioItem.musicTrack' class='object.container.album.musicAlbum' />
</container>

If you want the tracks ordered in the albums like track use this

<container name='Recently Added Albums' albumart='1' filteron='pv:addedLast60' sortcriteria='+pv:numberOfThisDisc,+upnp:originalTrackNumber' createClass='object.item.audioItem.musicTrack' class='object.container.album.musicAlbum' >
<container buildon='upnp:album' albumart='1' filteron='pv:addedLast60' sortcriteria='+pv:numberOfThisDisc,+upnp:originalTrackNumber' createClass='object.item.audioItem.musicTrack' class='object.container.album.musicAlbum' />
</container>

Note:
The returned list from either of the above examples

Will return a list of albums thats contents ONLY meet the filteron='pv:addedLast60'

will NOT sort the list of albums based on the sortcriteria (limitation of the buildon)
but it WILL do this for the contents of the returned or listed albums
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

User avatar
phibertron
Posts:1566
Joined:Sun Jan 30, 2011 5:52 pm
AV Hardware:Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: Browse for albums added most recently ?

Post by phibertron » Wed Mar 02, 2011 6:29 pm

I added some more examples on other ways to browse most recently here

http://twonkyforum.com/viewtopic.php?f= ... 320#p34320
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

User avatar
Briain
Posts:478
Joined:Thu Jan 03, 2008 8:07 pm
AV Hardware:Linn Klimax DS
Linn Majik DS-I
Linn Sneaky DS
WDTV Live Hib
Sonos 80
Location:Edinburgh, Scotland

Re: Browse for albums added most recently ?

Post by Briain » Wed Mar 02, 2011 7:18 pm

Hi

I tried something similar with TMS 5.1 and an early version of 6.0, but I found that it just listed all the albums on the server. I then contacted Christian about it and his thoughts were that it couldn't be done with the current server (I think that was back at about the 6.0.28 times; maybe even before then). I also mentioned it to Rick and he thought it was a great idea and was thinking of logging it as a future development plan. I was thus surprised to see you had achieved it and have just tried it for myself (both inside the Playlists container and as a separate container) but again, I found it just listed all the albums on the server; are you absolutely sure that's not what it is doing on yours as well (if not, I wonder if it's just because I'm using the Linux version of TMS 6.0.31 and it maybe behaves a bit differently)?

Bri

User avatar
phibertron
Posts:1566
Joined:Sun Jan 30, 2011 5:52 pm
AV Hardware:Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: Browse for albums added most recently ?

Post by phibertron » Wed Mar 02, 2011 8:39 pm

In my testing of this and other things, I had recently had to do a db rebuild
which of course flagged for me everything as recent
so this for me at the moment did return as you describe

filteron='pv:addedLast60' sortcriteria='-pv:addedTime'

But since the db was just rebuilt, I went and tested with the other two filteron scenarios

filteron='pv:playcount' sortcriteria='-pv:playcount'
filteron='pv:lastPlayedTime' sortcriteria='-pv:lastPlayedTime'

both of them worked as I thought, which was good
and from that I deduced that filteron='pv:addedLast60' sortcriteria='-pv:addedTime'
would act the same, but since I just rebuilt my db, I couldnt be 100% sure

I am running 6.0.31 on WHS

try the other two filteron scenarios, Im now curoius myself as to what you see
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

User avatar
phibertron
Posts:1566
Joined:Sun Jan 30, 2011 5:52 pm
AV Hardware:Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: Browse for albums added most recently ?

Post by phibertron » Wed Mar 02, 2011 10:30 pm

just did a bunch of tests, and none were good
I wish I hadnt rebuilt my db, would have seen this easier
the problem is even worse than using albums

if you use a buildon condition of any kind, all bets are off
It wil return the full list of that condition

the maxitems just limits the number of entries in each of those buildon containers

=(
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

User avatar
Briain
Posts:478
Joined:Thu Jan 03, 2008 8:07 pm
AV Hardware:Linn Klimax DS
Linn Majik DS-I
Linn Sneaky DS
WDTV Live Hib
Sonos 80
Location:Edinburgh, Scotland

Re: Browse for albums added most recently ?

Post by Briain » Thu Mar 03, 2011 1:17 pm

Hi

Yes, it would be a great new feature if the server code could be amended to enable some means to show last played and recently added albums.

I'd have thought that enabling a 'recently added albums' feature would not be too tricky, but the last played one is an interesting thought and could also enable other cool features. The issue would be when you only played a single track, then the grouping the last played tracks into albums would likely show it as an album with only one track in it (i.e. the last single track you played from that album). To resolve that one would require an additional function where you could look at any track and then list all tracks with that album name. That way, from that single 'last played' track you could then put on the whole album.

That enhancement would also bring other nice features to the party (though some of the below tricks refer to my own custom tree packs). Consider selecting a tune via the composer/album route. That works well for an album where all tracks are by the same composer, but on multi-composer albums, it will only show the tracks by the selected composer (it is working like two filters 'in series'). The above change to play an entire album from the last played track would be applicable to displaying and playing the entire album from that single composer search.

Again, this could be applied to the album artist containers (and this would also be usable in a standard Twonky tree). Consider using the artist/album route when selecting a single artist (who has only one track on a compilation). The album would currently show a single track (by the selected artist) whereas the same enhancement discussed above could enable you to view and then play the entire album on which that single artist resides.

If nothing else, I think the above would certainly be good discussion points for the next Twonky team meeting (maybe a good one to have for filling any embarrassingly quiet moments just after the one of the Twonky managers says 'well, has anyone got any cool new ideas for us to discuss?' :)

Bri

User avatar
phibertron
Posts:1566
Joined:Sun Jan 30, 2011 5:52 pm
AV Hardware:Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: Browse for albums added most recently ?

Post by phibertron » Sat Nov 05, 2011 9:09 pm

@Brian

I did some testing with 6.0.37 with the following
If you are running 6.0.37, I wonder if you are seeing some benefits that we didnt see before

Code: Select all

	<container name='Recently Added By Folder' filteron='pv:addedLast60' sortcriteria='-pv:addedTime' upnp:originalTrackNumber='6' createClass='object.item.videoItem.movie' class='object.container' >
		<container buildon='res' filteron='pv:addedLast60' sortcriteria='-pv:addedTime' createClass='object.item.videoItem.movie' class='object.container' />
	</container>

	<container name='Recently Added By Genre' filteron='pv:addedLast60' sortcriteria='-pv:addedTime' upnp:originalTrackNumber='7' createClass='object.item.videoItem.movie' class='object.container' >
		<container buildon='upnp:genre' filteron='pv:addedLast60' sortcriteria='-pv:addedTime' createClass='object.item.videoItem.movie' class='object.container' />
	</container>

	<container name='Recently Added By Album' filteron='pv:addedLast60' sortcriteria='-pv:addedTime' upnp:originalTrackNumber='8' createClass='object.item.videoItem.movie' class='object.container' >
		<container buildon='upnp:album' filteron='pv:addedLast60' sortcriteria='-pv:addedTime' createClass='object.item.videoItem.movie' class='object.container' />
	</container>

	<container name='Recently Added By Title' filteron='pv:addedLast60' sortcriteria='-pv:addedTime' upnp:originalTrackNumber='9' createClass='object.item.videoItem.movie' class='object.container' >
		<container buildon='dc:title[1]' filteron='pv:addedLast60' sortcriteria='-pv:addedTime' class='object.container' createClass='object.item.videoItem.movie' />
	</container>

	<container name='Recently Added By Year' filteron='pv:addedLast60' sortcriteria='-pv:addedTime' upnp:originalTrackNumber='10' createClass='object.item.videoItem.movie' class='object.container' >
		<container buildon='pv:year' filteron='pv:addedLast60' sortcriteria='-pv:addedTime' createClass='object.item.videoItem.movie' class='object.container' />
	</container>
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

User avatar
Briain
Posts:478
Joined:Thu Jan 03, 2008 8:07 pm
AV Hardware:Linn Klimax DS
Linn Majik DS-I
Linn Sneaky DS
WDTV Live Hib
Sonos 80
Location:Edinburgh, Scotland

Re: Browse for albums added most recently ?

Post by Briain » Sun Nov 06, 2011 6:18 pm

Hi Phibertron

Thanks for sending me a PM and thus alerting me to your findings! :)

I just very quickly tried it in the music container by adding it to the existing playlists and changing your createClass to music ones (see below code) but it still exhibits the same problem that I found when I first tried it (a few versions back) in that it just shows all the albums in the collection filed alphabetically (so it just looks like the standard albums container). On the test collection I tried it with, it just showed all 240 albums, so neither the date sort nor the list limit works when dealing with FLAC music files. It looks like the above will be very handy for video enthusiasts though! :)

Just to be complete, below shows the two musical iterations I tried; both simply listed all albums alphabetically.

Code: Select all

<container name='Recently Added Album' filteron='pv:addedLast60' sortcriteria='-pv:addedTime' createClass='object.item.audioItem.musicTrack' class='object.container' >
			<container buildon='upnp:album' filteron='pv:addedLast60' sortcriteria='-pv:addedTime' createClass='object.item.audioItem.musicTrack' class='object.container' />
</container>	
The second attempt was very similar, but I changed it to more closely resemble the format of a standard PV music albums container:

Code: Select all

<container name='Recently Added Album' filteron='pv:addedLast60' sortcriteria='-pv:addedTime' createClass='object.item.audioItem.musicTrack' class='object.container' >
			<container buildon='upnp:album' filteron='pv:addedLast60' sortcriteria='-pv:addedTime' createClass='object.item.audioItem.musicTrack' class='object.container.album.musicAlbum' />
</container>
As both tests failed, I didn't bother adding track and disk sort orders to the above test containers.

Bri

User avatar
phibertron
Posts:1566
Joined:Sun Jan 30, 2011 5:52 pm
AV Hardware:Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: Browse for albums added most recently ?

Post by phibertron » Sun Nov 06, 2011 8:35 pm

Thanks for checking that on your systems

As my music collection isnt that massive its hard to see the full impact on things of scale

I should have made it more clear that the albums are not being sorted by date as before
but what I did notice was that the data in the albums is now correct from an recently added point of view
Also the scenario plays out the same the other builldon types of genre, folder, etc.

I can see why this is even more important on a music collection,
and yeah on a video collection, it helps me in another way
what I am doing right now, is hen searching by genre or whatever
I am going to add a recent section to that genre
so I can browse more effectively
but its still not any where what we could really use

I have some programming experience, and did give this issue some more thought today

I know that when they do additions to the database for media, they are adding an field for that data
and one for lastupadted60

If they could just add these same fields for all of the data major database properties
but at a minimum to these
Album
Genre
Folder
It would probably make it a lot easier to code the logic to do what we are asking

For example say we added a file to twonky
It should update the timestamp for the itself and the timestamp to whatever meta data it contains in the db
So if it was in a certain folder, album, genre, etc
then those entreis in the database should have a timestamp of being upadated at that time also
if they do that, then it should not be that hard to adapt the logic to make this happen
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

Locked