mirror of
https://github.com/immich-app/immich
synced 2025-06-09 05:58:04 +00:00
add device capability bitmask checks
This commit is contained in:
parent
5621ceb2d6
commit
032f1165f5
@ -270,6 +270,8 @@ class GCastService implements ICastDestinationService {
|
||||
currentAssetId = null;
|
||||
}
|
||||
|
||||
bool isDisplay(int ca) => (ca & 0x01) != 0;
|
||||
|
||||
@override
|
||||
Future<List<(String, CastDestinationType, dynamic)>> getDevices() async {
|
||||
final dests = await _gCastRepository.listDestinations();
|
||||
@ -282,7 +284,11 @@ class GCastService implements ICastDestinationService {
|
||||
device
|
||||
),
|
||||
)
|
||||
.where((device) => device.$3.extras["md"] != "Chromecast Audio")
|
||||
.toList(growable: false);
|
||||
.where((device) {
|
||||
final caString = device.$3.extras["ca"];
|
||||
final caNumber = int.tryParse(caString ?? "0") ?? 0;
|
||||
|
||||
return isDisplay(caNumber);
|
||||
}).toList(growable: false);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user