File date as criterai for smartlist

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #428
    drobs
    Guest

    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

    #5487
    rpedde
    Participant

    @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_timestamp

    Of 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.

    #5488
    drobs
    Guest

    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()

    #5489
    rpedde
    Participant

    @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

    #5490
    fizze
    Participant

    so theres actually no such thing as the last file modification/creation date according to the os/fs ?

    #5491
    rpedde
    Participant

    @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

    #5492
    drobs
    Guest

    @rpedde wrote:

    Ah, sorry. Try here

    — Ron

    You are simply genious!

    Many Thanks.

    #5493
    fizze
    Participant

    @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 😮

    #5494
    rpedde
    Participant

    @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.

    #5495
    fizze
    Participant

    well, 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.

Viewing 10 posts - 1 through 10 (of 10 total)
  • The forum ‘Feature Requests’ is closed to new topics and replies.