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

[New Feature] 合集 support #14

Closed
yuioto opened this issue Feb 9, 2024 · 3 comments · Fixed by #85
Closed

[New Feature] 合集 support #14

yuioto opened this issue Feb 9, 2024 · 3 comments · Fixed by #85
Assignees
Labels
enhancement New feature or request

Comments

@yuioto
Copy link

yuioto commented Feb 9, 2024

List subscription 合集 when fav status -l.

Want to subscribe to 合集 just like favorites.

Otherwise it will be difficult to download them.

@kingwingfly kingwingfly added the enhancement New feature or request label Feb 10, 2024
@kingwingfly
Copy link
Owner

Now I have almost finished fav_core.

Mainly 3 traits for Res, ResSet, ResSets ("res" means resource).

But which "合集" did you mean?

This?
Screenshot 2024-02-18 at 00 15 44
Or this?
Screenshot 2024-02-18 at 00 16 15

If you mean the latter, it looks like this:

[fav_utils_ng/src/bili/ops.rs:72:9] json = Array [
    Object {
        "cid": Number(248053346),
        "dimension": Object {
            "height": Number(1040),
            "rotate": Number(0),
            "width": Number(1920),
        },
        "duration": Number(406),
        "from": String("vupload"),
        "page": Number(1),
        "part": String("1.1 - 简介"),
        "vid": String(""),
        "weblink": String(""),
    },
    Object {
        "cid": Number(248053380),
        "dimension": Object {
            "height": Number(1040),
            "rotate": Number(0),
            "width": Number(1920),
        },
        "duration": Number(198),
        "from": String("vupload"),
        "page": Number(2),
        "part": String("1.2 - 安装 Rust"),
        "vid": String(""),
        "weblink": String(""),
    },
    Object {
        "cid": Number(248053407),
        "dimension": Object {
            "height": Number(1040),
            "rotate": Number(0),
            "width": Number(1920),
        },
        "duration": Number(251),
        "from": String("vupload"),
        "page": Number(3),
        "part": String("1.3 - Hello World"),
        "vid": String(""),
        "weblink": String(""),
    },
...

The problem is: Is it a Res or ResSet? Or I just easily treat it as several Res?

By the way, 合集 is favorited only if one of the videos is favorited. It's not acceptable to save the whole.

However, it can be implemented by defining Res like this:

message BiliRes {
    string bvid = 1;
    string title = 2;
    int32 status = 3;
    int64 cid = 4;
    repeated BiliPage pages = 5;
    Upper owner = 15;
}

message BiliPage {
    int64 cid = 1;
    int32 page = 2;
    string part = 3;
}

Use a for loop on pages to download.

@yuioto
Copy link
Author

yuioto commented Feb 17, 2024

合集 has multiple aids or bids. If there are multiple cids in one aid or bid, it should be called 分集.

So, I'm talking about the former.

for example https://www.bilibili.com/festival/bnj2024

@kingwingfly kingwingfly self-assigned this Jun 18, 2024
@kingwingfly kingwingfly linked a pull request Jun 18, 2024 that will close this issue
@kingwingfly
Copy link
Owner

@yuioto Finished in v0.2.29 . Test it as you like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants