File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -213,7 +213,8 @@ def create(
213213 response: Optional SearchResponse for paginated search results
214214 paginate: Whether to add pagination links (requires data)
215215 """
216- metadata = metadata or Metadata (title = "OPDS Catalog" )
216+ if not metadata :
217+ metadata = Metadata (title = response .title or "OPDS Catalog" )
217218 links = links or []
218219 publications = publications or []
219220
Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ class SearchResponse:
7676 sort : Optional [str ]
7777 records : List [DataProviderRecord ]
7878 total : int
79+ title : Optional [str ] = None
7980
8081 def get_search_url (self , ** kwargs : str ) -> str :
8182 base_url = self .provider .SEARCH_URL .replace ("{?query}" , "" )
@@ -118,6 +119,7 @@ def search(
118119 limit : int = 50 ,
119120 offset : int = 0 ,
120121 sort : Optional [str ] = None ,
122+ title : Optional [str ] = None ,
121123 ) -> 'DataProvider.SearchResponse' :
122124 """Search for publications matching the query.
123125
@@ -126,6 +128,7 @@ def search(
126128 limit: Maximum number of results to return (default: 50)
127129 offset: Offset for pagination (default: 0)
128130 sort: Optional sorting parameter
131+ title: Title to pass along to Catalog.create
129132
130133 Returns:
131134 SearchResponse object containing search results
@@ -137,5 +140,6 @@ def search(
137140 query = query ,
138141 limit = limit ,
139142 offset = offset ,
140- sort = sort
143+ sort = sort ,
144+ title = title ,
141145 )
You can’t perform that action at this time.
0 commit comments