private void btnDownload_Click(object sender, EventArgs e)
        {
            int index = lvwTitles.SelectedIndices[0];

            string location = Path.GetDirectoryName(txtMovieLocation.Text);

            SearchSubtitleResult item = foundSubtitles[index];
            string subtitle           = location + "\\" + item.SubFileName;

            OSDotNetSession session = OSDotNetSession.LogIn("", "", "fr", "iPhoneVideoHelper");

            using (MemoryStream st = session.DownloadSubtitle(item))
            {
                using (FileStream fs = new FileStream(subtitle, FileMode.OpenOrCreate))
                {
                    st.WriteTo(fs);

                    st.Flush();
                    st.Close();
                    session.LogOut();
                }
            }

            findExistingSubtitles();
        }
        private void findSubtitles(string file)
        {
            try
            {
                OSDotNetSession session  = OSDotNetSession.LogIn("", "", "fr", "iPhoneVideoHelper");
                FileInfo        fileInfo = new FileInfo(file);
                List <string>   codes    = new List <string>();
                if (rdbBalkan.Checked)
                {
                    codes.Add("scc");
                    codes.Add("hrv");
                    codes.Add("bos");
                }
                else
                {
                    codes.Add("eng");
                }
                foreach (string code in codes)
                {
                    List <SearchSubtitleResult> List = session.SearchByFile(fileInfo,
                                                                            OSLanguageHelper.GetOSLanguageById(code));

                    foreach (SearchSubtitleResult res in List)
                    {
                        foundSubtitles.Add(res);
                    }
                }

                string imdbId = foundSubtitles[0].IDMovieImdb;
                foundSubtitles.Clear();

                if (rdbBalkan.Checked)
                {
                    codes.Add("scc");
                    codes.Add("hrv");
                    codes.Add("bos");
                }
                else
                {
                    codes.Add("eng");
                }
                foreach (string code in codes)
                {
                    List <SearchSubtitleResult> List = session.SearchByImdbId(imdbId,
                                                                              OSLanguageHelper.GetOSLanguageById(code));

                    foreach (SearchSubtitleResult res in List)
                    {
                        foundSubtitles.Add(res);
                    }
                }
                session.LogOut();
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
            }
        }