Motrix Add a list which displays all downloading/downloaded files.

4uqofj5v  于 2022-10-25  发布在  其他
关注(0)|答案(2)|浏览(199)

Is your feature request related to a problem? Please describe.

It is annoying to change between downloading list and download list frequently. When I want to checkout the file downloaded, I have to change to downloaded list manually.

Describe the solution you'd like

There should be a list which called All items and display all the work items. Whatever the item is being downloading or has been downloaded.

Describe alternatives you've considered

Nothing.

Additional context

Nothing.

8qgya5xd

8qgya5xd1#

I've started to read the code and stuff. I'll work on this one as I think it's a good first issue.

kokeuurv

kokeuurv2#

Here's what I've made by adding something like this:

fetchAllTaskList (params = {}) {
  const { offset = 0, num = 20, keys } = params
  const activeArgs = compactUndefined([keys])
  const waitingAndStoppedArgs = compactUndefined([offset, num, keys])
  return new Promise((resolve, reject) => {
    this.client.multicall([
      [ 'aria2.tellActive', ...activeArgs ],
      [ 'aria2.tellWaiting', ...waitingAndStoppedArgs ],
      [ 'aria2.tellStopped', ...waitingAndStoppedArgs ]
    ]).then((data) => {
      console.log('fetchAllTaskList data', data)
      const result = mergeTaskResult(data)
      resolve(result)
    }).catch((err) => {
      console.log('fetchAllTaskList fail===>', err)
      reject(err)
    })
  })
}

And here's the result:

But I've got a question here. Are the results here sorted by some date? It doesn't look like that. It's just sorted by the aria2 RPC multicall order and the mergeTaskResult fn just concats the results. Do we have any method or something to sort the results?

相关问题