Recreate interrupted download when it is resumed
ClosedPublic

Authored by broulik on Nov 15 2018, 2:09 AM.

Details

Summary

When a download is canceled, finishes, or is interrupted (e.g. loss of network connection) we finish the KJob to remove it from notification area.
However, when a job was interrupted and is then resumed, the download ID is reused by the browser and we only get sent updates for a job we no longer have.
When we get a change event from interrupted to in_progress just pretend a new download was created and carry on as normal.

BUG: 401038

Test Plan
  • Started a download, cut my network, waited for it to fail, resumed it: now got a download job in notification area, previously nothing would happen
  • Canceling and restarting the download still works fine
  • Starting a new download still works fine

Diff Detail

Repository
R856 Plasma Browser Integration
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Nov 15 2018, 2:09 AM
Restricted Application added a project: Plasma. · View Herald TranscriptNov 15 2018, 2:09 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Nov 15 2018, 2:09 AM
fvogt accepted this revision.Nov 15 2018, 6:25 PM

Gave it a quick test as well, seems to work fine.

This revision is now accepted and ready to land.Nov 15 2018, 6:25 PM
This revision was automatically updated to reflect the committed changes.