mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-30 06:39:37 +02:00
Refactor RssFeedManager to use new model when closing feeds, fix close series feed when series is removed, update RssFeedManager to singleton
This commit is contained in:
parent
e50bd93958
commit
4c68ad46f4
10 changed files with 105 additions and 78 deletions
|
@ -6,21 +6,24 @@ const { getTitleIgnorePrefix, areEquivalent } = require('../utils/index')
|
|||
const parseNameString = require('../utils/parsers/parseNameString')
|
||||
const parseEbookMetadata = require('../utils/parsers/parseEbookMetadata')
|
||||
const globals = require('../utils/globals')
|
||||
const { readTextFile, filePathToPOSIX, getFileTimestampsWithIno } = require('../utils/fileUtils')
|
||||
|
||||
const AudioFileScanner = require('./AudioFileScanner')
|
||||
const Database = require('../Database')
|
||||
const { readTextFile, filePathToPOSIX, getFileTimestampsWithIno } = require('../utils/fileUtils')
|
||||
const AudioFile = require('../objects/files/AudioFile')
|
||||
const CoverManager = require('../managers/CoverManager')
|
||||
const LibraryFile = require('../objects/files/LibraryFile')
|
||||
const SocketAuthority = require('../SocketAuthority')
|
||||
const fsExtra = require('../libs/fsExtra')
|
||||
const BookFinder = require('../finders/BookFinder')
|
||||
const fsExtra = require('../libs/fsExtra')
|
||||
const EBookFile = require('../objects/files/EBookFile')
|
||||
const AudioFile = require('../objects/files/AudioFile')
|
||||
const LibraryFile = require('../objects/files/LibraryFile')
|
||||
|
||||
const RssFeedManager = require('../managers/RssFeedManager')
|
||||
const CoverManager = require('../managers/CoverManager')
|
||||
|
||||
const LibraryScan = require('./LibraryScan')
|
||||
const OpfFileScanner = require('./OpfFileScanner')
|
||||
const NfoFileScanner = require('./NfoFileScanner')
|
||||
const AbsMetadataFileScanner = require('./AbsMetadataFileScanner')
|
||||
const EBookFile = require('../objects/files/EBookFile')
|
||||
|
||||
/**
|
||||
* Metadata for books pulled from files
|
||||
|
@ -941,6 +944,9 @@ class BookScanner {
|
|||
id: bookSeriesToRemove
|
||||
}
|
||||
})
|
||||
// Close any open feeds for series
|
||||
await RssFeedManager.closeFeedsForEntityIds(bookSeriesToRemove)
|
||||
|
||||
bookSeriesToRemove.forEach((seriesId) => {
|
||||
Database.removeSeriesFromFilterData(libraryId, seriesId)
|
||||
SocketAuthority.emitter('series_removed', { id: seriesId, libraryId })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue