Expose library_type_name in API and remove redundant empty fields
- Add library_type_name to GetMediaItem handler response in media.go - Remove empty LibraryName and LibraryTypeName fields from: - ListMediaItemsRow in collections.go handler - ListMediaItemsRow in dashboard_service.go - These fields are now populated at the database level via trigger The library_type_name is now automatically populated in the database when a media item is created, so we remove the manual empty string assignments and expose the actual value in the API response.
This commit is contained in:
@@ -1007,7 +1007,5 @@ func mediaItemsToListMediaItemsRow(item database.MediaItems) database.ListMediaI
|
||||
OpfIdentifier: item.OpfIdentifier,
|
||||
OpfUuid: item.OpfUuid,
|
||||
HashConfidence: item.HashConfidence,
|
||||
LibraryName: "",
|
||||
LibraryTypeName: "",
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user