mirror of
https://github.com/zimplexing/OrionTV.git
synced 2026-02-21 09:14:44 +08:00
fix: Update channel change logic to use useCallback for better performance; adjust resource check in VideoSourceSection
This commit is contained in:
@@ -31,7 +31,7 @@ export const VideoSourceSection: React.FC<VideoSourceSectionProps> = ({ onChange
|
||||
const resourcesList = await api.getResources();
|
||||
setResources(resourcesList);
|
||||
|
||||
if (videoSource.enabledAll && resourcesList.length === 0) {
|
||||
if (videoSource.enabledAll && Object.keys(videoSource.sources).length === 0) {
|
||||
const allResourceKeys: { [key: string]: boolean } = {};
|
||||
for (const resource of resourcesList) {
|
||||
allResourceKeys[resource.key] = true;
|
||||
|
||||
Reference in New Issue
Block a user