public bool isLegal() { if (Url.IndexOf("http://www.tudou.com/playlist/id") == 0) { danType = DouDanType.SimpleDouDan; return(true); } else if (url.IndexOf("http://www.tudou.com/playlist/album/id") == 0) { danType = DouDanType.OfficeDouDan; return(true); } else if (url.StartsWith("http://www.tudou.com/home/")) { danType = DouDanType.UserHome; return(true); } else { return(false); } }
public bool isLegal() { if (Url.IndexOf("http://www.tudou.com/playlist/id") == 0) { danType = DouDanType.SimpleDouDan; return true; } else if (url.IndexOf("http://www.tudou.com/playlist/album/id") == 0) { danType = DouDanType.OfficeDouDan; return true; } else if (url.StartsWith("http://www.tudou.com/home/")) { danType = DouDanType.UserHome; return true; } else { return false; } }