@jjdenhertog/plex-music-search 1.0.2 → 1.0.3

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.
Files changed (3) hide show
  1. package/README.md +18 -13
  2. package/index.js +2 -1
  3. package/package.json +1 -8
package/README.md CHANGED
@@ -1,14 +1,11 @@
1
1
 
2
2
  # Plex Music Search
3
3
 
4
- [![Buy Me a Coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/jjdenhertog)
5
-
6
- The `plex-music-search` library provides tools for searching tracks within a Plex music library, building on the functionality of [music-search](https://github.com/jjdenhertog/music-search) with Plex-specific configurations. It can handle track searches efficiently by caching repeated search queries.
4
+ The `plex-music-search` library can be used to search for tracks in a Plex music library, building on the functionality of [music-search](https://github.com/jjdenhertog/music-search) with Plex-specific configurations.
7
5
 
8
6
  ## Table of Contents
9
7
  - [Installation](#installation)
10
8
  - [Usage](#usage)
11
- - [Default Settings](#default-settings)
12
9
  - [Configuration Options](#configuration-options)
13
10
  - [Getting Plex URI and Token](#getting-plex-uri-and-token)
14
11
  - [Support](#support)
@@ -43,14 +40,22 @@ const searchResult = await plexMusicSearch.search(searchItems);
43
40
  console.log(searchResult);
44
41
  ```
45
42
 
46
- ## Default Settings
43
+ ### What is with the ID while searching?
47
44
 
48
- The `plex-music-search` library has a set of default search settings, allowing you to use it without additional configuration:
45
+ You might notice that the search query must contain an ID
46
+ ```typescript
47
+ const searchItems = [
48
+ { id: "track1", title: "Shape of You", album: "Divide", artists: ["Ed Sheeran"] },
49
+ // More items...
50
+ ];
51
+ ```
49
52
 
50
- - **URI**: The base URL of your Plex server.
51
- - **Token**: Your Plex authentication token.
53
+ Most of the times when you're searching for a track you are doing it to match one library with the other. For example matching Spotify with Plex. The result after searching will contain the original search query including the id and the results. The results are all the tracks matching with the search query. With this approach you can trace back the results more easily.
52
54
 
53
- These settings ensure you can start searching with minimal setup. Advanced configurations are available if needed.
55
+ If you do not need the id for this purpose, you can simply leave it empty:
56
+ ```typescript
57
+ { id: "", title: "Shape of You", album: "Divide", artists: ["Ed Sheeran"] }
58
+ ```
54
59
 
55
60
  ## Configuration Options
56
61
 
@@ -81,7 +86,7 @@ To use `plex-music-search`, you’ll need your Plex server's URI and a token for
81
86
 
82
87
  ## Faster searching
83
88
 
84
- The default approach search quite thoroughly through your but as a result can be extremely time-consuming. By default it uses three search approaches. By limiting to only one search approach you will decrease the time searching tremendously.
89
+ The default approach searches quite thoroughly through your library but as a result it can be time-consuming. By default it uses three search approaches. By limiting to only one search approach you will decrease the time searching tremendously.
85
90
 
86
91
  ```typescript
87
92
  const searchItems = [
@@ -100,10 +105,10 @@ const searchResult = await plexMusicSearch.search(searchItems);
100
105
 
101
106
  ```
102
107
 
103
- ## Support
108
+ ## Support This Open-Source Project ❤️
104
109
 
105
- If this project helps you, consider supporting me:
110
+ If you appreciate my work, consider starring this repository or making a donation to support ongoing development. Your support means the world to me—thank you!
106
111
 
107
112
  [![Buy Me a Coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/jjdenhertog)
108
113
 
109
- Your support helps improve and maintain this library.
114
+ Are you a developer and have some free time on your hand? It would be great if you can help me maintain and improve this library.
package/index.js CHANGED
@@ -195,7 +195,7 @@ var PlexMusicSearch = /** @class */ (function () {
195
195
  var result = getMusicSearchResult(item, (0, searchResultToTracks_1.default)(albumTracks_1));
196
196
  var plexTracks = result
197
197
  .map(function (item) { return albumTracks_1
198
- .find(function (track) { return track.guid == item.id; }); })
198
+ .find(function (track) { return track.id == item.id; }); })
199
199
  .filter(function (item) { return !!item; })
200
200
  .map(function (item) { return (0, hubSearchToPlexTrack_1.default)(item); });
201
201
  return __assign(__assign({}, item), { artist: artists[0], album: album_1.title, result: plexTracks });
@@ -203,6 +203,7 @@ var PlexMusicSearch = /** @class */ (function () {
203
203
  case 4: return [3 /*break*/, 6];
204
204
  case 5:
205
205
  _e_1 = _b.sent();
206
+ console.log(_e_1);
206
207
  return [3 /*break*/, 6];
207
208
  case 6: return [2 /*return*/];
208
209
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jjdenhertog/plex-music-search",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Library to find tracks in your Plex Library",
5
5
  "keywords": [
6
6
  "plex",
@@ -26,13 +26,6 @@
26
26
  "devDependencies": {
27
27
  "@types/node": "^20.3.0",
28
28
  "@types/qs": "^6.9.14",
29
- "@typescript-eslint/eslint-plugin": "^8.8.0",
30
- "eslint": "^8.57.0",
31
- "eslint-config-next": "^14.1.4",
32
- "eslint-plugin-jsx-a11y": "^6.9.0",
33
- "eslint-plugin-preact": "^0.1.0",
34
- "eslint-plugin-react": "^7.35.0",
35
- "eslint-plugin-unicorn": "^54.0.0",
36
29
  "typescript": ">=4.7.4"
37
30
  }
38
31
  }