HISE Logo Forum
    • Categories
    • Register
    • Login

    How to handle failed downloads?

    Scheduled Pinned Locked Moved Scripting
    4 Posts 2 Posters 106 Views
    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.
    • T
      tomekslesicki
      last edited by

      If a download fails at some point, is it ok for me to call:

      if (this.data.finished && this.data.success == false)
      {
      	this.resume();
      }
      

      ...or should I handle it in some other way? Ideally, I'd not throw an error at a user, but make another attempt at downloading the failed file again.

      Thank you!

      d.healeyD 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey @tomekslesicki
        last edited by

        @tomekslesicki I think resume only works if the download has been stopped with Download.stop()

        I think if it fails you just need to restart it - and I think HISE will carry on from where it left off.

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        T 1 Reply Last reply Reply Quote 0
        • T
          tomekslesicki @d.healey
          last edited by

          @d-healey so I should just call

          Server.downloadFile
          

          again?

          d.healeyD 1 Reply Last reply Reply Quote 0
          • d.healeyD
            d.healey @tomekslesicki
            last edited by d.healey

            @tomekslesicki Yeah - try it and report back, and don't get stuck in an endless loop of failed downloads, give up after a few attempts.

            In my downloader I give up after 1 attempt so I don't have to deal with it ;)

            Libre Wave - Freedom respecting instruments and effects
            My Patreon - HISE tutorials
            YouTube Channel - Public HISE tutorials

            1 Reply Last reply Reply Quote 0
            • First post
              Last post

            26

            Online

            1.7k

            Users

            11.9k

            Topics

            103.4k

            Posts