Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] 关于播放本地音乐提示“当前非WIFI环境,侧边栏设置中打开【使用移动网络下载】功能后可继续下载”Bug #358

Open
3 tasks done
lionkk007 opened this issue Dec 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@lionkk007
Copy link

  • 已阅读 Q&A

  • 非插件导致(如搜索结果不全,无法导入等都属于插件问题)

  • 不与其他 issue 重复

问题描述

(\src\core\trackPlayer\index.ts)文件中
if (
Network.isCellular() &&
!Config.get('setting.basic.useCelluarNetworkPlay') &&
!LocalMusicSheet.isLocalMusic(musicItem)
) {
await ReactNativeTrackPlayer.reset();
throw new Error(PlayFailReason.FORBID_CELLUAR_NETWORK_PLAY);
}
这段代码中,假设我扫描完一个目录的音乐,然后添加到一个歌单A,然后清空本地音乐列表(localSheet),再重新扫描本地音乐的另一个目录,添加到另一个歌单B,此时播放歌单A会因为LocalMusicSheet.isLocalMusic(musicItem)为undefined而触发 “当前非WIFI环境,侧边栏设置中打开【使用移动网络下载】功能后可继续下载”问题。

预期行为

建议修改LocalMusicSheet.isLocalMusic(musicItem)函数,根据当前歌曲目录判断为是否本地,而不是在判断是否在本地音乐列表中(localSheet。

详细的复现步骤

截图

日志

No response

其他信息

API 29

@lionkk007 lionkk007 added the bug Something isn't working label Dec 12, 2024
@lionkk007 lionkk007 changed the title [BUG] 关于播发本地音乐提示“当前非WIFI环境,侧边栏设置中打开【使用移动网络下载】功能后可继续下载”Bug [BUG] 关于播放本地音乐提示“当前非WIFI环境,侧边栏设置中打开【使用移动网络下载】功能后可继续下载”Bug Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant