diff --git a/Assets/NicoliveClient/Plugins/Client/NicoliveApiClient.cs b/Assets/NicoliveClient/Plugins/Client/NicoliveApiClient.cs index 848e957..2b63239 100644 --- a/Assets/NicoliveClient/Plugins/Client/NicoliveApiClient.cs +++ b/Assets/NicoliveClient/Plugins/Client/NicoliveApiClient.cs @@ -402,14 +402,24 @@ private IEnumerator ExtendProgramCoroutine(IObserver observer, int /// /// 番組情報を取得する /// + public IObservable GetProgramInfoAsync(string programId) + { + return Observable.FromCoroutine(o => GetProgramInfo(o, programId)).Kick(); + } + + /// + /// 番組情報を取得する + /// SetNicoliveProgramId()で設定された番組IDを対象とする + /// public IObservable GetProgramInfoAsync() { - return Observable.FromCoroutine(GetProgramInfo).Kick(); + return Observable.FromCoroutine(o => GetProgramInfo(o, null)).Kick(); } - private IEnumerator GetProgramInfo(IObserver observer) + private IEnumerator GetProgramInfo(IObserver observer, string programId) { - var url = string.Format("https://live2.nicovideo.jp/watch/{0}/programinfo", NicoliveProgramId); + var lv = string.IsNullOrEmpty(programId) ? NicoliveProgramId : programId; + var url = string.Format("https://live2.nicovideo.jp/watch/{0}/programinfo", lv); using (var www = UnityWebRequest.Get(url)) { diff --git a/Assets/NicoliveClient/Plugins/version.txt b/Assets/NicoliveClient/Plugins/version.txt index 06b6c1a..b28a5eb 100644 --- a/Assets/NicoliveClient/Plugins/version.txt +++ b/Assets/NicoliveClient/Plugins/version.txt @@ -1 +1 @@ -2019.4.9 +2019.5.30