mirror of
https://github.com/sakaljurgis/kodi-api-server.git
synced 2026-07-09 04:47:41 +00:00
migrations; torr search, dl, seed, delete; files scan, delete; configs
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import { SearchClientInterface } from '../Interface/search-client.interface';
|
||||
import { LinkomanijaClient } from '../LinkomanijaClient/linkomanija.client';
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { TorrentSearchClientResponse } from '../../Dto/torrent-search-client-response.dto';
|
||||
|
||||
/**
|
||||
* Bridge is needed as it seems you cannot inject providers from other modules using factory in module level
|
||||
*/
|
||||
@Injectable()
|
||||
export class LinkomanijaClientBridge implements SearchClientInterface {
|
||||
clientName: string;
|
||||
|
||||
constructor(private readonly client: LinkomanijaClient) {
|
||||
this.clientName = client.clientName;
|
||||
}
|
||||
|
||||
search(query: string) {
|
||||
return this.client.search(query);
|
||||
}
|
||||
|
||||
customMenu(path: string): Promise<TorrentSearchClientResponse> {
|
||||
return this.client.customMenu(path);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user