mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 05:47:14 -04:00
adjust profile quality
This commit is contained in:
parent
1a81da5a8f
commit
7ad5a51828
@ -1017,7 +1017,29 @@ namespace MediaBrowser.Server.Implementations.Sync
|
|||||||
return hasProfile.GetDeviceProfile(target, quality);
|
return hasProfile.GetDeviceProfile(target, quality);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new CloudSyncProfile(true, false);
|
return GetDefaultProfile(quality);
|
||||||
|
}
|
||||||
|
|
||||||
|
private DeviceProfile GetDefaultProfile(string quality)
|
||||||
|
{
|
||||||
|
var profile = new CloudSyncProfile(true, false);
|
||||||
|
var maxBitrate = profile.MaxStaticBitrate;
|
||||||
|
|
||||||
|
if (maxBitrate.HasValue)
|
||||||
|
{
|
||||||
|
if (string.Equals(quality, "medium", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
maxBitrate = Convert.ToInt32(maxBitrate.Value * .75);
|
||||||
|
}
|
||||||
|
else if (string.Equals(quality, "low", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
maxBitrate = Convert.ToInt32(maxBitrate.Value * .5);
|
||||||
|
}
|
||||||
|
|
||||||
|
profile.MaxStaticBitrate = maxBitrate;
|
||||||
|
}
|
||||||
|
|
||||||
|
return profile;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<SyncQualityOption> GetQualityOptions(string targetId)
|
public IEnumerable<SyncQualityOption> GetQualityOptions(string targetId)
|
||||||
|
Loading…
Reference in New Issue
Block a user