Esempio n. 1
0
        private void bnVisitTVcom_Click(object sender, System.EventArgs e)
        {
            if (lvFMNewShows.SelectedItems.Count == 0)
            {
                return;
            }

            if (!(lvFMNewShows.SelectedItems[0].Tag is PossibleNewTvShow fme))
            {
                return;
            }

            if (fme.CodeKnown)
            {
                switch (fme.Provider)
                {
                case TVDoc.ProviderType.TheTVDB:
                    Helpers.OpenUrl(TheTVDB.API.WebsiteShowUrl(fme.ProviderCode));
                    break;

                case TVDoc.ProviderType.TVmaze:
                    Helpers.OpenUrl(TVmaze.LocalCache.Instance.GetSeries(fme.ProviderCode)?.WebUrl);
                    break;

                case TVDoc.ProviderType.TMDB:
                    Helpers.OpenUrl($"https://www.themoviedb.org/tv/{fme.ProviderCode}");
                    break;

                default:
                    break;
                }
            }
        }
Esempio n. 2
0
        private void bnVisitTVcom_Click(object sender, System.EventArgs e)
        {
            if (lvFMNewShows.SelectedItems.Count == 0)
            {
                return;
            }

            if (!(lvFMNewShows.SelectedItems[0].Tag is PossibleNewMovie fme))
            {
                return;
            }

            if (fme.CodeKnown)
            {
                switch (fme.Provider)
                {
                case TVDoc.ProviderType.TheTVDB:
                    Helpers.OpenUrl(TheTVDB.API.WebsiteShowUrl(fme.ProviderCode));
                    break;

                case TVDoc.ProviderType.TMDB:
                    Helpers.OpenUrl($"https://www.themoviedb.org/movie/{fme.ProviderCode}");
                    break;
                }
            }
        }
Esempio n. 3
0
        private static void TvdbFor(ShowConfiguration?si)
        {
            if (si?.WebsiteUrl is null)
            {
                return;
            }

            Helpers.OpenUrl(si.WebsiteUrl);
        }
Esempio n. 4
0
        private static void TvdbFor(ProcessedSeason?seas)
        {
            if (seas is null)
            {
                return;
            }

            Helpers.OpenUrl(seas.TVDBWebsiteUrl);
        }
Esempio n. 5
0
        public static void SearchForMovie(MovieConfiguration mov)
        {
            string       serverName = TVSettings.Instance.JackettServer;
            string       serverPort = TVSettings.Instance.JackettPort;
            const string FORMAT     = "{ShowName} ({Year})";

            string url = $"http://{serverName}:{serverPort}/UI/Dashboard#search={WebUtility.UrlEncode(CustomMovieName.NameFor(mov, FORMAT))}&tracker=&category=";

            Helpers.OpenUrl(url);
        }
Esempio n. 6
0
        public static void SearchForEpisode(ProcessedEpisode episode)
        {
            string       serverName = TVSettings.Instance.JackettServer;
            string       serverPort = TVSettings.Instance.JackettPort;
            const string FORMAT     = "{ShowName} S{Season:2}E{Episode}[-E{Episode2}]";

            string url = $"http://{serverName}:{serverPort}/UI/Dashboard#search={WebUtility.UrlEncode(CustomEpisodeName.NameForNoExt(episode,FORMAT,false))}&tracker=&category=";

            Helpers.OpenUrl(url);
        }
Esempio n. 7
0
        public bool OnBeforeBrowse(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, bool userGesture, bool isRedirect)
        {
            if (request.Url is null)
            {
                return(false);
            }

            string url = request.Url;

            if (string.Compare(url, "about:blank", StringComparison.Ordinal) == 0)
            {
                return(false); // don't intercept about:blank
            }

            if (url == UI.QuickStartGuide())
            {
                return(false); // let the quick-start guide be shown
            }

            if (url.Contains("://www.youtube.com/embed/"))
            {
                return(false); // let embedded youtube URL be show
            }

            if (url.StartsWith(UI.EXPLORE_PROXY, StringComparison.InvariantCultureIgnoreCase))
            {
                string openlocation = HttpUtility.UrlDecode(url.Substring(UI.EXPLORE_PROXY.Length));
                if (Helpers.OpenFolder(openlocation))
                {
                    return(true);
                }
                Helpers.OpenFolderSelectFile(openlocation);
                return(true);
            }

            if (url.StartsWith(UI.WATCH_PROXY, StringComparison.InvariantCultureIgnoreCase))
            {
                string fileName = HttpUtility.UrlDecode(url.Substring(UI.WATCH_PROXY.Length)).Replace('/', '\\');
                Helpers.OpenFile(fileName);
                return(true);
            }

            if (url.IsHttpLink() || url.IsFileLink())
            {
                Helpers.OpenUrl(url);
                return(true);
            }
            return(false);
        }
Esempio n. 8
0
        public override ActionOutcome Go(TVRenameStats stats)
        {
            bool isDownloadable = url.IsWebLink();

            try
            {
                try
                {
                    if (TVSettings.Instance.CheckuTorrent && isDownloadable)
                    {
                        FileInfo downloadedFile = DownloadFile();
                        new uTorrent().StartTorrentDownload(downloadedFile);
                        return(ActionOutcome.Success());
                    }

                    if (TVSettings.Instance.CheckqBitTorrent)
                    {
                        if (isDownloadable && TVSettings.Instance.qBitTorrentDownloadFilesFirst)
                        {
                            FileInfo downloadedFile = DownloadFile();
                            new qBitTorrent().StartTorrentDownload(downloadedFile);
                            return(ActionOutcome.Success());
                        }
                        else
                        {
                            new qBitTorrent().StartUrlDownload(url);
                            return(ActionOutcome.Success());
                        }
                    }
                }
                catch (DownloadFailedException e)
                {
                    //Don't worry about this error, we'll retry below
                }

                if (Helpers.OpenUrl(url))
                {
                    return(ActionOutcome.Success());
                }

                return(new ActionOutcome("No torrent clients enabled to download RSS - Tried to use system open, but failed"));
            }
            catch (Exception e)
            {
                return(new ActionOutcome(e));
            }
        }
Esempio n. 9
0
        private void bnVisitTVcom_Click(object sender, System.EventArgs e)
        {
            if (lvFMNewShows.SelectedItems.Count == 0)
            {
                return;
            }

            if (!(lvFMNewShows.SelectedItems[0].Tag is PossibleNewTvShow fme))
            {
                return;
            }

            if (fme.TVDBCode != -1)
            {
                Helpers.OpenUrl(TheTVDB.API.WebsiteShowUrl(fme.TVDBCode)); //todo - how will bulk add work for MTVmaze
            }
        }
Esempio n. 10
0
        private void button1_Click(object sender, System.EventArgs e)
        {
            double amount = 5.00; // default amount

            try
            {
                string s = Regex.Replace(comboBox1.Text, "\\$", "");
                amount = double.Parse(s);
            }
            catch
            {
                // ignored
            }

            string currency = comboBox2.Text;

            CultureInfo usCi = new CultureInfo("en-US", false);

            //string paypalUrl = "https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=paypal%40tvrename%2ecom&item_name=TVRename%20thank-you%20drink&no_shipping=0&no_note=1&amount=" + amount.ToString("N", usCi) + "&tax=0&currency_code=" + currency + "&lc=AU&bn=PP%2dDonationsBF&charset=UTF%2d8";
            string paypalUrl = "https://paypal.me/TVRenamePaypal/" + amount.ToString("N", usCi) + currency;

            Helpers.OpenUrl(paypalUrl);
        }
Esempio n. 11
0
 private static void OpenInfoWindow(string page)
 {
     Helpers.OpenUrl($"https://www.tvrename.com/manual/user{page}");
 }
Esempio n. 12
0
 private void llCustomSearchPreview_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     Helpers.OpenUrl(llCustomSearchPreview.Text);
 }
Esempio n. 13
0
 public override void OnClick(SourceGrid.CellContext sender, EventArgs e)
 {
     Helpers.OpenUrl("http://www.imdb.com/find?s=nm&q=" + who);
 }
Esempio n. 14
0
 private void linkForum_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     Helpers.OpenUrl("https://groups.google.com/forum/#!forum/tvrename");
 }