feat(rebase): rebase
This commit is contained in:
@@ -237,7 +237,7 @@ const JellyfinLogin: React.FC<JellyfinLoginProps> = ({
|
||||
as="a"
|
||||
buttonType="ghost"
|
||||
href={
|
||||
settings.currentSettings.jfHost +
|
||||
settings.currentSettings.jellyfinHost +
|
||||
'/web/#!/forgotpassword.html'
|
||||
}
|
||||
>
|
||||
|
||||
@@ -12,6 +12,7 @@ import LocalLogin from './LocalLogin';
|
||||
import Accordion from '../Common/Accordion';
|
||||
import useSettings from '../../hooks/useSettings';
|
||||
import PageTitle from '../Common/PageTitle';
|
||||
import { MediaServerType } from '../../../server/constants/server';
|
||||
|
||||
const messages = defineMessages({
|
||||
signin: 'Sign In',
|
||||
@@ -136,13 +137,15 @@ const Login: React.FC = () => {
|
||||
onClick={() => handleClick(0)}
|
||||
disabled={!settings.currentSettings.localLogin}
|
||||
>
|
||||
{settings.currentSettings.mediaServerType == 'PLEX'
|
||||
{settings.currentSettings.mediaServerType ==
|
||||
MediaServerType.PLEX
|
||||
? intl.formatMessage(messages.signinwithplex)
|
||||
: intl.formatMessage(messages.signinwithjellyfin)}
|
||||
</button>
|
||||
<AccordionContent isOpen={openIndexes.includes(0)}>
|
||||
<div className="px-10 py-8">
|
||||
{settings.currentSettings.mediaServerType == 'PLEX' ? (
|
||||
{settings.currentSettings.mediaServerType ==
|
||||
MediaServerType.PLEX ? (
|
||||
<PlexLoginButton
|
||||
isProcessing={isProcessing}
|
||||
onAuthToken={(authToken) => setAuthToken(authToken)}
|
||||
|
||||
@@ -35,7 +35,11 @@ import ConfirmButton from '../Common/ConfirmButton';
|
||||
import DownloadBlock from '../DownloadBlock';
|
||||
import PageTitle from '../Common/PageTitle';
|
||||
import useSettings from '../../hooks/useSettings';
|
||||
<<<<<<< HEAD
|
||||
import PlayButton, { PlayButtonLink } from '../Common/PlayButton';
|
||||
=======
|
||||
import { MediaServerType } from '../../../server/constants/server';
|
||||
>>>>>>> 2fe4add... feat(rebase): rebase
|
||||
|
||||
const messages = defineMessages({
|
||||
releasedate: 'Release Date',
|
||||
@@ -392,12 +396,8 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
|
||||
<StatusBadge
|
||||
status={data.mediaInfo?.status}
|
||||
inProgress={(data.mediaInfo.downloadStatus ?? []).length > 0}
|
||||
plexUrl={
|
||||
data.mediaInfo?.plexUrl ?? data.mediaInfo?.jellyfinUrl
|
||||
}
|
||||
plexUrl4k={
|
||||
data.mediaInfo?.plexUrl4k ?? data.mediaInfo?.jellyfinUrl4k
|
||||
}
|
||||
plexUrl={data.mediaInfo?.mediaUrl}
|
||||
plexUrl4k={data.mediaInfo?.mediaUrl4k}
|
||||
/>
|
||||
</span>
|
||||
)}
|
||||
@@ -406,12 +406,12 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
|
||||
status={data.mediaInfo?.status4k}
|
||||
is4k
|
||||
inProgress={(data.mediaInfo?.downloadStatus4k ?? []).length > 0}
|
||||
plexUrl={data.mediaInfo?.plexUrl ?? data.mediaInfo?.jellyfinUrl}
|
||||
plexUrl={data.mediaInfo?.mediaUrl}
|
||||
plexUrl4k={
|
||||
data.mediaInfo?.plexUrl4k &&
|
||||
data.mediaInfo?.mediaUrl4k &&
|
||||
(hasPermission(Permission.REQUEST_4K) ||
|
||||
hasPermission(Permission.REQUEST_4K_MOVIE))
|
||||
? data.mediaInfo.plexUrl4k ?? data.mediaInfo?.jellyfinUrl4k
|
||||
? data.mediaInfo.mediaUrl4k
|
||||
: undefined
|
||||
}
|
||||
/>
|
||||
@@ -453,9 +453,114 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
|
||||
</span>
|
||||
</div>
|
||||
<div className="relative z-10 flex flex-wrap justify-center flex-shrink-0 mt-4 sm:justify-end sm:flex-nowrap lg:mt-0">
|
||||
<<<<<<< HEAD
|
||||
<div className="mb-3 sm:mb-0">
|
||||
<PlayButton links={mediaLinks} />
|
||||
</div>
|
||||
=======
|
||||
{trailerUrl ||
|
||||
data.mediaInfo?.mediaUrl ||
|
||||
data.mediaInfo?.mediaUrl4k ? (
|
||||
<ButtonWithDropdown
|
||||
buttonType="ghost"
|
||||
text={
|
||||
<>
|
||||
<svg
|
||||
className="w-5 h-5 mr-1"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth={2}
|
||||
d="M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"
|
||||
/>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth={2}
|
||||
d="M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
||||
/>
|
||||
</svg>
|
||||
<span>
|
||||
{data.mediaInfo?.mediaUrl || data.mediaInfo?.mediaUrl
|
||||
? intl.formatMessage(
|
||||
settings.currentSettings.mediaServerType ==
|
||||
MediaServerType.PLEX
|
||||
? messages.playonplex
|
||||
: messages.playonjellyfin
|
||||
)
|
||||
: data.mediaInfo?.mediaUrl4k &&
|
||||
(hasPermission(Permission.REQUEST_4K) ||
|
||||
hasPermission(Permission.REQUEST_4K_MOVIE))
|
||||
? intl.formatMessage(
|
||||
settings.currentSettings.mediaServerType ==
|
||||
MediaServerType.PLEX
|
||||
? messages.playonplex
|
||||
: messages.playonjellyfin
|
||||
)
|
||||
: intl.formatMessage(messages.watchtrailer)}
|
||||
</span>
|
||||
</>
|
||||
}
|
||||
onClick={() => {
|
||||
if (data.mediaInfo?.mediaUrl) {
|
||||
window.open(data.mediaInfo?.mediaUrl, '_blank');
|
||||
} else if (data.mediaInfo?.mediaUrl4k) {
|
||||
window.open(data.mediaInfo?.mediaUrl4k, '_blank');
|
||||
} else if (trailerUrl) {
|
||||
window.open(trailerUrl, '_blank');
|
||||
}
|
||||
}}
|
||||
>
|
||||
{(
|
||||
trailerUrl
|
||||
? data.mediaInfo?.mediaUrl ||
|
||||
(data.mediaInfo?.mediaUrl4k &&
|
||||
(hasPermission(Permission.REQUEST_4K) ||
|
||||
hasPermission(Permission.REQUEST_4K_MOVIE)))
|
||||
: data.mediaInfo?.mediaUrl &&
|
||||
data.mediaInfo?.mediaUrl4k &&
|
||||
(hasPermission(Permission.REQUEST_4K) ||
|
||||
hasPermission(Permission.REQUEST_4K_MOVIE))
|
||||
) ? (
|
||||
<>
|
||||
{data.mediaInfo?.mediaUrl &&
|
||||
data.mediaInfo?.mediaUrl4k &&
|
||||
(hasPermission(Permission.REQUEST_4K) ||
|
||||
hasPermission(Permission.REQUEST_4K_MOVIE)) && (
|
||||
<ButtonWithDropdown.Item
|
||||
onClick={() => {
|
||||
window.open(data.mediaInfo?.mediaUrl4k, '_blank');
|
||||
}}
|
||||
buttonType="ghost"
|
||||
>
|
||||
{intl.formatMessage(
|
||||
settings.currentSettings.mediaServerType ==
|
||||
MediaServerType.PLEX
|
||||
? messages.play4konplex
|
||||
: messages.play4konjellyfin
|
||||
)}
|
||||
</ButtonWithDropdown.Item>
|
||||
)}
|
||||
{trailerUrl && (
|
||||
<ButtonWithDropdown.Item
|
||||
onClick={() => {
|
||||
window.open(trailerUrl, '_blank');
|
||||
}}
|
||||
buttonType="ghost"
|
||||
>
|
||||
{intl.formatMessage(messages.watchtrailer)}
|
||||
</ButtonWithDropdown.Item>
|
||||
)}
|
||||
</>
|
||||
) : null}
|
||||
</ButtonWithDropdown>
|
||||
) : null}
|
||||
>>>>>>> 2fe4add... feat(rebase): rebase
|
||||
<div className="mb-3 sm:mb-0">
|
||||
<RequestButton
|
||||
mediaType="movie"
|
||||
@@ -696,7 +801,7 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
|
||||
tvdbId={data.externalIds.tvdbId}
|
||||
imdbId={data.externalIds.imdbId}
|
||||
rtUrl={ratingData?.url}
|
||||
plexUrl={data.mediaInfo?.plexUrl ?? data.mediaInfo?.plexUrl4k}
|
||||
plexUrl={data.mediaInfo?.mediaUrl ?? data.mediaInfo?.mediaUrl4k}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -14,6 +14,7 @@ import globalMessages from '../../i18n/globalMessages';
|
||||
import PermissionEdit from '../PermissionEdit';
|
||||
import * as Yup from 'yup';
|
||||
import RegionSelector from '../RegionSelector';
|
||||
import { MediaServerType } from '../../../server/constants/server';
|
||||
|
||||
const messages = defineMessages({
|
||||
generalsettings: 'General Settings',
|
||||
@@ -123,7 +124,8 @@ const SettingsMain: React.FC = () => {
|
||||
region: data?.region,
|
||||
originalLanguage: data?.originalLanguage,
|
||||
trustProxy: data?.trustProxy,
|
||||
useJellyfin: data?.mediaServerType == 'JELLYFIN' ? true : false,
|
||||
useJellyfin:
|
||||
data?.mediaServerType == MediaServerType.JELLYFIN ? true : false,
|
||||
}}
|
||||
enableReinitialize
|
||||
validationSchema={MainSettingsSchema}
|
||||
@@ -139,7 +141,9 @@ const SettingsMain: React.FC = () => {
|
||||
region: values.region,
|
||||
originalLanguage: values.originalLanguage,
|
||||
trustProxy: values.trustProxy,
|
||||
mediaServerType: values.useJellyfin ? 'JELLYFIN' : 'PLEX',
|
||||
mediaServerType: values.useJellyfin
|
||||
? MediaServerType.JELLYFIN
|
||||
: MediaServerType.PLEX,
|
||||
});
|
||||
|
||||
addToast(intl.formatMessage(messages.toastSettingsSuccess), {
|
||||
|
||||
@@ -27,7 +27,7 @@ const SetupLogin: React.FC<LoginWithMediaServerProps> = ({ onComplete }) => {
|
||||
|
||||
useEffect(() => {
|
||||
const login = async () => {
|
||||
const response = await axios.post('/api/v1/auth/login', {
|
||||
const response = await axios.post('/api/v1/auth/plex', {
|
||||
authToken: authToken,
|
||||
});
|
||||
|
||||
|
||||
@@ -33,7 +33,11 @@ import ConfirmButton from '../Common/ConfirmButton';
|
||||
import DownloadBlock from '../DownloadBlock';
|
||||
import PageTitle from '../Common/PageTitle';
|
||||
import useSettings from '../../hooks/useSettings';
|
||||
<<<<<<< HEAD
|
||||
import PlayButton, { PlayButtonLink } from '../Common/PlayButton';
|
||||
=======
|
||||
import { MediaServerType } from '../../../server/constants/server';
|
||||
>>>>>>> 2fe4add... feat(rebase): rebase
|
||||
|
||||
const messages = defineMessages({
|
||||
firstAirDate: 'First Air Date',
|
||||
@@ -413,12 +417,8 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
|
||||
<StatusBadge
|
||||
status={data.mediaInfo?.status}
|
||||
inProgress={(data.mediaInfo.downloadStatus ?? []).length > 0}
|
||||
plexUrl={
|
||||
data.mediaInfo?.plexUrl ?? data.mediaInfo?.jellyfinUrl
|
||||
}
|
||||
plexUrl4k={
|
||||
data.mediaInfo?.plexUrl4k ?? data.mediaInfo?.jellyfinUrl4k
|
||||
}
|
||||
plexUrl={data.mediaInfo?.mediaUrl}
|
||||
plexUrl4k={data.mediaInfo?.mediaUrl4k}
|
||||
/>
|
||||
</span>
|
||||
)}
|
||||
@@ -426,12 +426,12 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
|
||||
<StatusBadge
|
||||
status={data.mediaInfo?.status}
|
||||
inProgress={(data.mediaInfo?.downloadStatus ?? []).length > 0}
|
||||
plexUrl={data.mediaInfo?.plexUrl ?? data.mediaInfo?.jellyfinUrl}
|
||||
plexUrl={data.mediaInfo?.mediaUrl}
|
||||
plexUrl4k={
|
||||
data.mediaInfo?.plexUrl4k &&
|
||||
data.mediaInfo?.mediaUrl4k &&
|
||||
(hasPermission(Permission.REQUEST_4K) ||
|
||||
hasPermission(Permission.REQUEST_4K_TV))
|
||||
? data.mediaInfo.plexUrl4k ?? data.mediaInfo?.jellyfinUrl4k
|
||||
? data.mediaInfo.mediaUrl4k
|
||||
: undefined
|
||||
}
|
||||
/>
|
||||
@@ -709,7 +709,7 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
|
||||
tvdbId={data.externalIds.tvdbId}
|
||||
imdbId={data.externalIds.imdbId}
|
||||
rtUrl={ratingData?.url}
|
||||
plexUrl={data.mediaInfo?.plexUrl ?? data.mediaInfo?.plexUrl4k}
|
||||
plexUrl={data.mediaInfo?.mediaUrl ?? data.mediaInfo?.mediaUrl4k}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -22,6 +22,8 @@ import BulkEditModal from './BulkEditModal';
|
||||
import PageTitle from '../Common/PageTitle';
|
||||
import Link from 'next/link';
|
||||
import type { UserResultsResponse } from '../../../server/interfaces/api/userInterfaces';
|
||||
import useSettings from '../../hooks/useSettings';
|
||||
import { MediaServerType } from '../../../server/constants/server';
|
||||
|
||||
const messages = defineMessages({
|
||||
users: 'Users',
|
||||
@@ -78,6 +80,7 @@ type Sort = 'created' | 'updated' | 'requests' | 'displayname';
|
||||
const UserList: React.FC = () => {
|
||||
const intl = useIntl();
|
||||
const router = useRouter();
|
||||
const settings = useSettings();
|
||||
const { addToast } = useToasts();
|
||||
const [pageIndex, setPageIndex] = useState(0);
|
||||
const [currentSort, setCurrentSort] = useState<Sort>('created');
|
||||
@@ -408,14 +411,17 @@ const UserList: React.FC = () => {
|
||||
>
|
||||
{intl.formatMessage(messages.createlocaluser)}
|
||||
</Button>
|
||||
<Button
|
||||
className="flex-grow outline lg:mr-2"
|
||||
buttonType="primary"
|
||||
disabled={isImporting}
|
||||
onClick={() => importFromPlex()}
|
||||
>
|
||||
{intl.formatMessage(messages.importfromplex)}
|
||||
</Button>
|
||||
{settings.currentSettings.mediaServerType ==
|
||||
MediaServerType.PLEX && (
|
||||
<Button
|
||||
className="flex-grow outline lg:mr-2"
|
||||
buttonType="primary"
|
||||
disabled={isImporting}
|
||||
onClick={() => importFromPlex()}
|
||||
>
|
||||
{intl.formatMessage(messages.importfromplex)}
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
<div className="flex flex-grow mb-2 lg:mb-0 lg:flex-grow-0">
|
||||
<span className="inline-flex items-center px-3 text-sm text-gray-100 bg-gray-800 border border-r-0 border-gray-500 cursor-default rounded-l-md">
|
||||
|
||||
@@ -599,7 +599,8 @@
|
||||
"components.Setup.finish": "Finish Setup",
|
||||
"components.Setup.finishing": "Finishing…",
|
||||
"components.Setup.setup": "Setup",
|
||||
"components.Setup.signinMessage": "Get started by signing in with an account",
|
||||
"components.Setup.signin": "Sign In",
|
||||
"components.Setup.signinMessage": "Get started by signing in",
|
||||
"components.Setup.signinWithJellyfin": "Use Jellyfin",
|
||||
"components.Setup.syncingbackground": "Syncing will run in the background. You can continue the setup process in the meantime.",
|
||||
"components.Setup.tip": "Tip",
|
||||
|
||||
Reference in New Issue
Block a user