mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-23 22:01:20 -08:00
fix(auto-thumbnail): [PKG-AUTO-THUMB-13] ignore registration after destroy
This commit is contained in:
1 parent
9ba3c82f99
commit
876fa4c328
22 files changed
+4084
-11
No files matched your search
@@ -6,6 +6,8 @@ import createSession, { cleanupAll } from './session'
|
||||
|
||||
function artplayerPluginAutoThumbnail(option: ThumbnailOptions) {
|
||||
return async (art: ThumbnailHost): Promise<Result> => {
|
||||
if (art.isDestroy)
|
||||
return { name: 'artplayerPluginAutoThumbnail' }
|
||||
const report = (error: unknown) => console.warn('ArtPlayer auto-thumbnail failed:', error)
|
||||
const session = createSession((config) => {
|
||||
art.thumbnails = config
|
||||
|
||||
@@ -29,6 +29,7 @@ export interface ExtractionJob {
|
||||
}
|
||||
|
||||
export interface ThumbnailHost {
|
||||
isDestroy?: boolean
|
||||
option: { url: string }
|
||||
// A host may already hold a partial user configuration; generated sheets are complete.
|
||||
thumbnails: { url: string } & Partial<SheetConfig>
|
||||
|
||||
Reference in new issue
Block a user