[Rejected] Change DateAdded in Music to File created Date (1 Viewer)

jameson_uk

Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    Currently there is a trigger in the database which fires each time a row is inserted to the database. This means if you ever have to rebuild your database then any views based on the age become broken.

    This patch removes this trigger (hence the needed to update database version) and then changes the add and update methods to include the file created time. There is also correction of a typo in the index on composer table which is a bug in current code
     

    Attachments

    • Music_CreatedDate.patch
      8 KB

    rtv

    Retired Team Member
  • Premium Supporter
  • April 7, 2005
    3,622
    301
    Osnabruck
    Home Country
    Germany Germany
    AW: Change DateAdded in Music to File created Date

    IIRC we had this behaviour in MP long ago and hwahrmann made it more useful introducing the date based views.
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    Re: AW: Change DateAdded in Music to File created Date

    IIRC we had this behaviour in MP long ago and hwahrmann made it more useful introducing the date based views.

    Currently views are based on date file was added to database. if you do a clean install then re-import, all files will have the same date making the views far less useful

    Date based views still work but are now based on file created date not import date.
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Re: AW: Change DateAdded in Music to File created Date

    IIRC we had this behaviour in MP long ago and hwahrmann made it more useful introducing the date based views.

    Currently views are based on date file was added to database. if you do a clean install then re-import, all files will have the same date making the views far less useful

    Date based views still work but are now based on file created date not import date.

    Sounds more logical to me, but do we have some views that require the import date to be used? Like newly added or something similar.
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    Re: AW: Change DateAdded in Music to File created Date

    Sounds more logical to me, but do we have some views that require the import date to be used? Like newly added or something similar.
    I guess it depends how you classify recently added... if you count this as recently added to MP then the view would need it as is but I can not see that this is the way to do it as if you reinstall MP then everything is recently added.

    If you think of recently added to your collection then this patch will do that.

    Don't know what others think?
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    any other comments, thoughts?

    Thinking about it now I have a feeling that the change hwahrmann made was to add the ability to sort views on the dateAdded field. I am not changing this just changing the way in which dateAdded is populated which seems more logical and also removes a trigger from the database which could help speed up scans.
     

    arion_p

    Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    IMHO DateAdded should be the date a file is added to the library. The file date itself is irrelevant. I may have a USB stick that contains files I created 4 years ago, but if I copy them to my HTPC I want them to appear in the Recently Added view.

    Then if I were to sort by some other date, that would be the date of release of the song, not the date of the file itself.
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    A slightly different version has been implemented into SVN as part of 1.2 music updates
     

    Users who are viewing this thread

    Top Bottom