FAQ  •  Register  •  Login

last added?

<<

fizze

Serviio lover

Posts: 88

Joined: Wed Dec 02, 2009 8:27 am

Location: Austria

Post Tue Dec 22, 2009 8:13 pm

last added?

serviio 0.3 works quite stable, still one issue unnerves me.
The folder "last added" always seems to show the same content. How comes?

Does it depend on the mtime, or ctime of the files?
Is it only refreshed on startup? Which is weird, because new files are being picked up using inotify... ;)

Anyway, I've got quite a large library and I rely on the last added feature a lot, I can of course be your guinea pig if you require some testing.

keep up the good work, and open the source :P :D
Intel SS4200 - Ubuntu Server 8.04
LG BD - 390
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Tue Dec 22, 2009 9:09 pm

Re: last added?

The last added datetime is stored in the library and it's the date the file has been added to it, ie read by Serviio in a shared folder. This works for me, e.g. when i add a new file into a shared folder it's then appears as the first in 'Last added'.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Tue Dec 22, 2009 9:46 pm

Re: last added?

fizze wrote:keep up the good work, and open the source :P :D

If you want to help, look here: viewtopic.php?f=3&t=12
<<

fizze

Serviio lover

Posts: 88

Joined: Wed Dec 02, 2009 8:27 am

Location: Austria

Post Sun Dec 27, 2009 2:04 pm

Re: last added?

Last added definetley doesn't work right.
I've added a TV series, and while it showed up in the folder under the series and season, it doesn't show up under last added.

Is there a limit to the items last added?
How are they sorted?
What can I do to help you debug this?
Intel SS4200 - Ubuntu Server 8.04
LG BD - 390
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sun Dec 27, 2009 7:10 pm

Re: last added?

I just get the last 10 video items in the library, sorted by 'creation_date' DESC. I'm using Apache Derby DB, so if you find a way how to connect to it (stop Serviio first), run this query:

  Code:
SELECT * FROM media_item WHERE file_type = 'VIDEO' ORDER BY creation_date DESC OFFSET 0 ROWS FETCH FIRST 10 ROWS ONLY;


This should return last 10 added videos.

What device are you using btw?
<<

fizze

Serviio lover

Posts: 88

Joined: Wed Dec 02, 2009 8:27 am

Location: Austria

Post Mon Dec 28, 2009 6:29 pm

Re: last added?

I'm using the LG BD390 to as upnp client.
The select returns exactly those 10 titles shown on the BD390. ;)

I don't know about apache derby, but usually it isn't trivial for databases to sort and limit the results to a certain number of rows. The result then is only sorted within those 10 rows, for instance.

I'm an Oracle DBA, and this is certainly how it works with cursors there.
First of all, many creation_time fields have truncated time portion, as in 00:00:00. Not all though.

I compared the ctime of one file with the creation_time in the db.
This is the result:
  Code:
file ctime: 2009-12-19 11:45

serviio db's creation_time:
  Code:
2009-12-18 00:00:00.0


What's going on here?

Even if the creation_time isn't the ctime, but the mtime of the file, how can it be added before it was created in the fs?
Intel SS4200 - Ubuntu Server 8.04
LG BD - 390
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Dec 28, 2009 11:18 pm

Re: last added?

creation_time in db is the time the record was created, i.e. the time the file has been scanned by Serviio and added to the library. I am not sure why the time is 00:00:00, but will double check the code.
<<

fizze

Serviio lover

Posts: 88

Joined: Wed Dec 02, 2009 8:27 am

Location: Austria

Post Tue Dec 29, 2009 7:53 am

Re: last added?

Ok, so this is the correct time, the files ctime wouldn't make much sense. ;)

Any plans on making the
  Code:
FETCH FIRST 10 ROWS ONLY;
a configuration parameter?
Also I'd like to see a number of days modifier, so just show whatever has been added in the last 7 days, for instance, regardless of the number of items.
Intel SS4200 - Ubuntu Server 8.04
LG BD - 390
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Thu Dec 31, 2009 2:19 pm

Re: last added?

So there was a bug, the date it should look at is added_date, not creation_date (whichis a date related to the media item, eg when was a photo taken or cdate of the file). Fixed in 0.3.1.

The browse command will not be configurable at the moment. Is 10 not enough? It can be increased.
<<

fizze

Serviio lover

Posts: 88

Joined: Wed Dec 02, 2009 8:27 am

Location: Austria

Post Thu Dec 31, 2009 3:16 pm

Re: last added?

I guess 10 is ok. Making that an option isn't really a priority ;)
Glad you fixed the ctime bug though. I expect this feature to be much more useful in 0.3.1.

And no go out and have a few cold ones! :lol:
Happy New Year! :mrgreen:
Intel SS4200 - Ubuntu Server 8.04
LG BD - 390

Return to User experiences

Who is online

Users browsing this forum: No registered users and 14 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.