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

Publish 0.4.3 #334

Merged
merged 4 commits into from
Oct 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />

<application
android:name=".MainApplication"
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ buildscript {
buildToolsVersion = "34.0.0"
minSdkVersion = 23
compileSdkVersion = 34
targetSdkVersion = 34
targetSdkVersion = 30
ndkVersion = "26.1.10909125"
kotlinVersion = "1.9.22"
}
Expand Down
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
`2024.10.27 v0.4.3`
【修复】修复了部分系统上文字显示不全的问题

`2024.9.18 v0.4.2`
1. 【修复】修复本地音乐无法播放的问题

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "MusicFree",
"version": "0.4.2",
"version": "0.4.3",
"private": true,
"license": "AGPL",
"author": {
Expand Down Expand Up @@ -72,7 +72,7 @@
"react-native-mmkv": "^2.12.2",
"react-native-pager-view": "^6.3.3",
"react-native-permissions": "^4.1.5",
"react-native-reanimated": "^3.14.0",
"react-native-reanimated": "^3.16.0",
"react-native-safe-area-context": "^4.10.8",
"react-native-screens": "^3.33.0",
"react-native-share": "^10.2.1",
Expand Down
10 changes: 5 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

![微信公众号](./src/assets/imgs/wechat_channel.jpg)

软件下载方式、插件使用说明、插件开发文档可去站点 [https://musicfree.upup.fun](https://musicfree.upup.fun) 查看。
软件下载方式、插件使用说明、插件开发文档可去站点 [https://musicfree.catcat.work](https://musicfree.catcat.work) 查看。

> [!NOTE]
> - 如果你在其他的平台看到收费版/无广告版/破解版,都是假的,本来就是开源项目,**遇到收费版请直接举报**;
Expand Down Expand Up @@ -51,7 +51,7 @@

插件本质上是一个满足插件协议的 commonjs 模块。插件中定义了搜索(音乐、专辑、作者)、播放、查看专辑、作者详细信息、导入歌单、获取歌词等基本函数,插件的开发者只需要关心输入输出逻辑,至于分页、缓存等全都交给 MusicFree 控制即可。本软件通过插件来完成播放器的所有功能,这样解耦的设计也可以使得本软件可以专注于做一个功能完善的播放器,我直呼小而美。

插件开发文档可以参考 [这里](https://musicfree.upup.fun/plugin/introduction.html)
插件开发文档可以参考 [这里](https://musicfree.catcat.work/plugin/introduction.html)

需要注意的是:

Expand All @@ -66,15 +66,15 @@

你可以直接点击从网络安装插件,然后输入<https://gitee.com/maotoumao/MusicFreePlugins/raw/master/plugins.json> ,点击确认即可安装。

图文版详细使用说明可以参考公众号:[MusicFree 插件使用指南](https://mp.weixin.qq.com/s?__biz=MzkxOTM5MDI4MA==&mid=2247483875&idx=1&sn=aedf8bb909540634d927de7fd2b4b8b1&chksm=c1a390c4f6d419d233908bb781d418c6b9fd2ca82e9e93291e7c93b8ead3c50ca5ae39668212#rd),或者站点: https://musicfree.upup.fun/usage/mobile/install-plugin.html
图文版详细使用说明可以参考公众号:[MusicFree 插件使用指南](https://mp.weixin.qq.com/s?__biz=MzkxOTM5MDI4MA==&mid=2247483875&idx=1&sn=aedf8bb909540634d927de7fd2b4b8b1&chksm=c1a390c4f6d419d233908bb781d418c6b9fd2ca82e9e93291e7c93b8ead3c50ca5ae39668212#rd),或者站点: https://musicfree.catcat.work/usage/mobile/install-plugin.html

## 下载地址

请转到发布页查看:[指路](https://github.com/maotoumao/MusicFree/releases) (如果打不开可以把 github 换成 gitee),公众号回复 Musicfree 也可以。

## Q&A

使用时遇到的常见问题可以看这里:[MusicFree 使用 Q&A](https://musicfree.upup.fun/qa/common.html)
使用时遇到的常见问题可以看这里:[MusicFree 使用 Q&A](https://musicfree.catcat.work/qa/common.html)

技术交流/一起写点有意思的东西/技术向的闲聊欢迎加群:[683467814](https://jq.qq.com/?_wv=1027&k=upVpi2k3)~ (不是答疑群)

Expand Down Expand Up @@ -104,7 +104,7 @@
[点击这里](./changelog.md)

---
本项目仅供学习参考使用,基于 AGPL 协议开源;请在符合法律法规的情况下合理使用本项目,不要用于商业目的使用
本项目仅供学习参考使用,基于 AGPL3.0 协议开源;请在符合法律法规的情况下合理使用本项目,禁止用于商业目的使用

## 应用截图

Expand Down
2 changes: 1 addition & 1 deletion release/version.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"0.4.2","changeLog":["安装包上传到了飞书云文档,浏览器打开链接后有个下载说明,可以根据这个指引安装apk", "1. 【修复】修复本地音乐无法播放的问题", "以下是 0.4.1 版本的修复", "1. 【修复】修复桌面歌词无法开启的问题","2. 【修复】修复了修改桌面歌词颜色会导致闪退的问题","3. 【修复】回滚了本地音乐部分读取文件的逻辑","4. 【修复】修复了点击【编辑歌单信息】按钮无效的问题"],"download":["https://r0rvr854dd1.feishu.cn/drive/folder/KLqKfWOA3lx8MKdo8xNcYpR8n7t"]}
{"version":"0.4.3","changeLog":["安装包上传到了飞书云文档,浏览器打开链接后有个下载说明,可以根据这个指引安装apk", "【修复】修复了部分系统上文字显示不全的问题", "以下是更早版本的修复", "1. 【修复】修复本地音乐无法播放的问题", "2. 【修复】修复桌面歌词无法开启的问题","3. 【修复】修复了修改桌面歌词颜色会导致闪退的问题","4. 【修复】回滚了本地音乐部分读取文件的逻辑","5. 【修复】修复了点击【编辑歌单信息】按钮无效的问题"],"download":["https://r0rvr854dd1.feishu.cn/drive/folder/KLqKfWOA3lx8MKdo8xNcYpR8n7t"]}
11 changes: 6 additions & 5 deletions src/components/base/switch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import Animated, {
import {timingConfig} from '@/constants/commonConst';

interface ISwitchProps extends SwitchProps {}

const fixedWidth = rpx(40);

export default function ThemeSwitch(props: ISwitchProps) {
Expand All @@ -24,17 +25,17 @@ export default function ThemeSwitch(props: ISwitchProps) {
const sharedValue = useSharedValue(value ? 1 : 0);

useEffect(() => {
sharedValue.value = withTiming(
value ? 1 : 0,
timingConfig.animationNormal,
);
sharedValue.value = value ? 1 : 0;
}, [value]);

const thumbStyle = useAnimatedStyle(() => {
return {
transform: [
{
translateX: sharedValue.value * fixedWidth,
translateX: withTiming(
sharedValue.value * fixedWidth,
timingConfig.animationNormal,
),
},
],
};
Expand Down
15 changes: 11 additions & 4 deletions src/components/dialogs/components/base/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ interface IDialogProps {
onDismiss?: () => void;
children?: ReactNode;
}

function Dialog(props: IDialogProps) {
const {children, onDismiss} = props;

Expand All @@ -46,7 +47,7 @@ function Dialog(props: IDialogProps) {
};

useEffect(() => {
sharedShowValue.value = withTiming(1, timingConfig.animationFast);
sharedShowValue.value = 1;
if (backHandlerRef.current) {
backHandlerRef.current?.remove();
backHandlerRef.current = undefined;
Expand All @@ -60,7 +61,7 @@ function Dialog(props: IDialogProps) {
);

return () => {
sharedShowValue.value = withTiming(0, timingConfig.animationFast);
sharedShowValue.value = 0;
if (backHandlerRef.current) {
backHandlerRef.current?.remove();
backHandlerRef.current = undefined;
Expand All @@ -70,15 +71,21 @@ function Dialog(props: IDialogProps) {

const containerStyle = useAnimatedStyle(() => {
return {
opacity: sharedShowValue.value,
opacity: withTiming(
sharedShowValue.value,
timingConfig.animationFast,
),
};
});

const scaleAnimationStyle = useAnimatedStyle(() => {
return {
transform: [
{
scale: 0.9 + sharedShowValue.value * 0.1,
scale: withTiming(
0.9 + sharedShowValue.value * 0.1,
timingConfig.animationFast,
),
},
],
};
Expand Down
10 changes: 6 additions & 4 deletions src/components/dialogs/components/simpleDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,22 @@ import Dialog from './base';
interface ISimpleDialogProps {
title: string;
content: string | JSX.Element;
okText?: string;
cancelText?: string;
onOk?: () => void;
}
export default function SimpleDialog(props: ISimpleDialogProps) {
const {title, content, onOk} = props;
const {title, content, onOk, okText, cancelText} = props;

const actions = onOk
? [
{
title: '取消',
title: cancelText ?? '取消',
type: 'normal',
onPress: hideDialog,
},
{
title: '确认',
title: okText ?? '确认',
type: 'primary',
onPress() {
onOk?.();
Expand All @@ -28,7 +30,7 @@ export default function SimpleDialog(props: ISimpleDialogProps) {
]
: ([
{
title: '我知道了',
title: okText ?? '我知道了',
type: 'primary',
onPress() {
hideDialog();
Expand Down
14 changes: 11 additions & 3 deletions src/components/panels/base/panelBase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ import Animated, {
useAnimatedStyle,
useSharedValue,
withTiming,
EasingFunction,
} from 'react-native-reanimated';
import useColors from '@/hooks/useColors';
import {useSafeAreaInsets} from 'react-native-safe-area-context';
import useOrientation from '@/hooks/useOrientation';
import {panelInfoStore} from '../usePanel';

const ANIMATION_EASING: Animated.EasingFunction = Easing.out(Easing.exp);
const ANIMATION_EASING: EasingFunction = Easing.out(Easing.exp);
const ANIMATION_DURATION = 250;

const timingConfig = {
Expand Down Expand Up @@ -57,21 +58,23 @@ export default function (props: IPanelBaseProps) {
() => (orientation === 'horizonal' ? rpx(750) : height),
[orientation],
);

const backHandlerRef = useRef<NativeEventSubscription>();

const hideCallbackRef = useRef<Function[]>([]);

const [keyboardHeight, setKeyboardHeight] = useState(0);
useEffect(() => {
snapPoint.value = withTiming(1, timingConfig);

timerRef.current = setTimeout(() => {
if (loading) {
// 兜底
setLoading(false);
}
}, 400);
if (backHandlerRef.current) {
backHandlerRef.current?.remove();
backHandlerRef.current.remove();
backHandlerRef.current = undefined;
}
backHandlerRef.current = BackHandler.addEventListener(
Expand Down Expand Up @@ -160,9 +163,14 @@ export default function (props: IPanelBaseProps) {
useAnimatedReaction(
() => snapPoint.value,
(result, prevResult) => {
if (prevResult && result > prevResult && result > 0.8) {
if (
((prevResult !== null && result > prevResult) ||
prevResult === null) &&
result > 0.8
) {
runOnJS(mountPanel)();
}

if (prevResult && result < prevResult && result === 0) {
runOnJS(unmountPanel)();
}
Expand Down
13 changes: 8 additions & 5 deletions src/components/panels/base/panelFullscreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default function (props: IPanelFullScreenProps) {
const windowHeight = useMemo(() => vh(100), [orientation]);

useEffect(() => {
snapPoint.value = withTiming(1, timingConfig);
snapPoint.value = 1;

if (backHandlerRef.current) {
backHandlerRef.current?.remove();
Expand All @@ -69,7 +69,7 @@ export default function (props: IPanelFullScreenProps) {
backHandlerRef.current = BackHandler.addEventListener(
'hardwareBackPress',
() => {
snapPoint.value = withTiming(0, timingConfig);
snapPoint.value = 0;
return true;
},
);
Expand All @@ -80,7 +80,7 @@ export default function (props: IPanelFullScreenProps) {
if (callback) {
hideCallbackRef.current.push(callback);
}
snapPoint.value = withTiming(0, timingConfig);
snapPoint.value = 0;
},
);

Expand Down Expand Up @@ -115,10 +115,13 @@ export default function (props: IPanelFullScreenProps) {
return {
transform: [
{
scale: 0.3 + snapPoint.value * 0.7,
scale: withTiming(
0.3 + snapPoint.value * 0.7,
timingConfig,
),
},
],
opacity: snapPoint.value,
opacity: withTiming(snapPoint.value, timingConfig),
};
}
});
Expand Down
15 changes: 5 additions & 10 deletions src/pages/setting/settingTypes/aboutSetting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default function AboutSetting() {
软件相关信息会发布在公众号【
<ThemeText fontWeight="bold">一只猫头猫</ThemeText>
】中👇,也简单做了个
<LinkText linkTo="https://musicfree.upup.fun">
<LinkText linkTo="https://musicfree.catcat.work">
官方网站
</LinkText>
。(手机版和桌面版的)下载地址、使用方式、插件开发方式、常见问题都在站点中。
Expand All @@ -79,28 +79,23 @@ export default function AboutSetting() {

<ThemeText style={style.content}>
本软件完全免费,并基于{' '}
<ThemeText fontWeight="bold">GPL3.0 协议</ThemeText>{' '}
<ThemeText fontWeight="bold">AGPL3.0 协议</ThemeText>{' '}
开源,如果需要使用此代码进行二次开发,请遵守如下约定:
</ThemeText>

<ThemeText style={style.content}>
1. 二次分发版必须同样遵循 GPL 3.0 协议,开源且免费
1. 二次分发版必须同样遵循 AGPL 3.0 协议,开源且免费
</ThemeText>
<ThemeText style={style.content}>
2. 合法合规使用代码,禁止用于商业用途;
2. 合法合规使用代码,不要用于商业用途;
修改后的软件造成的任何问题由使用此代码的开发者承担
</ThemeText>
<ThemeText style={style.content}>
3.
打包、二次分发时请保留代码出处:https://github.com/maotoumao/MusicFree
</ThemeText>
<ThemeText style={style.content}>
4.
如果使用此代码的开发者不同意以上三条,则视为二次分发版中修改部分的代码遵守
CC0 协议
</ThemeText>
<ThemeText style={style.content}>
5. 如果开源协议变更,将在此 Github 仓库更新,不另行通知
4. 如果开源协议变更,将在此 Github 仓库更新,不另行通知
</ThemeText>
<ThemeText style={style.content}>
代码已开源到{' '}
Expand Down
10 changes: 10 additions & 0 deletions src/pages/setting/settingTypes/basicSetting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import useColors from '@/hooks/useColors';
import ColorBlock from '@/components/base/colorBlock';
import LyricManager from '@/core/lyricManager';
import {SortType} from '@/constants/commonConst.ts';
import Clipboard from '@react-native-clipboard/clipboard';
import toast from '@/utils/toast';

function createSwitch(
title: string,
Expand Down Expand Up @@ -475,6 +477,14 @@ export default function BasicSetting() {
</Paragraph>
</ScrollView>
),
cancelText: '我知道了',
okText: '复制日志',
onOk() {
if (errorLogContent) {
Clipboard.setString(errorLogContent);
toast.success('复制成功');
}
},
});
},
},
Expand Down
Loading