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

fix other places of duration display (and other minor fixes) #249

Merged
merged 3 commits into from
Sep 20, 2023
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
2 changes: 1 addition & 1 deletion src/main/features/linux/mpris.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ ipcMain.on('update-song', (_event, args: SongUpdate) => {

mprisPlayer.metadata = {
'mpris:artUrl': upsizedImageUrl,
'mpris:length': song.duration ? Math.round((song.duration || 0) * 1e6) : null,
'mpris:length': song.duration ? Math.round((song.duration || 0) * 1e3) : null,
'mpris:trackid': song.id
? mprisPlayer.objectPath(`track/${song.id?.replace('-', '')}`)
: '',
Expand Down
2 changes: 1 addition & 1 deletion src/remote/components/remote-container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const RemoteContainer = () => {
<Title order={2}>Artist: {song.artistName}</Title>
</Group>
<Group position="apart">
<Title order={3}>Duration: {formatDuration(song.duration * 1000)}</Title>
<Title order={3}>Duration: {formatDuration(song.duration)}</Title>
{song.releaseDate && (
<Title order={3}>
Released: {new Date(song.releaseDate).toLocaleDateString()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const Image = styled(motion.img)<{ $useAspectRatio: boolean }>`
object-position: 50% 100%;
filter: drop-shadow(0 0 5px rgb(0 0 0 / 40%)) drop-shadow(0 0 5px rgb(0 0 0 / 40%));
border-radius: 5px;
max-width: 100%;
`;

const ImageContainer = styled(motion.div)`
Expand All @@ -42,7 +43,7 @@ interface TransparentMetadataContainer {

const MetadataContainer = styled(Stack)<TransparentMetadataContainer>`
padding: 1rem;
background: rgb(var(--main-bg-transparent) ${({ opacity }) => opacity}%);
background: rgb(var(--main-bg-transparent), ${({ opacity }) => opacity}%);
border-radius: 5px;

h1 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const GridContainer = styled.div<TransparendGridContainerProps>`
grid-template-rows: auto minmax(0, 1fr);
grid-template-columns: 1fr;
padding: 1rem;
background: rgb(var(--main-bg-transparent) ${({ opacity }) => opacity}%);
background: rgb(var(--main-bg-transparent), ${({ opacity }) => opacity}%);
border-radius: 5px;
`;

Expand Down