diff --git a/CHANGELOG.md b/CHANGELOG.md index 09303d0..842c4b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 1.0.4 +- Fix torrent availability data type + ## 1.0.3 - Add forcedMetaDL torrent state - Add checking and moving torrent filter diff --git a/lib/src/v2/torrents/dto/torrent_info.dart b/lib/src/v2/torrents/dto/torrent_info.dart index 3ea0686..be14509 100644 --- a/lib/src/v2/torrents/dto/torrent_info.dart +++ b/lib/src/v2/torrents/dto/torrent_info.dart @@ -75,7 +75,7 @@ class TorrentInfo { /// Percentage of file pieces currently available @JsonKey(name: 'availability') - final int? availability; + final double? availability; /// Category of the torrent @JsonKey(name: 'category') diff --git a/lib/src/v2/torrents/dto/torrent_info.g.dart b/lib/src/v2/torrents/dto/torrent_info.g.dart index c829d78..955642b 100644 --- a/lib/src/v2/torrents/dto/torrent_info.g.dart +++ b/lib/src/v2/torrents/dto/torrent_info.g.dart @@ -10,7 +10,7 @@ TorrentInfo _$TorrentInfoFromJson(Map json) => TorrentInfo( addedOn: json['added_on'] as int?, amountLeft: json['amount_left'] as int?, autoTmm: json['auto_tmm'] as bool?, - availability: json['availability'] as int?, + availability: (json['availability'] as num?)?.toDouble(), category: json['category'] as String?, completed: json['completed'] as int?, completionOn: json['completion_on'] as int?, diff --git a/pubspec.yaml b/pubspec.yaml index df3603c..6bf1ce3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: qbittorrent_api description: This package provides methods for making requests to qBittorrent Web API using Dart. -version: 1.0.3 +version: 1.0.4 repository: https://github.com/yosemiteyss/qbittorrent_api environment: