mirror of
https://github.com/fallenbagel/jellyseerr.git
synced 2025-12-24 02:39:18 -05:00
chore: rename Jellyseerr -> Seerr, part 1 (#1984)
* chore: rename Jellyseerr -> Seerr, part 1 * chore: update Jellyfin bot name
This commit is contained in:
@@ -161,7 +161,7 @@ authRoutes.post('/plex', async (req, res, next) => {
|
||||
});
|
||||
} else {
|
||||
logger.info(
|
||||
'Sign-in attempt from Plex user with access to the media server; creating new Jellyseerr user',
|
||||
'Sign-in attempt from Plex user with access to the media server; creating new Seerr user',
|
||||
{
|
||||
label: 'API',
|
||||
ip: req.ip,
|
||||
@@ -277,16 +277,14 @@ authRoutes.post('/jellyfin', async (req, res, next) => {
|
||||
select: { id: true, jellyfinDeviceId: true },
|
||||
});
|
||||
|
||||
let deviceId = 'BOT_jellyseerr';
|
||||
let deviceId = 'BOT_seerr';
|
||||
if (user && user.id === 1) {
|
||||
// Admin is always BOT_jellyseerr
|
||||
deviceId = 'BOT_jellyseerr';
|
||||
// Admin is always BOT_seerr
|
||||
deviceId = 'BOT_seerr';
|
||||
} else if (user && user.jellyfinDeviceId) {
|
||||
deviceId = user.jellyfinDeviceId;
|
||||
} else if (body.username) {
|
||||
deviceId = Buffer.from(`BOT_jellyseerr_${body.username}`).toString(
|
||||
'base64'
|
||||
);
|
||||
deviceId = Buffer.from(`BOT_seerr_${body.username}`).toString('base64');
|
||||
}
|
||||
|
||||
// First we need to attempt to log the user in to jellyfin
|
||||
@@ -334,7 +332,7 @@ authRoutes.post('/jellyfin', async (req, res, next) => {
|
||||
|
||||
if (missingAdminUser) {
|
||||
logger.info(
|
||||
'Sign-in attempt from Jellyfin user with access to the media server; creating initial admin user for Jellyseerr',
|
||||
'Sign-in attempt from Jellyfin user with access to the media server; creating initial admin user for Seerr',
|
||||
{
|
||||
label: 'API',
|
||||
ip: req.ip,
|
||||
@@ -363,7 +361,7 @@ authRoutes.post('/jellyfin', async (req, res, next) => {
|
||||
await userRepository.save(user);
|
||||
} else {
|
||||
logger.info(
|
||||
'Sign-in attempt from Jellyfin user with access to the media server; editing admin user for Jellyseerr',
|
||||
'Sign-in attempt from Jellyfin user with access to the media server; editing admin user for Seerr',
|
||||
{
|
||||
label: 'API',
|
||||
ip: req.ip,
|
||||
@@ -400,7 +398,7 @@ authRoutes.post('/jellyfin', async (req, res, next) => {
|
||||
account.AccessToken,
|
||||
deviceId
|
||||
);
|
||||
const apiKey = await jellyfinClient.createApiToken('Jellyseerr');
|
||||
const apiKey = await jellyfinClient.createApiToken('Seerr');
|
||||
|
||||
const serverName = await jellyfinserver.getServerName();
|
||||
|
||||
@@ -456,7 +454,7 @@ authRoutes.post('/jellyfin', async (req, res, next) => {
|
||||
});
|
||||
} else if (!user) {
|
||||
logger.info(
|
||||
'Sign-in attempt from Jellyfin user with access to the media server; creating new Jellyseerr user',
|
||||
'Sign-in attempt from Jellyfin user with access to the media server; creating new Seerr user',
|
||||
{
|
||||
label: 'API',
|
||||
ip: req.ip,
|
||||
@@ -616,7 +614,7 @@ authRoutes.post('/local', async (req, res, next) => {
|
||||
.getOne();
|
||||
|
||||
if (!user || !(await user.passwordMatch(body.password))) {
|
||||
logger.warn('Failed sign-in attempt using invalid Jellyseerr password', {
|
||||
logger.warn('Failed sign-in attempt using invalid Seerr password', {
|
||||
label: 'API',
|
||||
ip: req.ip,
|
||||
email: body.email,
|
||||
@@ -705,15 +703,12 @@ authRoutes.post('/local', async (req, res, next) => {
|
||||
|
||||
return res.status(200).json(user?.filter() ?? {});
|
||||
} catch (e) {
|
||||
logger.error(
|
||||
'Something went wrong authenticating with Jellyseerr password',
|
||||
{
|
||||
label: 'API',
|
||||
errorMessage: e.message,
|
||||
ip: req.ip,
|
||||
email: body.email,
|
||||
}
|
||||
);
|
||||
logger.error('Something went wrong authenticating with Seerr password', {
|
||||
label: 'API',
|
||||
errorMessage: e.message,
|
||||
ip: req.ip,
|
||||
email: body.email,
|
||||
});
|
||||
return next({
|
||||
status: 500,
|
||||
message: 'Unable to authenticate.',
|
||||
@@ -747,7 +742,7 @@ authRoutes.post('/logout', async (req, res, next) => {
|
||||
await axios.delete(`${baseUrl}/Devices`, {
|
||||
params: { Id: user.jellyfinDeviceId },
|
||||
headers: {
|
||||
'X-Emby-Authorization': `MediaBrowser Client="Jellyseerr", Device="Jellyseerr", DeviceId="jellyseerr", Version="${getAppVersion()}", Token="${
|
||||
'X-Emby-Authorization': `MediaBrowser Client="Seerr", Device="Seerr", DeviceId="seerr", Version="${getAppVersion()}", Token="${
|
||||
settings.jellyfin.apiKey
|
||||
}"`,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user