public List <string> searchFiles(string[] data)
        {
            lock (loadFilesLock)
            {
                List <string> urls = new List <string>();

                foreach (string file in data)
                {
                    var dataJson = DatabaseFilesEntity.FromJson(file);

                    if (UtilityTools.ContainsAll(dataJson.Title.ToLower(), UtilityTools.GetWords(txtFilesSearchResults.Text.ToLower())) && dataJson.Title.Contains(selectedFilesQuality) && dataJson.Type.Contains(selectedFilesFileType) && dataJson.Host.Contains(selectedFilesHost))
                    {
                        urls.Add(dataJson.ToJson());
                    }
                }
                return(urls);
            }
        }
示例#2
0
        public List <string> searchFiles(List <string> dataFiles)
        {
            lock (loadFilesLock)
            {
                List <string> urls = new List <string>();

                foreach (string file in dataFiles)
                {
                    var dataJson = JsonConvert.DeserializeObject <Models.WebFile>(file);

                    if (UtilityTools.ContainsAll(dataJson.Title.ToLower(), UtilityTools.GetWords(txtSearchFiles.Text.ToLower())) && selectedFilesFileType.Contains(dataJson.Type) && dataJson.Host.Contains(selectedFilesHost))
                    {
                        urls.Add(JsonConvert.SerializeObject(dataJson));
                    }
                }
                return(urls);
            }
        }