FireFly Media Server › Firefly Media Server Forums › Firefly Media Server › Feature Requests › File date as criterai for smartlist
- This topic has 9 replies, 3 voices, and was last updated 18 years, 3 months ago by fizze.
-
AuthorPosts
-
09/07/2006 at 2:26 PM #428drobsGuest
Hi,
Is this possible to use the dat eof creation or modification of the MP3 file as a criteria to build a smartlist ?
Thank you in advance
Didier
09/07/2006 at 9:13 PM #5487rpeddeParticipant@drobs wrote:
Hi,
Is this possible to use the dat eof creation or modification of the MP3 file as a criteria to build a smartlist ?
Thank you in advance
Didier
Maybe. There are three dates in the database:
time_added
time_modified
time_played
db_timestampOf them, time_added, is the time the file was added to the db. time_modified should be the last time the record was updated (so should db_timestamp, so I’m not sure why I have a db_timestamp, frankly), and time_played is the last time the song was played through the server.
10/07/2006 at 6:11 AM #5488drobsGuestThank you,
However could you please explain a bit more the syntax for using these fields in the query? How do I have to write a date DD/MM/YYYY, MM/DD/YYYY or other?
Moreover could you please indicate if there is some function to get the current date, like DateSys() or maybe simply Date()10/07/2006 at 11:12 AM #5489rpeddeParticipant@drobs wrote:
Thank you,
However could you please explain a bit more the syntax for using these fields in the query? How do I have to write a date DD/MM/YYYY, MM/DD/YYYY or other?
Moreover could you please indicate if there is some function to get the current date, like DateSys() or maybe simply Date()Ah, sorry. Try here
— Ron
10/07/2006 at 11:15 AM #5490fizzeParticipantso theres actually no such thing as the last file modification/creation date according to the os/fs ?
10/07/2006 at 11:26 AM #5491rpeddeParticipant@fizze wrote:
so theres actually no such thing as the last file modification/creation date according to the os/fs ?
Those are two different things.
You can almost get those things from a stat(2) call:
st_mtime Time when file data last modified. Changed by the mknod(2),
utimes(2) and write(2) system calls.
st_ctime Time when file status was last changed (inode data modifica-
tion). Changed by the chmod(2), chown(2), link(2),
mknod(2), rename(2), unlink(2), utimes(2) and write(2) sys-
tem calls.
mtime is definately last modified time, but ctime isn’t exactly creation time. So no, there really isn’t a creation date. Not one available via POSIX, anyway.
— Ron
10/07/2006 at 5:42 PM #549211/07/2006 at 6:38 AM #5493fizzeParticipant@rpedde wrote:
@fizze wrote:
so theres actually no such thing as the last file modification/creation date according to the os/fs ?
Those are two different things.
You can almost get those things from a stat(2) call:
mtime is definately last modified time, but ctime isn’t exactly creation time. So no, there really isn’t a creation date. Not one available via POSIX, anyway.
— Ron
duh 😛
I was actually reffering to mt-daapd and the smart playlists 😉
Thanks for the man stat 101 though 😮11/07/2006 at 7:06 AM #5494rpeddeParticipant@fizze wrote:
Thanks for the man stat 101 though 😮
rofl. np.
actually time_added is actually ctime, which is probably as close as you can get to creation time.
11/07/2006 at 11:23 AM #5495fizzeParticipantwell, Im thinking of something else here.
I like to rip some streams and save the songs/tracks as individual files.
In order to keep the “mix” right, I sort by date/time.I know streamripper f.i. has the ability to prefix index numbers to the filenames, so the filename actually becomes the primary criteria.
Thats sort of the setting I have in mind.
-
AuthorPosts
- The forum ‘Feature Requests’ is closed to new topics and replies.