mirror of
https://github.com/transmission/transmission
synced 2025-03-03 10:15:45 +00:00
Disable the stop ratio once it is reached (while seeding).
This commit is contained in:
parent
36bb16a66f
commit
7b78590acf
4 changed files with 11 additions and 3 deletions
|
@ -1776,6 +1776,7 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
|
|||
|
||||
[self updateTorrentsInQueue];
|
||||
[fInfoController updateInfoStats];
|
||||
[fInfoController updateRatioForTorrent: torrent];
|
||||
|
||||
if ([fDefaults boolForKey: @"PlaySeedingSound"])
|
||||
{
|
||||
|
|
|
@ -64,6 +64,8 @@
|
|||
- (void) updateInfoForTorrents: (NSArray *) torrents;
|
||||
- (void) updateInfoStats;
|
||||
|
||||
- (void) updateRatioForTorrent: (Torrent *) torrent;
|
||||
|
||||
- (void) setNextTab;
|
||||
- (void) setPreviousTab;
|
||||
|
||||
|
|
|
@ -433,9 +433,7 @@
|
|||
|
||||
- (void) updateInfoSettings
|
||||
{
|
||||
int numberSelected = [fTorrents count];
|
||||
|
||||
if (numberSelected > 0)
|
||||
if ([fTorrents count] > 0)
|
||||
{
|
||||
Torrent * torrent;
|
||||
|
||||
|
@ -554,6 +552,12 @@
|
|||
[self updateInfoStats];
|
||||
}
|
||||
|
||||
- (void) updateRatioForTorrent: (Torrent *) torrent
|
||||
{
|
||||
if ([fTorrents containsObject: torrent])
|
||||
[self updateInfoSettings];
|
||||
}
|
||||
|
||||
- (int) stateSettingToPopUpIndex: (int) index
|
||||
{
|
||||
if (index == NSOnState)
|
||||
|
|
|
@ -298,6 +298,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
|||
|
||||
fFinishedSeeding = YES;
|
||||
|
||||
[self setRatioSetting: NSOffState];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName: @"TorrentStoppedForRatio" object: self];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue