增加自定义X-Emby-Authorization
This commit is contained in:
@@ -5278,6 +5278,7 @@ const EmbyConfigComponent = ({
|
||||
transcodeMp4: false,
|
||||
proxyPlay: false,
|
||||
customUserAgent: '',
|
||||
embyAuthorizationHeader: '',
|
||||
});
|
||||
const [authMode, setAuthMode] = useState<'apikey' | 'password'>('apikey');
|
||||
|
||||
@@ -5297,6 +5298,7 @@ const EmbyConfigComponent = ({
|
||||
Username: config.EmbyConfig.Username,
|
||||
Password: config.EmbyConfig.Password,
|
||||
UserId: config.EmbyConfig.UserId,
|
||||
embyAuthorizationHeader: config.EmbyConfig.embyAuthorizationHeader,
|
||||
isDefault: true,
|
||||
},
|
||||
]);
|
||||
@@ -5321,6 +5323,7 @@ const EmbyConfigComponent = ({
|
||||
transcodeMp4: false,
|
||||
proxyPlay: false,
|
||||
customUserAgent: '',
|
||||
embyAuthorizationHeader: '',
|
||||
});
|
||||
setAuthMode('apikey');
|
||||
setEditingSource(null);
|
||||
@@ -5499,6 +5502,7 @@ const EmbyConfigComponent = ({
|
||||
ApiKey: source.ApiKey,
|
||||
Username: source.Username,
|
||||
Password: source.Password,
|
||||
embyAuthorizationHeader: source.embyAuthorizationHeader,
|
||||
}),
|
||||
});
|
||||
|
||||
@@ -6225,6 +6229,28 @@ const EmbyConfigComponent = ({
|
||||
用于登录、获取影片和代理视频时的User-Agent,留空则使用默认浏览器UA
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{/* 自定义 X-Emby-Authorization */}
|
||||
<div className='mb-3'>
|
||||
<label className='block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2'>
|
||||
自定义 X-Emby-Authorization
|
||||
</label>
|
||||
<input
|
||||
type='text'
|
||||
value={formData.embyAuthorizationHeader || ''}
|
||||
onChange={(e) =>
|
||||
setFormData({
|
||||
...formData,
|
||||
embyAuthorizationHeader: e.target.value,
|
||||
})
|
||||
}
|
||||
placeholder='留空使用默认 moontvplus 认证头'
|
||||
className='w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:text-white text-sm'
|
||||
/>
|
||||
<p className='text-xs text-gray-500 dark:text-gray-400 mt-1'>
|
||||
仅用于账号认证登录请求,示例:MediaBrowser Client="moontvplus", Device="Web", DeviceId="moontvplus-web", Version="1.0.0"
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* 操作按钮 */}
|
||||
|
||||
Reference in New Issue
Block a user