Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

基本分集评论支持 #403

Merged
merged 6 commits into from
Nov 18, 2024
Merged

基本分集评论支持 #403

merged 6 commits into from
Nov 18, 2024

Conversation

ErBWs
Copy link
Contributor

@ErBWs ErBWs commented Nov 17, 2024

富文本解析还没写,那个工作量感觉挺大的
image

@Predidit
Copy link
Owner

Predidit commented Nov 17, 2024

啊,周末真是写代码的好时间。

我正准备提交制作人员列表的相关代码,现在要处理冲突了。

PR是你先发起的,我会在这个PR合并后处理我自己的代码。

@Predidit
Copy link
Owner

@ErBWs

看上去不错,不过在 info_controller 的92行处使用 int.parser 进行强制数据类型转换感觉有些不妥,这非常有可能抛出错误,我们应该使用 try-catch 包裹它,并在失败时使用 currentEpisode 作为后备。

@ErBWs
Copy link
Contributor Author

ErBWs commented Nov 17, 2024

那不妨将这个 pr 延后合并,我现在没有办法在短时间内做出修改,可以先处理制作人员部分

@Predidit
Copy link
Owner

Predidit commented Nov 17, 2024

也许我们可以使用 Utils.extractEpisodeNumber 来避免手动输入当前选集,并在解析失败(函数返回0时),使用手动输入或 currentEpisode 作为后备

@ErBWs
Copy link
Contributor Author

ErBWs commented Nov 17, 2024

的确

另外或许声优表也应该使用 private api?api.bgm.tv 获取的内容看起来和网站上的不一致,比如角色图像的 grid 是全身照之类的。而 private api 是一致的。也许可以去提个 issue

@Predidit
Copy link
Owner

啊,居然是不一样的吗,也许我们应该切换到 private api

我们可以这个PR完成后进行切换

@ErBWs
Copy link
Contributor Author

ErBWs commented Nov 17, 2024

解析函数很难返回 0,通过增加标题显示和手动切换按钮解决错误集数的问题
image

@Predidit
Copy link
Owner

episodeInfo 这个数组的使用太奇怪了,在用奇怪的方法实现多返回值。

应该为其新建一个episodeInfo 类在 modules 目录下面。将 name namecn 等作为其属性,直接返回一个 episodeInfo 实例化的对象。

多返回值是 golang 这种函数式语言常用的做法,并不面向对象。

@Predidit Predidit merged commit dd4884e into Predidit:main Nov 18, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants