public MediaInput(string ed2k, JMMContracts.PlexAndKodi.Media m) { int outsize; byte[] data = CompressionHelper.SerializeObject(m, out outsize); ED2K = ed2k; MediaInfo = new byte[data.Length + 4]; MediaInfo[0] = (byte)(outsize >> 24); MediaInfo[1] = (byte)((outsize >> 16) & 0xFF); MediaInfo[2] = (byte)((outsize >> 8) & 0xFF); MediaInfo[3] = (byte)(outsize & 0xFF); Array.Copy(data, 0, MediaInfo, 4, data.Length); Version = VideoLocal.MEDIA_VERSION; this.Username = ServerSettings.AniDB_Username; if (ServerSettings.WebCache_Anonymous) this.Username = Constants.AnonWebCacheUsername; this.AuthGUID = string.Empty; }
public void AddSubtitle(JMMContracts.PlexAndKodi.Stream dict) { subtitles.Add(subtitles.Count + 1, dict); }
public void AddAudio(JMMContracts.PlexAndKodi.Stream dict) { audios.Add(audios.Count + 1, dict); }
private object EvaluateGroupFilter(JMMContracts.Contract_GroupFilter a) { return _impl.EvaluateGroupFilter(a); }
private object SaveUser(JMMContracts.Contract_JMMUser a) { return _impl.SaveUser(a); }
private object SaveServerSettings(JMMContracts.Contract_ServerSettings a) { return _impl.SaveServerSettings(a); }
private object SaveSeries(JMMContracts.Contract_AnimeSeries_Save a, int b) { return _impl.SaveSeries(a,b); }
//Not using simple parameters //private object GetSeriesForGroup(int a, List<Entities.AnimeSeries> b) //{ // return _impl.GetSeriesForGroup(a,b); //} private object SaveBookmarkedAnime(JMMContracts.Contract_BookmarkedAnime a) { return _impl.SaveBookmarkedAnime(a); }
private object SavePlaylist(JMMContracts.Contract_Playlist a) { return _impl.SavePlaylist(a); }
private object SaveImportFolder(JMMContracts.Contract_ImportFolder a) { return _impl.SaveImportFolder(a); }
private object SaveGroupFilter(JMMContracts.Contract_GroupFilter a) { return _impl.SaveGroupFilter(a); }
private object SaveGroup(JMMContracts.Contract_AnimeGroup_Save a, int b) { return _impl.SaveGroup(a,b); }
private object SaveFFDPreset(JMMContracts.Contract_FileFfdshowPreset a) { _impl.SaveFFDPreset(a); return "ok"; }
private object SaveCustomTagCrossRef(JMMContracts.Contract_CrossRef_CustomTag a) { return _impl.SaveCustomTagCrossRef(a); }
private object SaveCustomTag(JMMContracts.Contract_CustomTag a) { return _impl.SaveCustomTag(a); }
public void AddVideo(JMMContracts.PlexAndKodi.Stream dict) { videos.Add(videos.Count + 1, dict); }
public static void Send_Media(string ed2k, JMMContracts.PlexAndKodi.Media media) { //if (!ServerSettings.WebCache_XRefFileEpisode_Send) return; string uri = string.Format(@"http://{0}/api/Media", azureHostBaseAddress); List<MediaInput> inputs = new List<MediaInput>(); MediaInput input = new MediaInput(ed2k, media); inputs.Add(input); string json = JsonConvert.SerializeObject(inputs); SendData(uri, json, "POST"); }
private object SaveRenameScript(JMMContracts.Contract_RenameScript a) { return _impl.SaveRenameScript(a); }