示例#1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="ImdbId"></param>
        /// <param name="query"></param>
        /// <param name="languages"></param>
        /// <returns></returns>
        public List <SearchSubtitleResult> SearchByImdbIdThenQuery(string ImdbId, string query, OSLanguage languages)
        {
            XmlRpcStruct SearchParamsStruct = new XmlRpcStruct();

            if (languages != null)
            {
                SearchParamsStruct.Add("sublanguageid", languages.IdSubLanguage);
            }
            else
            {
                SearchParamsStruct.Add("sublanguageid", "all");
            }
            if (!String.IsNullOrEmpty(ImdbId))
            {
                SearchParamsStruct.Add("imdbid", ImdbId);
            }
            if (!String.IsNullOrEmpty(query))
            {
                SearchParamsStruct.Add("query", query);
            }
            XmlRpcStruct ResponseStruct = proxy.SearchSubtitles(Token, new object[1] {
                new XmlRpcStruct[1] {
                    SearchParamsStruct
                }
            });
            List <SearchSubtitleResult> SearchResultList = DoSearchRequest(ResponseStruct);

            return(SearchResultList);
        }
示例#2
0
        //Added by Shaif

        public List <SearchSubtitleResult> SearchOnlyByTag(string tag, OSLanguage languages)
        {
            XmlRpcStruct SearchParamsStruct = new XmlRpcStruct();

            SearchParamsStruct.Add("sublanguageid", languages.IdSubLanguage);
            SearchParamsStruct.Add("tag", tag);
            XmlRpcStruct ResponseStruct = proxy.SearchSubtitles(Token, new object[1] {
                new XmlRpcStruct[1] {
                    SearchParamsStruct
                }
            });
            List <SearchSubtitleResult> SearchResultList = DoSearchRequest(ResponseStruct);

            return(SearchResultList);
        }
示例#3
0
 private XmlRpcStruct GetSubtitles(string token, List <XmlRpcStruct> searchArray)
 {
     return(proxy.SearchSubtitles(token, searchArray.ToArray()));
 }