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:
2026-04-04 22:49:12 -04:00
parent cf8c690474
commit 83ba24e31a
3 changed files with 1 additions and 4 deletions
-2
View File
@@ -1007,7 +1007,5 @@ func mediaItemsToListMediaItemsRow(item database.MediaItems) database.ListMediaI
OpfIdentifier: item.OpfIdentifier,
OpfUuid: item.OpfUuid,
HashConfidence: item.HashConfidence,
LibraryName: "",
LibraryTypeName: "",
}
}