MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    MMM-EasyPix - skip non-existend pics

    Scheduled Pinned Locked Moved Unsolved Requests
    7 Posts 2 Posters 1.1k Views 2 Watching
    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 Offline
      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 Offline
        Sven1894 @Sven1894
        last edited by

        Does nobody have an idea?

        1 Reply Last reply Reply Quote 0
        • S Offline
          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

          How to add modules

          learning how to use browser developers window for css changes

          S 1 Reply Last reply Reply Quote 0
          • S Offline
            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 Offline
              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

              How to add modules

              learning how to use browser developers window for css changes

              S 1 Reply Last reply Reply Quote 0
              • S Offline
                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 Offline
                  sdetweil @Sven1894
                  last edited by

                  @Sven1894 from where?

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  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 Sam, technical setup by Karsten.
                  This forum is using NodeBB as its core | Contributors
                  Contact | Privacy Policy