Ejemplo n.º 1
0
 public static string GetCnName(this EpStatusType status)
 {
     return(status switch
     {
         EpStatusType.watched => "看过",
         EpStatusType.queue => "想看",
         EpStatusType.drop => "抛弃",
         _ => "",
     });
Ejemplo n.º 2
0
        /// <summary>
        /// 更新收视进度。
        /// </summary>
        /// <param name="ep"></param>
        /// <param name="status"></param>
        /// <returns></returns>
        public async Task <bool> UpdateProgress(string ep, EpStatusType status)
        {
            var result = await $"{HOST}/ep/{ep}/status/{status}"
                         .GetAsync()
                         .ReceiveString();
            bool success = result.Contains("\"error\":\"OK\"");

            if (success)
            {
                _bgmCache.UpdateProgress(int.Parse(ep), status);
            }
            return(success);
        }