Hermes Agent commited on
Commit
bf5636a
·
1 Parent(s): 01c5f0d

feat(branding): replace webapp logos with Apex Delta vector icon and scrub server URL from Jellyfin APK

Browse files
apex/combined-entrypoint.sh CHANGED
@@ -247,7 +247,7 @@ PY
247
  printf '%s\n' "$JELLYFIN_SERVER_ID" > "$SERVER_ID_FILE"
248
  fi
249
 
250
- if [ -f "$SYSTEM_XML" ]; then
251
  python3 - "$SYSTEM_XML" "$JELLYFIN_SERVER_ID" <<'PY'
252
  import re
253
  import sys
@@ -284,7 +284,7 @@ path.write_text(text, encoding="utf-8")
284
  PY
285
  cp -f "$SYSTEM_XML" "/data/jellyfin/config/system.xml" 2>/dev/null || true
286
  echo "[JELLYFIN] Configured server name as Apex in $SYSTEM_XML"
287
- fi
288
 
289
  # Ensure custom CSS in branding.xml does not force theme into admin pages
290
  for bcfg in "$LOCAL_ROOT/config/branding.xml" "/data/jellyfin/config/branding.xml"; do
 
247
  printf '%s\n' "$JELLYFIN_SERVER_ID" > "$SERVER_ID_FILE"
248
  fi
249
 
250
+ mkdir -p "$LOCAL_ROOT/config" "/data/jellyfin/config"
251
  python3 - "$SYSTEM_XML" "$JELLYFIN_SERVER_ID" <<'PY'
252
  import re
253
  import sys
 
284
  PY
285
  cp -f "$SYSTEM_XML" "/data/jellyfin/config/system.xml" 2>/dev/null || true
286
  echo "[JELLYFIN] Configured server name as Apex in $SYSTEM_XML"
287
+
288
 
289
  # Ensure custom CSS in branding.xml does not force theme into admin pages
290
  for bcfg in "$LOCAL_ROOT/config/branding.xml" "/data/jellyfin/config/branding.xml"; do
apex/gateway/utils.py CHANGED
@@ -298,6 +298,20 @@ async def proxy_http_request(
298
  except Exception:
299
  pass
300
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
301
  # Direct Play Optimization: Force DirectPlay & DirectStream in PlaybackInfo responses
302
  # for .strm items so modern browsers and devices stream natively without HLS CPU transcoding
303
  if "application/json" in content_type and "playbackinfo" in request.url.path.lower() and content:
 
298
  except Exception:
299
  pass
300
 
301
+ # Ensure clean ServerName everywhere: never expose container hostname or server URL in system info
302
+ if "application/json" in content_type and any(k in request.url.path.lower() for k in ("system/info", "system/configuration")) and content:
303
+ try:
304
+ import json
305
+ info_data = json.loads(content.decode("utf-8"))
306
+ if isinstance(info_data, dict):
307
+ if "ServerName" in info_data:
308
+ info_data["ServerName"] = "Apex"
309
+ if "Name" in info_data and any(x in str(info_data.get("Name", "")).lower() for x in ("r-jishnupg", "hf.space", "http")):
310
+ info_data["Name"] = "Apex"
311
+ content = json.dumps(info_data).encode("utf-8")
312
+ except Exception:
313
+ pass
314
+
315
  # Direct Play Optimization: Force DirectPlay & DirectStream in PlaybackInfo responses
316
  # for .strm items so modern browsers and devices stream natively without HLS CPU transcoding
317
  if "application/json" in content_type and "playbackinfo" in request.url.path.lower() and content:
apex/repair_jellyfin_libraries.py CHANGED
@@ -764,6 +764,19 @@ def repair_system_xml(configs=None):
764
  " <IsStartupWizardCompleted>true</IsStartupWizardCompleted>\n</SystemConfiguration>"
765
  )
766
  changed = True
 
 
 
 
 
 
 
 
 
 
 
 
 
767
  if changed:
768
  with open(cfg, "w", encoding="utf-8") as f:
769
  f.write(content)
 
764
  " <IsStartupWizardCompleted>true</IsStartupWizardCompleted>\n</SystemConfiguration>"
765
  )
766
  changed = True
767
+ import re
768
+ if "<ServerName>" in content:
769
+ if not re.search(r"<ServerName>Apex</ServerName>", content):
770
+ content = re.sub(r"<ServerName>[^<]*</ServerName>", "<ServerName>Apex</ServerName>", content)
771
+ changed = True
772
+ elif "</SystemConfiguration>" in content:
773
+ content = content.replace(
774
+ "</SystemConfiguration>",
775
+ " <ServerName>Apex</ServerName>
776
+ </SystemConfiguration>"
777
+ )
778
+ changed = True
779
+
780
  if changed:
781
  with open(cfg, "w", encoding="utf-8") as f:
782
  f.write(content)
apex/ui/abyss.css CHANGED
@@ -3597,23 +3597,23 @@ button[aria-label="menu"],
3597
  Apex Official Delta Logo Branding (Pure OLED Pitch Black + Solid White)
3598
  ========================================================================== */
3599
  .imgLogoIcon,
3600
- .adminDrawerLogo img {
3601
- content: url('/ui/apex-logo.svg') !important;
3602
- max-height: 36px !important;
3603
- object-fit: contain !important;
3604
- }
3605
-
3606
  .pageTitleWithLogo {
3607
- background-image: url('/ui/apex-logo.svg') !important;
 
3608
  background-size: contain !important;
3609
  background-repeat: no-repeat !important;
3610
  background-position: left center !important;
3611
- min-height: 36px !important;
 
 
3612
  }
3613
 
3614
  .splashLogo,
3615
  #splashScreen .splashLogo {
3616
- background-image: url('/ui/apex-logo.svg') !important;
3617
  background-size: contain !important;
3618
  background-repeat: no-repeat !important;
3619
  background-position: center !important;
@@ -3621,6 +3621,25 @@ button[aria-label="menu"],
3621
  height: 120px !important;
3622
  }
3623
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3624
  /* ==========================================================================
3625
  Android TV & Apple TV+ Professional Streaming UI Engine
3626
  ========================================================================== */
 
3597
  Apex Official Delta Logo Branding (Pure OLED Pitch Black + Solid White)
3598
  ========================================================================== */
3599
  .imgLogoIcon,
3600
+ .adminDrawerLogo img,
3601
+ .headerLogo img,
3602
+ .pageTitleWithDefaultLogo,
 
 
 
3603
  .pageTitleWithLogo {
3604
+ content: url('apex-logo.svg') !important;
3605
+ background-image: url('apex-logo.svg') !important;
3606
  background-size: contain !important;
3607
  background-repeat: no-repeat !important;
3608
  background-position: left center !important;
3609
+ max-height: 36px !important;
3610
+ max-width: 36px !important;
3611
+ object-fit: contain !important;
3612
  }
3613
 
3614
  .splashLogo,
3615
  #splashScreen .splashLogo {
3616
+ background-image: url('apex-logo.svg') !important;
3617
  background-size: contain !important;
3618
  background-repeat: no-repeat !important;
3619
  background-position: center !important;
 
3621
  height: 120px !important;
3622
  }
3623
 
3624
+ /* Modern Drawer Server Brand Card */
3625
+ .mainDrawer .navMenuOption.lnkMediaFolder.btnSelectServer,
3626
+ .mainDrawer .navMenuOption.btnSelectServer,
3627
+ .mainDrawer .adminDrawerLogo,
3628
+ .mainDrawer .navMenuHeader {
3629
+ background: rgba(22, 22, 32, 0.7) !important;
3630
+ border: 1px solid rgba(255, 255, 255, 0.08) !important;
3631
+ border-radius: 14px !important;
3632
+ margin: 10px 14px 14px !important;
3633
+ padding: 10px 14px !important;
3634
+ }
3635
+
3636
+ /* Never show raw container hostname or server URL in the UI */
3637
+ .mainDrawer .serverUrl,
3638
+ .mainDrawer .serverAddress,
3639
+ .manualServerAddress {
3640
+ display: none !important;
3641
+ }
3642
+
3643
  /* ==========================================================================
3644
  Android TV & Apple TV+ Professional Streaming UI Engine
3645
  ========================================================================== */
apex/ui/apex-logo.png CHANGED
apex/ui/apex-logo.svg CHANGED
apex/ui/favicon.png CHANGED
apex/ui/spotlight-loader.js CHANGED
@@ -447,9 +447,15 @@
447
  });
448
  }
449
 
 
 
 
 
 
450
  function installApexBranding() {
451
  safe(function () {
452
- var logoSvgUrl = "/ui/apex-logo.svg";
 
453
  // 1. Favicon sync
454
  var links = document.querySelectorAll("link[rel*='icon']");
455
  for (var i = 0; i < links.length; i++) {
@@ -467,14 +473,35 @@
467
  document.head.appendChild(link);
468
  }
469
 
470
- // 2. Header and Drawer Logos
471
- var logos = document.querySelectorAll(".imgLogoIcon, .adminDrawerLogo img");
 
 
472
  for (var j = 0; j < logos.length; j++) {
473
- var img = logos[j];
474
- if (img.src && !img.src.includes("apex-logo.svg")) {
475
- img.src = logoSvgUrl;
 
 
 
 
 
 
 
 
 
 
 
 
 
476
  }
477
  }
 
 
 
 
 
 
478
  });
479
  }
480
 
@@ -702,13 +729,26 @@
702
  function replaceServerNameText() {
703
  try {
704
  if (!document.body) return;
 
705
  var walker = document.createTreeWalker(document.body, NodeFilter.SHOW_TEXT, null, false);
706
  var node;
707
  while ((node = walker.nextNode())) {
708
- if (node.nodeValue && /r-jishnupg-[a-z0-9-]+/i.test(node.nodeValue)) {
709
- node.nodeValue = node.nodeValue.replace(/r-jishnupg-[a-z0-9-]+/gi, "Apex");
710
  }
711
  }
 
 
 
 
 
 
 
 
 
 
 
 
712
  } catch (e) {}
713
  }
714
 
 
447
  });
448
  }
449
 
450
+ var APEX_DELTA_SVG =
451
+ '<svg class="apex-delta-icon" viewBox="215 376 1460 1460" width="28" height="28" style="display:inline-block;vertical-align:middle;max-width:32px;max-height:32px;object-fit:contain;" aria-label="Apex">' +
452
+ '<path d="M 1502.4 446.5 L 1491.9 446.5 L 1488.4 443.0 L 1439.4 443.0 L 1435.9 446.5 L 1425.4 446.5 L 1421.9 450.0 L 1411.3 450.0 L 1400.8 457.0 L 1390.3 457.0 L 1386.8 460.5 L 1379.8 460.5 L 1376.3 464.0 L 1369.3 464.0 L 1365.8 467.5 L 1358.8 467.5 L 1355.3 471.0 L 1348.3 471.0 L 1344.8 474.5 L 1337.8 474.5 L 1334.3 478.0 L 1327.3 478.0 L 1323.8 481.5 L 1316.8 481.5 L 1313.3 485.0 L 1306.3 485.0 L 1302.7 488.5 L 1295.7 488.5 L 1292.2 492.1 L 1285.2 492.1 L 1281.7 495.6 L 1274.7 495.6 L 1271.2 499.1 L 1264.2 499.1 L 1253.7 506.1 L 1243.2 506.1 L 1239.7 509.6 L 1232.7 509.6 L 1229.2 513.1 L 1222.2 513.1 L 1218.7 516.6 L 1211.7 516.6 L 1201.2 523.6 L 1194.1 523.6 L 1190.6 527.1 L 1180.1 527.1 L 1169.6 534.1 L 1162.6 534.1 L 1159.1 537.6 L 1148.6 537.6 L 1138.1 544.6 L 1127.6 544.6 L 1124.1 548.1 L 1117.1 548.1 L 1113.6 551.6 L 1110.1 551.6 L 1106.6 555.1 L 1096.1 555.1 L 1085.6 562.1 L 1078.5 562.1 L 1075.0 565.6 L 1064.5 565.6 L 1054.0 572.6 L 1047.0 572.6 L 1043.5 576.1 L 1033.0 576.1 L 1022.5 583.1 L 1015.5 583.1 L 1012.0 586.6 L 1001.5 586.6 L 991.0 593.6 L 984.0 593.6 L 980.5 597.1 L 969.9 597.1 L 966.4 600.6 L 959.4 600.6 L 955.9 604.2 L 952.4 604.2 L 948.9 607.7 L 941.9 607.7 L 938.4 611.2 L 931.4 611.2 L 927.9 614.7 L 917.4 614.7 L 906.9 621.7 L 899.9 621.7 L 896.4 625.2 L 889.4 625.2 L 885.9 628.7 L 878.9 628.7 L 875.4 632.2 L 868.4 632.2 L 864.9 635.7 L 857.8 635.7 L 854.3 639.2 L 847.3 639.2 L 843.8 642.7 L 836.8 642.7 L 833.3 646.2 L 822.8 646.2 L 812.3 653.2 L 805.3 653.2 L 801.8 656.7 L 794.8 656.7 L 791.3 660.2 L 784.3 660.2 L 780.8 663.7 L 773.8 663.7 L 770.3 667.2 L 763.3 667.2 L 759.8 670.7 L 752.8 670.7 L 749.2 674.2 L 742.2 674.2 L 738.7 677.7 L 731.7 677.7 L 728.2 681.2 L 721.2 681.2 L 717.7 684.7 L 710.7 684.7 L 707.2 688.2 L 700.2 688.2 L 696.7 691.7 L 689.7 691.7 L 686.2 695.2 L 679.2 695.2 L 675.7 698.7 L 668.7 698.7 L 665.2 702.2 L 658.2 702.2 L 654.7 705.7 L 647.7 705.7 L 644.2 709.2 L 637.1 709.2 L 633.6 712.7 L 626.6 712.7 L 623.1 716.3 L 616.1 716.3 L 612.6 719.8 L 605.6 719.8 L 602.1 723.3 L 595.1 723.3 L 591.6 726.8 L 584.6 726.8 L 581.1 730.3 L 574.1 730.3 L 570.6 733.8 L 563.6 733.8 L 560.1 737.3 L 553.1 737.3 L 549.6 740.8 L 542.6 740.8 L 539.1 744.3 L 532.1 744.3 L 528.5 747.8 L 521.5 747.8 L 518.0 751.3 L 511.0 751.3 L 507.5 754.8 L 500.5 754.8 L 497.0 758.3 L 490.0 758.3 L 486.5 761.8 L 479.5 761.8 L 476.0 765.3 L 469.0 765.3 L 465.5 768.8 L 458.5 768.8 L 455.0 772.3 L 448.0 772.3 L 444.5 775.8 L 437.5 775.8 L 434.0 779.3 L 427.0 779.3 L 423.5 782.8 L 416.4 782.8 L 412.9 786.3 L 405.9 786.3 L 402.4 789.8 L 395.4 789.8 L 391.9 793.3 L 384.9 793.3 L 381.4 796.8 L 374.4 796.8 L 363.9 803.8 L 360.4 803.8 L 353.4 810.8 L 349.9 810.8 L 342.9 817.8 L 339.4 817.8 L 318.4 838.9 L 318.4 842.4 L 307.9 852.9 L 307.9 856.4 L 304.3 859.9 L 304.3 863.4 L 297.3 873.9 L 297.3 880.9 L 290.3 891.4 L 290.3 905.4 L 286.8 908.9 L 286.8 958.0 L 290.3 961.5 L 290.3 972.0 L 293.8 975.5 L 293.8 982.5 L 297.3 986.0 L 297.3 993.0 L 304.3 1003.5 L 304.3 1007.0 L 311.4 1014.0 L 311.4 1017.5 L 325.4 1031.5 L 325.4 1035.0 L 335.9 1045.5 L 339.4 1045.5 L 346.4 1052.6 L 349.9 1052.6 L 356.9 1059.6 L 360.4 1059.6 L 363.9 1063.1 L 367.4 1063.1 L 370.9 1066.6 L 374.4 1066.6 L 377.9 1070.1 L 381.4 1070.1 L 384.9 1073.6 L 388.4 1073.6 L 398.9 1080.6 L 405.9 1080.6 L 409.4 1084.1 L 412.9 1084.1 L 416.4 1087.6 L 420.0 1087.6 L 423.5 1091.1 L 427.0 1091.1 L 437.5 1098.1 L 441.0 1098.1 L 451.5 1105.1 L 455.0 1105.1 L 458.5 1108.6 L 462.0 1108.6 L 469.0 1115.6 L 472.5 1115.6 L 476.0 1119.1 L 479.5 1119.1 L 483.0 1122.6 L 486.5 1122.6 L 493.5 1129.6 L 497.0 1129.6 L 500.5 1133.1 L 504.0 1133.1 L 507.5 1136.6 L 511.0 1136.6 L 518.0 1143.6 L 521.5 1143.6 L 528.5 1150.6 L 532.1 1150.6 L 539.1 1157.7 L 542.6 1157.7 L 546.1 1161.2 L 549.6 1161.2 L 560.1 1171.7 L 563.6 1171.7 L 570.6 1178.7 L 574.1 1178.7 L 581.1 1185.7 L 584.6 1185.7 L 595.1 1196.2 L 598.6 1196.2 L 609.1 1206.7 L 612.6 1206.7 L 623.1 1217.2 L 626.6 1217.2 L 640.7 1231.2 L 644.2 1231.2 L 665.2 1252.2 L 668.7 1252.2 L 693.2 1276.8 L 696.7 1276.8 L 700.2 1280.3 L 700.2 1283.8 L 703.7 1287.3 L 707.2 1287.3 L 763.3 1343.3 L 763.3 1346.8 L 791.3 1374.8 L 791.3 1378.3 L 805.3 1392.4 L 805.3 1395.9 L 822.8 1413.4 L 822.8 1416.9 L 833.3 1427.4 L 833.3 1430.9 L 843.8 1441.4 L 843.8 1444.9 L 854.3 1455.4 L 854.3 1458.9 L 861.3 1465.9 L 861.3 1469.4 L 868.4 1476.4 L 868.4 1479.9 L 875.4 1486.9 L 875.4 1490.5 L 882.4 1497.5 L 882.4 1501.0 L 889.4 1508.0 L 889.4 1511.5 L 892.9 1515.0 L 892.9 1518.5 L 899.9 1525.5 L 899.9 1529.0 L 903.4 1532.5 L 903.4 1536.0 L 910.4 1543.0 L 910.4 1546.5 L 913.9 1550.0 L 913.9 1553.5 L 920.9 1560.5 L 920.9 1564.0 L 924.4 1567.5 L 924.4 1571.0 L 927.9 1574.5 L 927.9 1578.0 L 931.4 1581.5 L 931.4 1585.0 L 934.9 1588.5 L 934.9 1592.0 L 938.4 1595.5 L 938.4 1599.0 L 941.9 1602.6 L 941.9 1606.1 L 948.9 1616.6 L 948.9 1620.1 L 952.4 1623.6 L 952.4 1627.1 L 955.9 1630.6 L 955.9 1634.1 L 959.4 1637.6 L 959.4 1641.1 L 966.4 1651.6 L 966.4 1658.6 L 973.5 1665.6 L 973.5 1672.6 L 977.0 1676.1 L 977.0 1679.6 L 980.5 1683.1 L 980.5 1686.6 L 987.5 1697.1 L 987.5 1700.6 L 991.0 1704.1 L 991.0 1707.6 L 1001.5 1718.2 L 1001.5 1721.7 L 1022.5 1742.7 L 1026.0 1742.7 L 1033.0 1749.7 L 1036.5 1749.7 L 1043.5 1756.7 L 1050.5 1756.7 L 1054.0 1760.2 L 1057.5 1760.2 L 1061.0 1763.7 L 1068.0 1763.7 L 1071.5 1767.2 L 1082.0 1767.2 L 1085.6 1770.7 L 1134.6 1770.7 L 1138.1 1767.2 L 1148.6 1767.2 L 1152.1 1763.7 L 1159.1 1763.7 L 1169.6 1756.7 L 1176.6 1756.7 L 1183.6 1749.7 L 1187.1 1749.7 L 1194.1 1742.7 L 1197.7 1742.7 L 1222.2 1718.2 L 1222.2 1714.7 L 1229.2 1707.6 L 1229.2 1704.1 L 1232.7 1700.6 L 1232.7 1697.1 L 1239.7 1686.6 L 1239.7 1679.6 L 1246.7 1669.1 L 1246.7 1662.1 L 1250.2 1658.6 L 1250.2 1651.6 L 1253.7 1648.1 L 1253.7 1641.1 L 1257.2 1637.6 L 1257.2 1630.6 L 1260.7 1627.1 L 1260.7 1620.1 L 1264.2 1616.6 L 1264.2 1609.6 L 1267.7 1606.1 L 1267.7 1599.0 L 1274.7 1588.5 L 1274.7 1578.0 L 1281.7 1567.5 L 1281.7 1557.0 L 1288.7 1546.5 L 1288.7 1539.5 L 1292.2 1536.0 L 1292.2 1529.0 L 1295.7 1525.5 L 1295.7 1518.5 L 1299.2 1515.0 L 1299.2 1508.0 L 1302.7 1504.5 L 1302.7 1497.5 L 1306.3 1494.0 L 1306.3 1486.9 L 1309.8 1483.4 L 1309.8 1476.4 L 1313.3 1472.9 L 1313.3 1465.9 L 1316.8 1462.4 L 1316.8 1455.4 L 1320.3 1451.9 L 1320.3 1444.9 L 1323.8 1441.4 L 1323.8 1434.4 L 1327.3 1430.9 L 1327.3 1423.9 L 1330.8 1420.4 L 1330.8 1413.4 L 1334.3 1409.9 L 1334.3 1402.9 L 1337.8 1399.4 L 1337.8 1392.4 L 1341.3 1388.9 L 1341.3 1381.9 L 1344.8 1378.3 L 1344.8 1371.3 L 1351.8 1360.8 L 1351.8 1353.8 L 1355.3 1350.3 L 1355.3 1343.3 L 1358.8 1339.8 L 1358.8 1332.8 L 1362.3 1329.3 L 1362.3 1322.3 L 1365.8 1318.8 L 1365.8 1311.8 L 1369.3 1308.3 L 1369.3 1301.3 L 1372.8 1297.8 L 1372.8 1290.8 L 1376.3 1287.3 L 1376.3 1280.3 L 1379.8 1276.8 L 1379.8 1269.8 L 1383.3 1266.2 L 1383.3 1259.2 L 1386.8 1255.7 L 1386.8 1248.7 L 1390.3 1245.2 L 1390.3 1238.2 L 1393.8 1234.7 L 1393.8 1227.7 L 1397.3 1224.2 L 1397.3 1217.2 L 1404.3 1206.7 L 1404.3 1199.7 L 1407.8 1196.2 L 1407.8 1185.7 L 1414.8 1175.2 L 1414.8 1168.2 L 1418.4 1164.7 L 1418.4 1157.7 L 1421.9 1154.1 L 1421.9 1147.1 L 1425.4 1143.6 L 1425.4 1136.6 L 1428.9 1133.1 L 1428.9 1126.1 L 1432.4 1122.6 L 1432.4 1115.6 L 1435.9 1112.1 L 1435.9 1105.1 L 1439.4 1101.6 L 1439.4 1094.6 L 1442.9 1091.1 L 1442.9 1084.1 L 1446.4 1080.6 L 1446.4 1073.6 L 1449.9 1070.1 L 1449.9 1063.1 L 1453.4 1059.6 L 1453.4 1052.6 L 1460.4 1042.0 L 1460.4 1031.5 L 1467.4 1021.0 L 1467.4 1014.0 L 1470.9 1010.5 L 1470.9 1003.5 L 1474.4 1000.0 L 1474.4 989.5 L 1481.4 979.0 L 1481.4 972.0 L 1484.9 968.5 L 1484.9 961.5 L 1488.4 958.0 L 1488.4 951.0 L 1491.9 947.5 L 1491.9 940.5 L 1495.4 937.0 L 1495.4 929.9 L 1498.9 926.4 L 1498.9 919.4 L 1502.4 915.9 L 1502.4 908.9 L 1509.4 898.4 L 1509.4 887.9 L 1512.9 884.4 L 1512.9 877.4 L 1516.4 873.9 L 1516.4 866.9 L 1523.4 856.4 L 1523.4 849.4 L 1526.9 845.9 L 1526.9 835.4 L 1534.0 824.9 L 1534.0 817.8 L 1537.5 814.3 L 1537.5 807.3 L 1541.0 803.8 L 1541.0 796.8 L 1544.5 793.3 L 1544.5 786.3 L 1548.0 782.8 L 1548.0 775.8 L 1551.5 772.3 L 1551.5 765.3 L 1555.0 761.8 L 1555.0 754.8 L 1558.5 751.3 L 1558.5 744.3 L 1562.0 740.8 L 1562.0 733.8 L 1565.5 730.3 L 1565.5 723.3 L 1569.0 719.8 L 1569.0 712.7 L 1572.5 709.2 L 1572.5 702.2 L 1576.0 698.7 L 1576.0 691.7 L 1579.5 688.2 L 1579.5 681.2 L 1586.5 670.7 L 1586.5 663.7 L 1590.0 660.2 L 1590.0 653.2 L 1593.5 649.7 L 1593.5 642.7 L 1597.0 639.2 L 1597.0 632.2 L 1600.5 628.7 L 1600.5 618.2 L 1604.0 614.7 L 1604.0 551.6 L 1600.5 548.1 L 1600.5 541.1 L 1597.0 537.6 L 1597.0 534.1 L 1593.5 530.6 L 1593.5 527.1 L 1590.0 523.6 L 1590.0 516.6 L 1583.0 509.6 L 1583.0 506.1 L 1572.5 495.6 L 1572.5 492.1 L 1558.5 478.0 L 1555.0 478.0 L 1541.0 464.0 L 1537.5 464.0 L 1534.0 460.5 L 1530.5 460.5 L 1526.9 457.0 L 1523.4 457.0 L 1512.9 450.0 L 1505.9 450.0 Z" fill="#ffffff"/>' +
453
+ '</svg>';
454
+
455
  function installApexBranding() {
456
  safe(function () {
457
+ var logoSvgUrl = (window.location.pathname.indexOf("/web") !== -1) ? "ui/apex-logo.svg" : "/jellyfin/web/ui/apex-logo.svg";
458
+
459
  // 1. Favicon sync
460
  var links = document.querySelectorAll("link[rel*='icon']");
461
  for (var i = 0; i < links.length; i++) {
 
473
  document.head.appendChild(link);
474
  }
475
 
476
+ // 2. Header and Drawer Logos - replace any default icons or SVGs with our exact Apex Delta glyph
477
+ var logos = document.querySelectorAll(
478
+ ".imgLogoIcon, .adminDrawerLogo img, .adminDrawerLogo, .headerLogo, .pageTitleWithDefaultLogo, .btnSelectServer .navMenuOptionIcon"
479
+ );
480
  for (var j = 0; j < logos.length; j++) {
481
+ var el = logos[j];
482
+ if (el.tagName.toLowerCase() === "img") {
483
+ if (el.src && !el.src.includes("apex-logo")) {
484
+ el.src = logoSvgUrl;
485
+ }
486
+ } else if (!el.querySelector(".apex-delta-icon")) {
487
+ el.innerHTML = APEX_DELTA_SVG;
488
+ }
489
+ }
490
+
491
+ // 3. Drawer top card logo icon
492
+ var drawerServerOption = document.querySelector(".mainDrawer .btnSelectServer, .mainDrawer .navMenuOption:first-child");
493
+ if (drawerServerOption && !drawerServerOption.querySelector(".apex-delta-icon")) {
494
+ var iconSpan = drawerServerOption.querySelector(".navMenuOptionIcon, .material-icons, svg");
495
+ if (iconSpan) {
496
+ iconSpan.outerHTML = '<span class="navMenuOptionIcon apex-drawer-icon" style="display:inline-flex;align-items:center;justify-content:center;min-width:32px;margin-right:12px;">' + APEX_DELTA_SVG + '</span>';
497
  }
498
  }
499
+
500
+ // 4. Login Page top icon
501
+ var loginHeader = document.querySelector("#loginPage .headerLogo, .skinHeader .headerLogo, .skinHeader .pageTitleWithDefaultLogo");
502
+ if (loginHeader && !loginHeader.querySelector(".apex-delta-icon")) {
503
+ loginHeader.innerHTML = APEX_DELTA_SVG;
504
+ }
505
  });
506
  }
507
 
 
729
  function replaceServerNameText() {
730
  try {
731
  if (!document.body) return;
732
+ var urlPattern = /r-jishnupg-[a-z0-9-]+|(?:https?:\/\/)?[\w.-]+\.hf\.space[^\s]*|https?:\/\/[^\s<>'"]+/gi;
733
  var walker = document.createTreeWalker(document.body, NodeFilter.SHOW_TEXT, null, false);
734
  var node;
735
  while ((node = walker.nextNode())) {
736
+ if (node.nodeValue && urlPattern.test(node.nodeValue)) {
737
+ node.nodeValue = node.nodeValue.replace(urlPattern, "Apex");
738
  }
739
  }
740
+ var targets = document.querySelectorAll(
741
+ ".pageTitle, .sectionTitle, .sectionName, .navMenuOptionText, .headerButton, .sidebarHeader, .cardText, .cardLargeText, .adminDrawerLogo, .btnSelectServer"
742
+ );
743
+ for (var i = 0; i < targets.length; i++) {
744
+ var t = targets[i];
745
+ if (t.textContent && urlPattern.test(t.textContent)) {
746
+ t.textContent = t.textContent.replace(urlPattern, "Apex");
747
+ }
748
+ }
749
+ if (document.title && urlPattern.test(document.title)) {
750
+ document.title = document.title.replace(urlPattern, "Apex");
751
+ }
752
  } catch (e) {}
753
  }
754