MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    UNSOLVED MMM-EasyPix - skip non-existend pics

    Requests
    2
    7
    140
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      Sven1894 last edited by

      I have different images that are displayed. Each of them has an MMM-EasyPix entry in the config. The images are switched through with MMM pages. Is there a way to jump directly to the next page if an image doesn’t exist in the pix folder?

      S S 2 Replies Last reply Reply Quote 0
      • S
        Sven1894 @Sven1894 last edited by

        Does nobody have an idea?

        1 Reply Last reply Reply Quote 0
        • S
          sdetweil @Sven1894 last edited by

          @Sven1894 nothing built in.

          you’d have to add code to detect the loading error, and try the next one

          Sam

          Create a working config
          How to add modules

          S 1 Reply Last reply Reply Quote 0
          • S
            Sven1894 @sdetweil last edited by

            @sdetweil do you have any Idea how I could detect the loading error?

            S 1 Reply Last reply Reply Quote 0
            • S
              sdetweil @Sven1894 last edited by sdetweil

              @Sven1894 see
              https://stackoverflow.com/questions/9815762/detect-when-an-image-fails-to-load-in-javascript

              there are a couple different ways depending how much you need/want to change

              Sam

              Create a working config
              How to add modules

              S 1 Reply Last reply Reply Quote 0
              • S
                Sven1894 @sdetweil last edited by

                @sdetweil Thank you that helped me a little bit.
                Do you know how I can send notifications to other modules with the MMM-EasyPix module?
                I tried

                image.onerror = this.sendNotification('Pic is not exisiting');
                

                but it didnt send a notification.

                S 1 Reply Last reply Reply Quote 0
                • S
                  sdetweil @Sven1894 last edited by

                  @Sven1894 from where?

                  Sam

                  Create a working config
                  How to add modules

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post
                  Enjoying MagicMirror? Please consider a donation!
                  MagicMirror created by Michael Teeuw.
                  Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                  This forum is using NodeBB as its core | Contributors
                  Contact | Privacy Policy