mirror of
https://github.com/zoriya/flood.git
synced 2026-05-06 21:26:19 +00:00
Add TorrentCollection class and store torrents by hash
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
export function sortTorrents(torrents, sortBy) {
|
||||
export function sortTorrents(torrentsHash, sortBy) {
|
||||
let torrents = Object.keys(torrentsHash).map((hash) => {
|
||||
return {hash, ...torrentsHash[hash]};
|
||||
});
|
||||
|
||||
if (torrents.length) {
|
||||
let direction = sortBy.direction;
|
||||
let property = sortBy.property;
|
||||
|
||||
Reference in New Issue
Block a user