Пример #1
0
        public DataTable FindLRCs(string artist, string title)
        {
            this.artist = artist;
            this.title  = title;

            DataTable lrcs = null;

            if (Abort == false)
            {
                lrcFinder = new lrcfinder.LrcFinder();

                try
                {
                    string url = GetUrl();

                    if (url == null)
                    {
                        lrcs = null;
                    }
                    else
                    {
                        lrcFinder.Url = GetUrl();

                        lrcs = lrcFinder.FindLRCs(this.artist, this.title);
                    }
                }
                catch
                {
                    //lrcs = null;
                }
            }

            return(lrcs);
        }
Пример #2
0
        public bool SaveLrcWithGuid(string lrcFile, Guid guid)
        {
            lrcFinder = new lrcfinder.LrcFinder();

            try
            {
                string url = GetUrl();

                if (url == null)
                {
                    return(false);
                }
                else
                {
                    lrcFinder.Url = GetUrl();

                    string result = lrcFinder.SaveLRCWithGuid(lrcFile, guid);
                    return(result.Equals("DONE"));
                }
            }
            catch
            {
                return(false);
            }
        }
        public DataTable FindLRCs(string artist, string title)
        {
            this.artist = artist;
            this.title = title;

            DataTable lrcs = null;

            if (Abort == false)
            {
                lrcFinder = new lrcfinder.LrcFinder();

                try
                {
                    string url = GetUrl();

                    if (url == null)
                    {
                        lrcs = null;
                    }
                    else
                    {
                        lrcFinder.Url = GetUrl();

                        lrcs = lrcFinder.FindLRCs(this.artist, this.title);
                    }
                }
                catch
                {
                    //lrcs = null;
                }
            }

            return lrcs;
        }
Пример #4
0
        public string FindLRC(string artist, string title)
        {
            this.artist = artist;
            this.title  = title;

            string lrc = string.Empty;

            if (Abort == false)
            {
                lrcFinder = new lrcfinder.LrcFinder();

                try
                {
                    string url = GetUrl();

                    if (url == null)
                    {
                        lrc = null;
                    }
                    else
                    {
                        lrcFinder.Url = GetUrl();

                        lrc = lrcFinder.FindLRC(this.artist, this.title);
                    }
                }
                catch (Exception e)
                {
                    lrc = "Not found";
                }
            }

            if (LrcReturned(lrc))
            {
                //Encoding iso8859 = Encoding.GetEncoding("ISO-8859-1");
                //string make = Encoding.UTF8.GetString(iso8859.GetBytes(lrc));
                return(lrc);
            }
            else
            {
                return("Not found");
            }
        }
        public string FindLRC(string artist, string title)
        {
            this.artist = artist;
            this.title = title;

            string lrc = string.Empty;

            if (Abort == false)
            {
                lrcFinder = new lrcfinder.LrcFinder();

                try
                {
                    string url = GetUrl();

                    if (url == null)
                    {
                        lrc = null;
                    }
                    else
                    {
                        lrcFinder.Url = GetUrl();

                        lrc = lrcFinder.FindLRC(this.artist, this.title);
                    }
                }
                catch (Exception e)
                {
                    lrc = "Not found";
                }
            }

            if (LrcReturned(lrc))
            {
                //Encoding iso8859 = Encoding.GetEncoding("ISO-8859-1");
                //string make = Encoding.UTF8.GetString(iso8859.GetBytes(lrc));
                return lrc;
            }
            else
            {
                return "Not found";
            }
        }
Пример #6
0
        public string FindLRC()
        {
            var artist = Artist;
            var title = Title;

            var lrc = string.Empty;

            if (Abort == false)
            {
                var lrcFinder = new lrcfinder.LrcFinder();

                try
                {
                    var url = GetUrl(lrcFinder);

                    if (url == null)
                    {
                        lrc = null;
                    }
                    else
                    {
                        lrcFinder.Url = GetUrl(lrcFinder);

                        lrc = lrcFinder.FindLRC(artist, title);
                    }
                }
                catch (Exception)
                {
                    lrc = NotFound;
                }
            }

            if (LrcReturned(lrc))
            {
                //Encoding iso8859 = Encoding.GetEncoding("ISO-8859-1");
                //string make = Encoding.UTF8.GetString(iso8859.GetBytes(lrc));
                return lrc;
            }
            return NotFound;
        }
Пример #7
0
        public static bool SaveLrcWithGuid(string lrcFile, Guid guid)
        {
            var lrcFinder = new lrcfinder.LrcFinder();

            try
            {
                var url = GetUrl(lrcFinder);

                if (url == null)
                {
                    return false;
                }
                lrcFinder.Url = GetUrl(lrcFinder);

                var result = lrcFinder.SaveLRCWithGuid(lrcFile, guid);
                return result.Equals("DONE");
            }
            catch
            {
                return false;
            }
        }
Пример #8
0
        public bool SaveLrc(string lrcFile)
        {
            var lrcFinder = new lrcfinder.LrcFinder();

            try
            {
                var url = GetUrl(lrcFinder);

                if (url == null)
                {
                    return false;
                }
                lrcFinder.Url = GetUrl(lrcFinder);

                var result = lrcFinder.SaveLRC(lrcFile);

                return result.Equals("DONE");
            }
            catch
            {
                return false;
            }
        }
Пример #9
0
        public DataTable FindLRCs()
        {
            var artist = Artist;
            var title = Title;

            DataTable lrcs = null;

            if (Abort == false)
            {
                var lrcFinder = new lrcfinder.LrcFinder();

                try
                {
                    var url = GetUrl(lrcFinder);

                    if (url != null)
                    {
                        lrcFinder.Url = GetUrl(lrcFinder);

                        lrcs = lrcFinder.FindLRCs(artist, title);
                    }
                }
                catch
                {
                    ;
                }
            }

            return lrcs;
        }
        public bool SaveLrcWithGuid(string lrcFile, Guid guid)
        {
            lrcFinder = new lrcfinder.LrcFinder();

            try
            {
                string url = GetUrl();

                if (url == null)
                {
                    return false;
                }
                else
                {
                    lrcFinder.Url = GetUrl();

                    string result = lrcFinder.SaveLRCWithGuid(lrcFile, guid);
                    return result.Equals("DONE");
                }
            }
            catch
            {
                return false;
            }
        }