mirror of
https://github.com/immich-app/immich
synced 2025-06-09 12:48:09 +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;
|
currentAssetId = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isDisplay(int ca) => (ca & 0x01) != 0;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<List<(String, CastDestinationType, dynamic)>> getDevices() async {
|
Future<List<(String, CastDestinationType, dynamic)>> getDevices() async {
|
||||||
final dests = await _gCastRepository.listDestinations();
|
final dests = await _gCastRepository.listDestinations();
|
||||||
@ -282,7 +284,11 @@ class GCastService implements ICastDestinationService {
|
|||||||
device
|
device
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.where((device) => device.$3.extras["md"] != "Chromecast Audio")
|
.where((device) {
|
||||||
.toList(growable: false);
|
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