Skip to content

fix stream id#274

Merged
a-wing merged 6 commits intobinbat:mainfrom
agougougoua:main
Apr 1, 2025
Merged

fix stream id#274
a-wing merged 6 commits intobinbat:mainfrom
agougougoua:main

Conversation

@agougougoua
Copy link
Copy Markdown
Contributor

No description provided.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2025

Codecov Report

Attention: Patch coverage is 0% with 12 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
liveman/src/route/stream.rs 0.00% 11 Missing ⚠️
liveman/src/error.rs 0.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
liveman/src/error.rs 0.00% <0.00%> (ø)
liveman/src/route/stream.rs 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

) {
const wretchError = error as { response: { status: number } };
if (wretchError.response.status === 409) {
window.alert('资源已存在,请使用不同的 streamId');
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use English

try {
return await w.url(`/api/streams/${streamId}?nodes=${currentNode}`).post().res();
} catch (error: unknown) {
if (
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move to outside, API warp is only API, UI and window shouldn't in API warp

export async function createStream(streamId: string): Promise<unknown> {
const currentNode = getCurrentNode();
try {
return await w.url(`/api/streams/${streamId}?nodes=${currentNode}`).post().res();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is Liveman UI and Live777 UI common function, Live777 dispatcher is correct, but liveman need random dispatcher, There has problem: only dispatch nodes=0

}
export function getCurrentNode(): string {
const urlParams = new URLSearchParams(window.location.search);
return urlParams.get('nodes') || '0';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nodes name is set in alias = "static-0"

nodes=0 is only developer mode. https://github.com/binbat/live777/tree/main/conf/livenil

@a-wing a-wing added bug Something isn't working mod::live777 Live777 server mod::webui Web debuger labels Apr 1, 2025
@a-wing a-wing merged commit 1b3f886 into binbat:main Apr 1, 2025
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working mod::live777 Live777 server mod::webui Web debuger

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants