Browse Source

fixed rTorrent showing leech on download item (#1785)

CauseFX 4 năm trước cách đây
mục cha
commit
2f9986ed28
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 3 2
      api/homepage/rtorrent.php

+ 3 - 2
api/homepage/rtorrent.php

@@ -4,7 +4,6 @@ trait RTorrentHomepageItem
 {
 	public function rTorrentSettingsArray($infoOnly = false)
 	{
-
 		$homepageInformation = [
 			'name' => 'rTorrent',
 			'enabled' => strpos('personal', $this->config['license']) !== false,
@@ -165,8 +164,10 @@ trait RTorrentHomepageItem
 			$state = 'Downloading';
 		} elseif ($completed && !$state && $status == 'seed') {
 			$state = 'Finished';
+		} elseif ($completed && !$state && $status == 'leech') {
+			$state = 'Finished';
 		}
-		return ($state) ? $state : $status;
+		return ($state) ?: $status;
 	}
 
 	public function getRTorrentHomepageQueue()