Skip to content

Commit

Permalink
Merge pull request #236 from amitamrutiya2210/issue-play-pause
Browse files Browse the repository at this point in the history
fix play/pause button issue on add torrent by file
  • Loading branch information
Akshatji800 committed May 27, 2023
2 parents ab8886b + 9995ec2 commit c89c741
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/Api/event_handler_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ class EventHandlerApi {
try {
TorrentModel torrentModel = TorrentModel.fromJson(newTorrentList[hash]);
torrentModel.tags = torrentModel.tags.toSet().toList();
if (torrentModel.status.contains('stopped') &&
torrentModel.status.contains('downloading')) {
torrentModel.status
.removeWhere((element) => element.contains('downloading'));
}
torrentList.add(torrentModel);
} catch (e) {
print(e.toString());
Expand Down

0 comments on commit c89c741

Please sign in to comment.