diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-10-12 21:17:37 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-10-12 21:17:37 -0500 |
| commit | 1a39faee75cb1c5ff8545444f3e653e2958d5452 (patch) | |
| tree | f7ce7862dafad2dfd5d482863d1e0e1a4c695b23 /src/invidious.cr | |
| parent | 81b447782a872a3c83bbbd9c6c76cb0a3a0eacc0 (diff) | |
| download | invidious-1a39faee75cb1c5ff8545444f3e653e2958d5452.tar.gz invidious-1a39faee75cb1c5ff8545444f3e653e2958d5452.tar.bz2 invidious-1a39faee75cb1c5ff8545444f3e653e2958d5452.zip | |
Add subCountText and add XHR alternative for subscribing to channels
Diffstat (limited to 'src/invidious.cr')
| -rw-r--r-- | src/invidious.cr | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/invidious.cr b/src/invidious.cr index 5d929996..74c70820 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -1739,7 +1739,7 @@ get "/channel/:ucid" do |env| page ||= 1 begin - author, ucid, auto_generated = get_about_info(ucid) + author, ucid, auto_generated, sub_count = get_about_info(ucid) rescue ex error_message = "User does not exist" next templated "error" @@ -2298,6 +2298,7 @@ get "/api/v1/videos/:id" do |env| json.field "author", video.author json.field "authorId", video.ucid json.field "authorUrl", "/channel/#{video.ucid}" + json.field "subCountText", video.sub_count_text json.field "lengthSeconds", video.info["length_seconds"].to_i if video.info["allow_ratings"]? |
