Example #1
0
 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;
 }
Example #2
0
 public void AddSubtitle(JMMContracts.PlexAndKodi.Stream dict)
 {
     subtitles.Add(subtitles.Count + 1, dict);
 }
Example #3
0
 public void AddAudio(JMMContracts.PlexAndKodi.Stream dict)
 {
     audios.Add(audios.Count + 1, dict);
 }
Example #4
0
 private object EvaluateGroupFilter(JMMContracts.Contract_GroupFilter a)
 {
     return _impl.EvaluateGroupFilter(a);
 }
Example #5
0
 private object SaveUser(JMMContracts.Contract_JMMUser a)
 {
     return _impl.SaveUser(a);
 }
Example #6
0
 private object SaveServerSettings(JMMContracts.Contract_ServerSettings a)
 {
     return _impl.SaveServerSettings(a);
 }
Example #7
0
 private object SaveSeries(JMMContracts.Contract_AnimeSeries_Save a, int b)
 {
     return _impl.SaveSeries(a,b);
 }
Example #8
0
 //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);
 }
Example #9
0
 private object SavePlaylist(JMMContracts.Contract_Playlist a)
 {
     return _impl.SavePlaylist(a);
 }
Example #10
0
 private object SaveImportFolder(JMMContracts.Contract_ImportFolder a)
 {
     return _impl.SaveImportFolder(a);
 }
Example #11
0
 private object SaveGroupFilter(JMMContracts.Contract_GroupFilter a)
 {
     return _impl.SaveGroupFilter(a);
 }
Example #12
0
 private object SaveGroup(JMMContracts.Contract_AnimeGroup_Save a, int b)
 {
     return _impl.SaveGroup(a,b);
 }
Example #13
0
 private object SaveFFDPreset(JMMContracts.Contract_FileFfdshowPreset a)
 {
     _impl.SaveFFDPreset(a);
     return "ok";
 }
Example #14
0
 private object SaveCustomTagCrossRef(JMMContracts.Contract_CrossRef_CustomTag a)
 {
     return _impl.SaveCustomTagCrossRef(a);
 }
Example #15
0
 private object SaveCustomTag(JMMContracts.Contract_CustomTag a)
 {
     return _impl.SaveCustomTag(a);
 }
Example #16
0
 public void AddVideo(JMMContracts.PlexAndKodi.Stream dict)
 {
     videos.Add(videos.Count + 1, dict);
 }
Example #17
0
        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");
        }
Example #18
0
 private object SaveRenameScript(JMMContracts.Contract_RenameScript a)
 {
     return _impl.SaveRenameScript(a);
 }