diff --git a/.all-contributorsrc b/.all-contributorsrc
index 371872759..f29044994 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -872,6 +872,15 @@
"contributions": [
"code"
]
+ },
+ {
+ "login": "scorp200",
+ "name": "Anton K. (ai Doge)",
+ "avatar_url": "https://avatars.githubusercontent.com/u/9427639?v=4",
+ "profile": "http://aidoge.xyz",
+ "contributions": [
+ "code"
+ ]
}
],
"badgeTemplate": "-orange.svg\"/>",
diff --git a/README.md b/README.md
index 6fe73c27d..0f6e32413 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@
-
+
@@ -196,6 +196,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
Salman Tariq 💻 |
Andrew Kennedy 💻 |
Fallenbagel 💻 |
+ Anton K. (ai Doge) 💻 |
diff --git a/server/api/plextv.ts b/server/api/plextv.ts
index 76ee66188..704926895 100644
--- a/server/api/plextv.ts
+++ b/server/api/plextv.ts
@@ -82,21 +82,6 @@ interface ServerResponse {
};
}
-interface FriendResponse {
- MediaContainer: {
- User: {
- $: {
- id: string;
- title: string;
- username: string;
- email: string;
- thumb: string;
- };
- Server?: ServerResponse[];
- }[];
- };
-}
-
interface UsersResponse {
MediaContainer: {
User: {
@@ -234,19 +219,6 @@ class PlexTvAPI extends ExternalAPI {
}
}
- public async getFriends(): Promise {
- const response = await this.axios.get('/pms/friends/all', {
- transformResponse: [],
- responseType: 'text',
- });
-
- const parsedXml = (await xml2js.parseStringPromise(
- response.data
- )) as FriendResponse;
-
- return parsedXml;
- }
-
public async checkUserAccess(userId: number): Promise {
const settings = getSettings();
@@ -255,9 +227,9 @@ class PlexTvAPI extends ExternalAPI {
throw new Error('Plex is not configured!');
}
- const friends = await this.getFriends();
+ const usersResponse = await this.getUsers();
- const users = friends.MediaContainer.User;
+ const users = usersResponse.MediaContainer.User;
const user = users.find((u) => parseInt(u.$.id) === userId);
diff --git a/src/components/Selector/index.tsx b/src/components/Selector/index.tsx
index 78ae33ea1..7b2165872 100644
--- a/src/components/Selector/index.tsx
+++ b/src/components/Selector/index.tsx
@@ -437,6 +437,7 @@ export const WatchProviderSelector = ({
{otherProviders.length > 0 && (
@@ -165,6 +166,7 @@ const Slider = ({
}`}
onClick={() => slide(Direction.RIGHT)}
disabled={scrollPos.isEnd}
+ type="button"
>
diff --git a/src/components/StatusBadge/index.tsx b/src/components/StatusBadge/index.tsx
index 3dbe6e74b..b60b7af04 100644
--- a/src/components/StatusBadge/index.tsx
+++ b/src/components/StatusBadge/index.tsx
@@ -166,11 +166,11 @@ const StatusBadge = ({
{inProgress && (
<>
- {mediaType === 'tv' && (
+ {mediaType === 'tv' && downloadItem[0].episode && (
{intl.formatMessage(messages.seasonepisodenumber, {
- seasonNumber: downloadItem[0].episode?.seasonNumber,
- episodeNumber: downloadItem[0].episode?.episodeNumber,
+ seasonNumber: downloadItem[0].episode.seasonNumber,
+ episodeNumber: downloadItem[0].episode.episodeNumber,
})}
)}
@@ -219,11 +219,11 @@ const StatusBadge = ({
{inProgress && (
<>
- {mediaType === 'tv' && (
+ {mediaType === 'tv' && downloadItem[0].episode && (
{intl.formatMessage(messages.seasonepisodenumber, {
- seasonNumber: downloadItem[0].episode?.seasonNumber,
- episodeNumber: downloadItem[0].episode?.episodeNumber,
+ seasonNumber: downloadItem[0].episode.seasonNumber,
+ episodeNumber: downloadItem[0].episode.episodeNumber,
})}
)}
@@ -272,11 +272,11 @@ const StatusBadge = ({
{inProgress && (
<>
- {mediaType === 'tv' && (
+ {mediaType === 'tv' && downloadItem[0].episode && (
{intl.formatMessage(messages.seasonepisodenumber, {
- seasonNumber: downloadItem[0].episode?.seasonNumber,
- episodeNumber: downloadItem[0].episode?.episodeNumber,
+ seasonNumber: downloadItem[0].episode.seasonNumber,
+ episodeNumber: downloadItem[0].episode.episodeNumber,
})}
)}