Page 1 of 1

Newest does not display newest albums

PostPosted: Sat Jun 13, 2009 10:55 pm
by bluetooth
This bug has been around forever, and I would dearly love to see it fixed. I had it when I was running subsonic on XP, and it continues now on vista platform as well.

For some reason, the newest album display gets wonky and albums are listed as newest that have not been modified for months (and months). If I go into the folder structure and list by date modified that display is correct.

Could subsonic display newest albums by last modified date? Or, does someone know why this bug is happening in the first place?

PostPosted: Sun Jun 14, 2009 8:07 am
by flacflac
I kind of have to concur - the updating process seems to somehow add albums that are not really new. I updated my server at around 10:30pm last night, and looked at the "Newest" page afterwards. This morning (after the 3am auto-update) I have 2 new albums, both of which are actually older. In the folder structure (Windows 7 based) the folder had been "modified" at around 10:30pm yesterday, for which I have no explanation. I keep checksum files and there was no modification detectable.

Still, is it possible the update process has some hiccups and modifies the folder itself? (though I don't know how it does it, without changing the files themselves...)

I understand that going by the last-modified date is very convenient - but it is also a bit shakey and sometimes adds albums that you might not even want to appear on the front page. I keep meta-data text files in each folder that also contain information on the date the album was added ("dateadded 2009-06-12"). Would it be possible for Subsonic to read that file and take the tag that reads "dateadded" as the date, and default back to the folder-modification date if that file is not available?

Just an idea.

Thanks Sindre. :)

PostPosted: Mon Jun 15, 2009 5:51 am
by flacflac
I took another look at this and I don't think it is Subsonic's fault: Windows generates thumbnail previous of folders, and whenever that happens the modified-date gets changed. Sorry for blaming Subsonic. Still yet, it is a weak method to identify newly added albums. ;)

flacflac

PostPosted: Mon Jun 15, 2009 12:36 pm
by bluetooth
I have to disagree with you flacflac. The modified list in windows explorer does not match the newest album list in subsonic. The first eight match, but then it breaks down.

If subsonic did follow the last modified list from windows, that would be great. I have no idea what subsonic is looking at to produce the newest list.

PostPosted: Fri Jul 24, 2009 2:38 pm
by bluetooth
I have some more information. I used Sharepod to update my iPod, and now those albums copied to my iPod are appearing in Subsonic as the newest albums.

So, I think this means Subsonic is using the Last Accessed Date rather than the Last Modified Date to determine newest albums.

If this is the case, is it possible to use Last Modified date instead? It would provide a far more realistic view of which albums are indeed newest.

PostPosted: Sat Jul 25, 2009 8:00 am
by sindre_mehus
It is indeed using the last-modified date. More specifically, it uses this Java method.

http://java.sun.com/j2se/1.5.0/docs/api ... tModified()

PostPosted: Sat Jul 25, 2009 1:16 pm
by bluetooth
Isn't that the strangest thing then. The list of albums displayed as newest does not match an explorer (windows) directory listing sorted by modified date.

Is this a known java bug?

PostPosted: Tue Jul 28, 2009 2:26 am
by mixmaster
bluetooth wrote:Isn't that the strangest thing then. The list of albums displayed as newest does not match an explorer (windows) directory listing sorted by modified date.

Is this a known java bug?


I haven't looked at the code, but my guess is this is not a bug, but perhaps a difference in how we define date modified. For instance, if you go and modify the contents of a file, Windows doesn't sort that folder as newly modified, whereas I believe in subsonic it will (like if you modified the tags). However, if you change the file's name (or create new files) then the folder will show as modified. So if it's a bug, call it a bug in Windows Explorer if you want, however I don't think that either piece of software has a bug as believe they were well thought out design decisions.
________