mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-05-12 07:19:41 -04:00
bluetooth: fix codec parsing names
This commit is contained in:
@@ -172,7 +172,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
property bool _blurRegistered: false
|
property bool _blurRegistered: false
|
||||||
readonly property bool _shouldBlur: BlurService.enabled && blurBarWindow && blurBarWindow.registerBlurWidget && !(barConfig?.noBackground ?? false) && root.visible && root.width > 0
|
readonly property bool _shouldBlur: BlurService.enabled && !!blurBarWindow && !!blurBarWindow.registerBlurWidget && !(barConfig?.noBackground ?? false) && root.visible && root.width > 0
|
||||||
|
|
||||||
on_ShouldBlurChanged: _updateBlurRegistration()
|
on_ShouldBlurChanged: _updateBlurRegistration()
|
||||||
|
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ Singleton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getCodecInfo(codecName) {
|
function getCodecInfo(codecName) {
|
||||||
const codec = codecName.replace(/-/g, "_").toUpperCase();
|
const codec = codecName.replace(/[-\s]+/g, "_").toUpperCase();
|
||||||
|
|
||||||
const codecMap = {
|
const codecMap = {
|
||||||
"LDAC": {
|
"LDAC": {
|
||||||
@@ -406,8 +406,8 @@ Singleton {
|
|||||||
if (parts.length >= 2) {
|
if (parts.length >= 2) {
|
||||||
let profile = parts[0].trim();
|
let profile = parts[0].trim();
|
||||||
let description = parts[1];
|
let description = parts[1];
|
||||||
let codecMatch = description.match(/codec ([^\)\s]+)/i);
|
let codecMatch = description.match(/codec ([^\)]+)\)/i);
|
||||||
let codecName = codecMatch ? codecMatch[1].toUpperCase() : "UNKNOWN";
|
let codecName = codecMatch ? codecMatch[1].trim().toUpperCase() : "UNKNOWN";
|
||||||
let codecInfo = root.getCodecInfo(codecName);
|
let codecInfo = root.getCodecInfo(codecName);
|
||||||
if (codecInfo && !codecQueryProcess.availableCodecs.some(c => {
|
if (codecInfo && !codecQueryProcess.availableCodecs.some(c => {
|
||||||
return c.profile === profile;
|
return c.profile === profile;
|
||||||
@@ -480,8 +480,8 @@ Singleton {
|
|||||||
if (parts.length >= 2) {
|
if (parts.length >= 2) {
|
||||||
let profile = parts[0].trim();
|
let profile = parts[0].trim();
|
||||||
let description = parts[1];
|
let description = parts[1];
|
||||||
let codecMatch = description.match(/codec ([^\)\s]+)/i);
|
let codecMatch = description.match(/codec ([^\)]+)\)/i);
|
||||||
let codecName = codecMatch ? codecMatch[1].toUpperCase() : "UNKNOWN";
|
let codecName = codecMatch ? codecMatch[1].trim().toUpperCase() : "UNKNOWN";
|
||||||
let codecInfo = root.getCodecInfo(codecName);
|
let codecInfo = root.getCodecInfo(codecName);
|
||||||
if (codecInfo && !codecFullQueryProcess.availableCodecs.some(c => {
|
if (codecInfo && !codecFullQueryProcess.availableCodecs.some(c => {
|
||||||
return c.profile === profile;
|
return c.profile === profile;
|
||||||
|
|||||||
Reference in New Issue
Block a user