You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

30 lines
845 B

import { IpcClientService } from "@autoplex/ipc";
import { Microservice } from "@autoplex/microservice";
import { SOCKET_PATH } from "./constants";
export class IpcClient<M extends Microservice = Microservice> extends IpcClientService<M>
{
/**
* The name of the service
*/
public readonly NAME = "Plex";
/**
* The path to the socket file
*/
protected readonly SOCKET_PATH = SOCKET_PATH;
/**
* Fetch a Plex movie link given the TMDb ID if it exists
*/
public async movieLinks(tmdbIds: (number|string)[]) {
return await this.request<{ [tmdbId: number]: string|null }>("movie_links", tmdbIds);
}
/**
* Check if the given movie is already on Plex
*/
public async hasMovie(tmdbId: number|string) {
return await this.request("has_movie", tmdbId);
}
}