Fix crash when quick match adds new series

This commit is contained in:
mikiher 2024-09-09 18:36:12 +03:00
parent 0344a63b48
commit f892453892

View File

@ -1,6 +1,7 @@
const Logger = require('../Logger') const Logger = require('../Logger')
const SocketAuthority = require('../SocketAuthority') const SocketAuthority = require('../SocketAuthority')
const Database = require('../Database') const Database = require('../Database')
const { getTitleIgnorePrefix } = require('../utils/index')
// Utils // Utils
const { findMatchingEpisodesInFeed, getPodcastFeed } = require('../utils/podcastUtils') const { findMatchingEpisodesInFeed, getPodcastFeed } = require('../utils/podcastUtils')
@ -230,7 +231,7 @@ class Scanner {
seriesItem = await Database.seriesModel.create({ seriesItem = await Database.seriesModel.create({
name: seriesMatchItem.series, name: seriesMatchItem.series,
nameIgnorePrefix: getTitleIgnorePrefix(seriesMatchItem.series), nameIgnorePrefix: getTitleIgnorePrefix(seriesMatchItem.series),
libraryId libraryId: libraryItem.libraryId
}) })
// Update filter data // Update filter data
Database.addSeriesToFilterData(libraryItem.libraryId, seriesItem.name, seriesItem.id) Database.addSeriesToFilterData(libraryItem.libraryId, seriesItem.name, seriesItem.id)