Skip to content

Commit

Permalink
Merge pull request #314 from lovegaoshi/dev
Browse files Browse the repository at this point in the history
fix: stuff
  • Loading branch information
lovegaoshi authored Feb 28, 2024
2 parents 9168bec + 0936565 commit 28af105
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 9 additions & 6 deletions src/components/playlist/SongList/SongInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@ const SongInfo = ({
};
const checked = selected[getSongIndex()];

const isItemSolid = () => {
if (item.liveStatus === true || !networkCellular) return true;
if (playerSetting.dataSaver && !NoxCache.noxMediaCache?.peekCache(item)) {
return false;
}
return true;
};

return (
<View
style={[
Expand All @@ -81,12 +89,7 @@ const SongInfo = ({
backgroundColor: currentPlaying
? playerStyle.customColors.playlistDrawerBackgroundColorTransparent
: 'transparent',
opacity:
item.liveStatus !== false &&
!playerSetting.dataSaver &&
(NoxCache.noxMediaCache?.peekCache(item) || !networkCellular)
? undefined
: 0.5,
opacity: isItemSolid() ? undefined : 0.5,
},
]}
>
Expand Down
2 changes: 1 addition & 1 deletion src/utils/mediafetch/local.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const songFetch = async (
cover: '',
lyric: '',
page: 0,
duration: v.duration,
duration: v.duration / 1000,
album: v.album,
source: SOURCE.local,
})
Expand Down

0 comments on commit 28af105

Please sign in to comment.