GithubHelp home page GithubHelp logo

Comments (6)

TarheelGrad1998 avatar TarheelGrad1998 commented on August 29, 2024

Yes, unfortunately this is a limitation of the media source (which I assume you're using). It returns the file names but not the actual created date, so the files get sorted only by name. In your case that is sorting time before the date, which is not ideal.

You only really have two options at the moment:

  1. Change your node red to name the files something like %Y-%m-%d %H:%M, or
  2. Switch to using the files component (link) which can pre-sort the files by creation date.

If home assistant ever provides more file metadata in a media source I will update the card to better sort.

from gallery-card.

chrisrpi avatar chrisrpi commented on August 29, 2024

Ah...that makes perfect sense now.

Thank you for such a fast response, I shall make the change in Node Red as suggested.

Thank you!

from gallery-card.

kalhimeo avatar kalhimeo commented on August 29, 2024

First thanks a lot for your great card !
As you can only get the filenames from HA medias, I wondered if it would be possible to use the data from the "file_name_format" to sort the media files by date ?

from gallery-card.

TarheelGrad1998 avatar TarheelGrad1998 commented on August 29, 2024

First thanks a lot for your great card ! As you can only get the filenames from HA medias, I wondered if it would be possible to use the data from the "file_name_format" to sort the media files by date ?

That never occurred to me for some reason, but good idea!

I'll add to my backlog to add an option something like "sort by formatted name"

from gallery-card.

kalhimeo avatar kalhimeo commented on August 29, 2024

thank you very much :-)

from gallery-card.

TarheelGrad1998 avatar TarheelGrad1998 commented on August 29, 2024

This should be possible in v3.3 just released by switching on the parsed_date_sort option. Thanks to @kalhimeo for the assist.

from gallery-card.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.