Skip to content

Commit c89c741

Browse files
authored
Merge pull request #236 from amitamrutiya2210/issue-play-pause
fix play/pause button issue on add torrent by file
2 parents ab8886b + 9995ec2 commit c89c741

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/Api/event_handler_api.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ class EventHandlerApi {
101101
try {
102102
TorrentModel torrentModel = TorrentModel.fromJson(newTorrentList[hash]);
103103
torrentModel.tags = torrentModel.tags.toSet().toList();
104+
if (torrentModel.status.contains('stopped') &&
105+
torrentModel.status.contains('downloading')) {
106+
torrentModel.status
107+
.removeWhere((element) => element.contains('downloading'));
108+
}
104109
torrentList.add(torrentModel);
105110
} catch (e) {
106111
print(e.toString());

0 commit comments

Comments
 (0)