Blob fixes (#3599)

* Fix error if movie back image blob was not found
* Don't error out if scene cover get fails
* Don't error out on image get fails
* Add debug logging for fs blobs
* Remove old blob data when no longer referenced
This commit is contained in:
WithoutPants
2023-03-26 10:56:32 +11:00
committed by GitHub
parent 0050e4abbf
commit 046fd1c0be
20 changed files with 107 additions and 33 deletions

View File

@@ -147,8 +147,9 @@ func initTestTable() {
},
{
createFullStudio(errImageID, parentStudioID),
nil,
true,
createFullJSONStudio(parentStudioName, "", nil),
// failure to get image is not an error
false,
},
{
createFullStudio(missingParentStudioID, missingStudioID),
@@ -200,6 +201,7 @@ func TestToJSON(t *testing.T) {
mockStudioReader.On("GetStashIDs", ctx, studioID).Return(stashIDs, nil).Once()
mockStudioReader.On("GetStashIDs", ctx, noImageID).Return(nil, nil).Once()
mockStudioReader.On("GetStashIDs", ctx, missingParentStudioID).Return(stashIDs, nil).Once()
mockStudioReader.On("GetStashIDs", ctx, errImageID).Return(stashIDs, nil).Once()
for i, s := range scenarios {
studio := s.input