File tree 1 file changed +4
-4
lines changed
apps/api/src/shared/search/adapters
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ export class RarbgSearchAdapter extends SearchAdapter {
89
89
90
90
// Format all the torrents and remove the ones that returned false
91
91
return foundTorrents
92
- . map ( this . formatTorrent )
92
+ . map ( ( torrent ) => this . formatTorrent ( torrent ) )
93
93
. filter ( Boolean ) as Torrent [ ]
94
94
}
95
95
}
@@ -112,11 +112,11 @@ export class RarbgSearchAdapter extends SearchAdapter {
112
112
const token = await this . getToken ( )
113
113
114
114
if ( token ) {
115
- const { torrent_results } = await this . get ( this . getRequestParams ( movie ) )
115
+ const result = await this . get ( this . getRequestParams ( movie ) )
116
116
117
117
// Return the best torrents
118
- return torrent_results
119
- . map ( this . formatTorrent )
118
+ return ( result . torrent_results || [ ] )
119
+ . map ( ( torrent ) => this . formatTorrent ( torrent ) )
120
120
. filter ( Boolean ) as Torrent [ ]
121
121
}
122
122
You can’t perform that action at this time.
0 commit comments