@francofantomius/jellyfin 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -6,7 +6,7 @@ A modern, lightweight, modular, and type-safe Jellyfin SDK for Node.js and the B
6
6
  [![Documentation](https://img.shields.io/badge/docs-Material%20Design%203-6f42c1.svg)](https://francofantomius.github.io/jellyfin-sdk/)
7
7
  [![license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
8
8
 
9
- **Current Version: `v0.4.1`** (THE PROJECT IS BEING ACTIVELY DEVELOPED. WAIT FOR VERSION 0.5.0 TO USE IT)
9
+ **Current Version: `v0.4.2`**
10
10
 
11
11
 
12
12
  ---
package/dist/index.cjs CHANGED
@@ -27,7 +27,10 @@ var JellyfinAuthError = class extends JellyfinApiError {
27
27
  // src/http.ts
28
28
  function cleanUrl(url) {
29
29
  if (!url) return "";
30
- let cleaned = url.trim().replace(/\/+$/, "");
30
+ let cleaned = url.trim();
31
+ while (cleaned.endsWith("/")) {
32
+ cleaned = cleaned.slice(0, -1);
33
+ }
31
34
  if (!/^https?:\/\//i.test(cleaned)) {
32
35
  cleaned = "https://" + cleaned;
33
36
  }
@@ -1677,7 +1680,7 @@ var OfflineStorageManager = class {
1677
1680
  request.onerror = () => resolve(null);
1678
1681
  });
1679
1682
  } catch (err) {
1680
- console.warn(`[Jellyfin Offline] getDownloadedRecord error for ${id}:`, err);
1683
+ console.warn("[Jellyfin Offline] getDownloadedRecord error for %s:", id, err);
1681
1684
  return null;
1682
1685
  }
1683
1686
  }
@@ -2432,7 +2435,7 @@ var WebSocketModule = class {
2432
2435
  try {
2433
2436
  listener(...args);
2434
2437
  } catch (e) {
2435
- console.error(`[Jellyfin SDK] WebSocket listener error on '${event}':`, e);
2438
+ console.error("[Jellyfin SDK] WebSocket listener error on '%s':", event, e);
2436
2439
  }
2437
2440
  });
2438
2441
  }
@@ -3767,7 +3770,7 @@ var JellyfinClient = class {
3767
3770
  this.cache = new MemoryCacheAdapter();
3768
3771
  this.clientInfo = {
3769
3772
  name: options.clientInfo?.name || "@francofantomius/jellyfin",
3770
- version: options.clientInfo?.version || "0.4.1",
3773
+ version: options.clientInfo?.version || "0.4.2",
3771
3774
  device: options.clientInfo?.device || (typeof window !== "undefined" ? "Web Browser" : "Node.js"),
3772
3775
  deviceId: options.clientInfo?.deviceId || generateDeviceId()
3773
3776
  };
@@ -3889,7 +3892,7 @@ var JellyfinClient = class {
3889
3892
  try {
3890
3893
  fn(...args);
3891
3894
  } catch (e) {
3892
- console.error(`[Jellyfin SDK] Event handler error on '${event}':`, e);
3895
+ console.error("[Jellyfin SDK] Event handler error on '%s':", event, e);
3893
3896
  }
3894
3897
  });
3895
3898
  }