@@ -121,6 +121,11 @@ export class CollectionBrowserDataSource
121121 */
122122 collectionTitles = new Map < string , string > ( ) ;
123123
124+ /**
125+ * @inheritdoc
126+ */
127+ tvChannelAliases = new Map < string , string > ( ) ;
128+
124129 /**
125130 * @inheritdoc
126131 */
@@ -1031,19 +1036,25 @@ export class CollectionBrowserDataSource
10311036 return ;
10321037 }
10331038
1034- const { aggregations, collectionTitles } = success . response ;
1039+ const { aggregations, collectionTitles, tvChannelAliases } =
1040+ success . response ;
10351041 this . aggregations = aggregations ;
10361042
1043+ this . histogramAggregation =
1044+ this . host . searchType === SearchType . TV
1045+ ? aggregations ?. date_histogram
1046+ : aggregations ?. year_histogram ;
1047+
10371048 if ( collectionTitles ) {
10381049 for ( const [ id , title ] of Object . entries ( collectionTitles ) ) {
10391050 this . collectionTitles . set ( id , title ) ;
10401051 }
10411052 }
1042-
1043- this . histogramAggregation =
1044- this . host . searchType === SearchType . TV
1045- ? aggregations ?. date_histogram
1046- : aggregations ?. year_histogram ;
1053+ if ( tvChannelAliases ) {
1054+ for ( const [ channel , network ] of Object . entries ( tvChannelAliases ) ) {
1055+ this . tvChannelAliases . set ( channel , network ) ;
1056+ }
1057+ }
10471058
10481059 this . setFacetsLoading ( false ) ;
10491060 this . requestHostUpdate ( ) ;
@@ -1191,7 +1202,7 @@ export class CollectionBrowserDataSource
11911202 this . pageElements = success . response . pageElements ;
11921203 }
11931204
1194- const { results, collectionTitles } = success . response ;
1205+ const { results, collectionTitles, tvChannelAliases } = success . response ;
11951206 if ( results && results . length > 0 ) {
11961207 // Load any collection titles present on the response into the cache,
11971208 // or queue up preload fetches for them if none were present.
@@ -1207,6 +1218,12 @@ export class CollectionBrowserDataSource
12071218 }
12081219 }
12091220
1221+ if ( tvChannelAliases ) {
1222+ for ( const [ channel , network ] of Object . entries ( tvChannelAliases ) ) {
1223+ this . tvChannelAliases . set ( channel , network ) ;
1224+ }
1225+ }
1226+
12101227 // Update the data source for each returned page.
12111228 // For loans and web archives, we must account for receiving more pages than we asked for.
12121229 const isUnpagedElement = [ 'lending' , 'web_archives' ] . includes (
0 commit comments