mirror of
https://github.com/imputnet/cobalt.git
synced 2026-03-16 11:50:43 -05:00
[PR #124] [CLOSED] Fix local development issue + Add title of YouTube video #1020
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/imputnet/cobalt/pull/124
Author: @fluofoxxo
Created: 5/8/2023
Status: ❌ Closed
Base:
current← Head:current📝 Commits (4)
b626270Fix local development download issuese8a48c5Add video title to YouTube download filenamec631aebMerge branch 'current' of https://github.com/wukko/cobalt into current834c03aResolve cyclic dependency to fix JS-E1008 in DeepSource📊 Changes
5 files changed (+138 additions, -9 deletions)
View changed files
📝
src/front/cobalt.js(+2 -1)📝
src/modules/processing/match.js(+5 -1)📝
src/modules/processing/services/youtube.js(+66 -3)📝
src/modules/stream/manage.js(+3 -3)📝
src/modules/sub/utils.js(+62 -1)📄 Description
This PR fixes an issue when deploying cobalt under the standard settings on localhost, where POSTing
/api/jsonwould yield a response that contained a URL formatted ashttps://localhost/streamas opposed to the validhttp://localhost:9000/stream. This has been solved by only sending the slug of the URL, and using the frontend to get the current site's origin and prepend it to the slug for an API call. This resolves issues related tohttp://vs.https://usage, as well as assures that the server's port is included in the request URL, both of which are essential to getting a local development instance working.Adding the title of the video contributes towards solving #108, starting with YouTube video title. The title of the video is inserted in the downloaded filename after
youtubeat the start of the filename and before the video's ID.For ease of type hinting in supported IDEs, typing has been added to some objects related to video information. These typings should go into a better spot, although no precedent exists for where typed objects should go, if they should be present.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.