Compare commits

...

3 Commits

Author SHA1 Message Date
Kendall Garner
8b93962fad Limit share size while handling theme properly (#2171)
* limit player to 768 px

Signed-off-by: Kendall Garner <17521368+kgarner7@users.noreply.github.com>

* fix size limitation

---------

Signed-off-by: Kendall Garner <17521368+kgarner7@users.noreply.github.com>
2023-02-13 20:00:39 -05:00
Kendall Garner
b129cae0d8 Only create context if gain mode active (#2173) 2023-02-13 19:57:23 -05:00
Deluan
2400e4f60d Fix DB migration. Fix #2168 2023-02-12 14:58:33 -05:00
3 changed files with 15 additions and 8 deletions

View File

@@ -27,15 +27,16 @@ func upChangeImageFilesListSeparator(tx *sql.Tx) error {
return err
}
var id, imageFiles string
var id string
var imageFiles sql.NullString
for rows.Next() {
err = rows.Scan(&id, &imageFiles)
if err != nil {
return err
}
files := upChangeImageFilesListSeparatorDirs(imageFiles)
if files == imageFiles {
files := upChangeImageFilesListSeparatorDirs(imageFiles.String)
if files == imageFiles.String {
continue
}
_, err = stmt.Exec(files, id)

View File

@@ -10,9 +10,14 @@ const useStyle = makeStyles({
pointerEvents: (props) => props.single && 'none',
opacity: (props) => props.single && 0.65,
},
'& .react-jinke-music-player-mobile': {
maxWidth: 768,
margin: 'auto',
'@media (min-width: 768px)': {
'& .react-jinke-music-player-mobile > div': {
width: 768,
margin: 'auto',
},
'& .react-jinke-music-player-mobile-cover': {
width: 'auto !important',
},
},
},
})

View File

@@ -69,7 +69,8 @@ const Player = () => {
context === null &&
audioInstance &&
config.enableReplayGain &&
'AudioContext' in window
'AudioContext' in window &&
(gainInfo.gainMode === 'album' || gainInfo.gainMode === 'track')
) {
const ctx = new AudioContext()
// we need this to support radios in firefox
@@ -83,7 +84,7 @@ const Player = () => {
setContext(ctx)
setGainNode(gain)
}
}, [audioInstance, context])
}, [audioInstance, context, gainInfo.gainMode])
useEffect(() => {
if (gainNode) {