Skip to content

Commit

Permalink
feat: 支持虎牙平台
Browse files Browse the repository at this point in the history
  • Loading branch information
WhiteMinds committed Dec 10, 2022
1 parent e0dd3c0 commit 53bcc06
Show file tree
Hide file tree
Showing 5 changed files with 469 additions and 12 deletions.
1 change: 1 addition & 0 deletions packages/http-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"dependencies": {
"@autorecord/bilibili-recorder": "^1.1.1",
"@autorecord/douyu-recorder": "^1.1.2",
"@autorecord/huya-recorder": "^1.0.0",
"@autorecord/manager": "workspace:^",
"@autorecord/shared": "workspace:^",
"cors": "^2.8.5",
Expand Down
3 changes: 2 additions & 1 deletion packages/http-server/src/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
} from '@autorecord/manager'
import { provider as providerForDouYu } from '@autorecord/douyu-recorder'
import { provider as providerForBilibili } from '@autorecord/bilibili-recorder'
import { provider as providerForHuYa } from '@autorecord/huya-recorder'
import { isDebugMode, paths } from './env'
import {
pick,
Expand All @@ -34,7 +35,7 @@ export interface RecorderExtra {
}

export const recorderManager = createRecorderManager<RecorderExtra>({
providers: [providerForDouYu, providerForBilibili],
providers: [providerForDouYu, providerForBilibili, providerForHuYa],
})

export function addRecorderWithAutoIncrementId(
Expand Down
1 change: 1 addition & 0 deletions packages/web/src/views/RecordersManage/RecorderCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ const { recorder } = defineProps<{ recorder: ClientRecorder }>()
const providers = [
{ id: 'DouYu', name: '斗鱼' },
{ id: 'Bilibili', name: 'Bilibili' },
{ id: 'HuYa', name: '虎牙' },
]
const requesting = ref(false)
Expand Down
1 change: 1 addition & 0 deletions packages/web/src/views/RecordersManage/RecorderEdit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ const Qualities = ['lowest', 'low', 'medium', 'high', 'highest'] as const
const providers = [
{ id: 'DouYu', name: '斗鱼' },
{ id: 'Bilibili', name: 'Bilibili' },
{ id: 'HuYa', name: '虎牙' },
]
const defaultProviderId = providers[0].id
Expand Down
Loading

0 comments on commit 53bcc06

Please sign in to comment.