feat(rebase): rebase

This commit is contained in:
Aiden Vigue
2021-02-15 15:44:50 -05:00
parent 29274614c3
commit 9d61092f37
7 changed files with 78 additions and 44 deletions

View File

@@ -197,7 +197,11 @@ authRoutes.post('/jellyfin', async (req, res, next) => {
}
// Update the users avatar with their jellyfin profile pic (incase it changed)
user.avatar = `${hostname}/Users/${account.User.Id}/Images/Primary/?tag=${account.User.PrimaryImageTag}&quality=90`;
if (typeof account.User.PrimaryImageTag !== undefined) {
user.avatar = `${hostname}/Users/${account.User.Id}/Images/Primary/?tag=${account.User.PrimaryImageTag}&quality=90`;
} else {
user.avatar = '/images/os_logo_square.png';
}
user.email = account.User.Name;
user.jellyfinUsername = account.User.Name;
@@ -217,7 +221,10 @@ authRoutes.post('/jellyfin', async (req, res, next) => {
jellyfinId: account.User.Id,
jellyfinAuthToken: account.AccessToken,
permissions: Permission.ADMIN,
avatar: `${hostname}/Users/${account.User.Id}/Images/Primary/?tag=${account.User.PrimaryImageTag}&quality=90`,
avatar:
typeof account.User.PrimaryImageTag !== undefined
? `${hostname}/Users/${account.User.Id}/Images/Primary/?tag=${account.User.PrimaryImageTag}&quality=90`
: '/images/os_logo_square.png',
userType: UserType.JELLYFIN,
});
await userRepository.save(user);

View File

@@ -260,8 +260,6 @@ settingsRoutes.get('/jellyfin/library', async (req, res) => {
const newLibraries: Library[] = libraries
// Remove libraries that are not movie or show
.filter((library) => library.type === 'movie' || library.type === 'show')
// Remove libraries that do not have a metadata agent set (usually personal video libraries)
.filter((library) => library.agent !== 'com.plexapp.agents.none')
.map((library) => {
const existing = settings.plex.libraries.find(
(l) => l.id === library.key && l.name === library.title