@jjdenhertog/plex-music-search 1.0.1 → 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 -14
  2. package/index.js +2 -1
  3. package/package.json +2 -10
package/README.md CHANGED
@@ -1,17 +1,13 @@
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 and analyzing 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 and offers configuration options tailored to Plex’s system.
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
- - [Examples](#examples)
15
11
  - [Support](#support)
16
12
 
17
13
  ## Installation
@@ -44,14 +40,22 @@ const searchResult = await plexMusicSearch.search(searchItems);
44
40
  console.log(searchResult);
45
41
  ```
46
42
 
47
- ## Default Settings
43
+ ### What is with the ID while searching?
48
44
 
49
- 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
+ ```
50
52
 
51
- - **URI**: The base URL of your Plex server.
52
- - **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.
53
54
 
54
- 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
+ ```
55
59
 
56
60
  ## Configuration Options
57
61
 
@@ -82,7 +86,7 @@ To use `plex-music-search`, you’ll need your Plex server's URI and a token for
82
86
 
83
87
  ## Faster searching
84
88
 
85
- 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.
86
90
 
87
91
  ```typescript
88
92
  const searchItems = [
@@ -101,10 +105,10 @@ const searchResult = await plexMusicSearch.search(searchItems);
101
105
 
102
106
  ```
103
107
 
104
- ## Support
108
+ ## Support This Open-Source Project ❤️
105
109
 
106
- 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!
107
111
 
108
112
  [![Buy Me a Coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/jjdenhertog)
109
113
 
110
- 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.1",
3
+ "version": "1.0.3",
4
4
  "description": "Library to find tracks in your Plex Library",
5
5
  "keywords": [
6
6
  "plex",
@@ -8,7 +8,6 @@
8
8
  "search"
9
9
  ],
10
10
  "homepage": "https://github.com/jjdenhertog/plex-music-search",
11
- "main": "dist/index.js",
12
11
  "license": "MIT",
13
12
  "scripts": {
14
13
  "deploy": "tsc && npm version patch --no-git-tag-version && cp package.json ./dist && cp README.md ./dist && cd dist && npm publish --access public",
@@ -19,7 +18,7 @@
19
18
  "npm": ">=10.0.0"
20
19
  },
21
20
  "dependencies": {
22
- "@jjdenhertog/music-search": "^1.0.5",
21
+ "@jjdenhertog/music-search": "^1.0.6",
23
22
  "axios": "^1.4.0",
24
23
  "qs": "^6.12.0",
25
24
  "string-similarity-js": "^2.1.4"
@@ -27,13 +26,6 @@
27
26
  "devDependencies": {
28
27
  "@types/node": "^20.3.0",
29
28
  "@types/qs": "^6.9.14",
30
- "@typescript-eslint/eslint-plugin": "^8.8.0",
31
- "eslint": "^8.57.0",
32
- "eslint-config-next": "^14.1.4",
33
- "eslint-plugin-jsx-a11y": "^6.9.0",
34
- "eslint-plugin-preact": "^0.1.0",
35
- "eslint-plugin-react": "^7.35.0",
36
- "eslint-plugin-unicorn": "^54.0.0",
37
29
  "typescript": ">=4.7.4"
38
30
  }
39
31
  }