mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-21 19:29:37 +00:00
Added deviceId in addition to inode to uniquely identify files
This commit is contained in:
parent
d8f07eb956
commit
3a4aacb7bf
17 changed files with 1445 additions and 227 deletions
23
test/server/objects/LibraryItemScanData.test.js
Normal file
23
test/server/objects/LibraryItemScanData.test.js
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
// TODO - need to check
|
||||
// compareUpdateLibraryFile
|
||||
// checkEbookFileRemoved
|
||||
// checkAudioFileRemoved
|
||||
// libraryItemObject()
|
||||
/*
|
||||
new LibraryItemScanData({
|
||||
libraryFolderId: folder.id,
|
||||
libraryId: library.id,
|
||||
mediaType: library.mediaType,
|
||||
ino: libraryItemStats.ino,
|
||||
deviceId: libraryItemStats.dev,
|
||||
mtimeMs: libraryItemStats.mtimeMs || 0,
|
||||
ctimeMs: libraryItemStats.ctimeMs || 0,
|
||||
birthtimeMs: libraryItemStats.birthtimeMs || 0,
|
||||
path: libraryItemData.path,
|
||||
relPath: libraryItemData.relPath,
|
||||
isFile: isSingleMediaItem,
|
||||
mediaMetadata: libraryItemData.mediaMetadata || null,
|
||||
libraryFiles
|
||||
})
|
||||
|
||||
*/
|
||||
9
test/server/objects/SimilarLibraryFileObjects.test.js
Normal file
9
test/server/objects/SimilarLibraryFileObjects.test.js
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
const LibraryFile = require('../../../server/objects/files/LibraryFile')
|
||||
const EBookFile = require('../../../server/objects/files/EBookFile')
|
||||
const AudioFile = require('../../../server/objects/files/AudioFile')
|
||||
const LibraryItem = require('../../../server/models/LibraryItem')
|
||||
const LibraryItemScanData = require('../../../server/scanner/LibraryItemScanData')
|
||||
|
||||
// TODO: all of these duplicate each other. Need to verify that deviceId is set on each when constructing. And that deviceId is populated when using toJSON()
|
||||
|
||||
// TODO: check that any libraryFiles properties set to JSON contain a LibraryFile which has a deviceId property
|
||||
Loading…
Add table
Add a link
Reference in a new issue