public BangumiInfoService(string input) { if (input == null) { return; } if (ParseEntrance.IsBangumiSeasonId(input) || ParseEntrance.IsBangumiSeasonUrl(input)) { long seasonId = ParseEntrance.GetBangumiSeasonId(input); bangumiSeason = BangumiInfo.BangumiSeasonInfo(seasonId); } if (ParseEntrance.IsBangumiEpisodeId(input) || ParseEntrance.IsBangumiEpisodeUrl(input)) { long episodeId = ParseEntrance.GetBangumiEpisodeId(input); bangumiSeason = BangumiInfo.BangumiSeasonInfo(-1, episodeId); } if (ParseEntrance.IsBangumiMediaId(input) || ParseEntrance.IsBangumiMediaUrl(input)) { long mediaId = ParseEntrance.GetBangumiMediaId(input); BangumiMedia bangumiMedia = BangumiInfo.BangumiMediaInfo(mediaId); bangumiSeason = BangumiInfo.BangumiSeasonInfo(bangumiMedia.SeasonId); } }