mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
use thumbnails as fallback
This commit is contained in:
parent
5c4d3ddd84
commit
6eb69a8ef8
@ -50,7 +50,7 @@ export default (props) => {
|
||||
</div>
|
||||
</div>
|
||||
<div className="music-track_cover">
|
||||
<ImageViewer src={props.track.thumbnail} />
|
||||
<ImageViewer src={props.track.cover ?? props.track.thumbnail} />
|
||||
</div>
|
||||
<div className="music-track_details">
|
||||
<div className="music-track_title">
|
||||
|
@ -129,7 +129,7 @@ export class AudioPlayer extends React.Component {
|
||||
<div
|
||||
className="cover"
|
||||
style={{
|
||||
backgroundImage: `url(${(this.context.currentManifest?.thumbnail) ?? "/assets/no_song.png"})`,
|
||||
backgroundImage: `url(${(this.context.currentManifest?.cover ?? this.context.currentManifest?.thumbnail) ?? "/assets/no_song.png"})`,
|
||||
}}
|
||||
/>
|
||||
<div className="header">
|
||||
|
@ -236,8 +236,8 @@ export default class Player extends Core {
|
||||
if (change.object.currentAudioManifest) {
|
||||
// analyze cover color
|
||||
|
||||
if (change.object.currentAudioManifest.thumbnail) {
|
||||
this.fac.getColorAsync(change.object.currentAudioManifest.thumbnail)
|
||||
if (change.object.currentAudioManifest.cover || change.object.currentAudioManifest.thumbnail) {
|
||||
this.fac.getColorAsync(change.object.currentAudioManifest.cover ?? change.object.currentAudioManifest.thumbnail)
|
||||
.then((color) => {
|
||||
this.state.coverColorAnalysis = color
|
||||
})
|
||||
|
@ -173,7 +173,7 @@ const PlaylistItem = (props) => {
|
||||
</div>
|
||||
|
||||
<ImageViewer
|
||||
src={playlist.thumbnail ?? "/assets/no_song.png"}
|
||||
src={playlist.cover ?? playlist.thumbnail ?? "/assets/no_song.png"}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
@ -6,7 +6,7 @@ import UploadButton from "components/UploadButton"
|
||||
export default (props) => {
|
||||
const [playlistName, setPlaylistName] = React.useState(props.playlist.title)
|
||||
const [playlistDescription, setPlaylistDescription] = React.useState(props.playlist.description)
|
||||
const [playlistThumbnail, setPlaylistThumbnail] = React.useState(props.playlist.thumbnail)
|
||||
const [playlistThumbnail, setPlaylistThumbnail] = React.useState(props.playlist.cover ?? props.playlist.thumbnail)
|
||||
const [playlistVisibility, setPlaylistVisibility] = React.useState(props.playlist.visibility)
|
||||
|
||||
const handleTitleOnChange = (event) => {
|
||||
|
@ -63,7 +63,7 @@ export default (props) => {
|
||||
<div className="play_info_wrapper">
|
||||
<div className="play_info">
|
||||
<div className="play_info_cover">
|
||||
<ImageViewer src={playlist?.thumbnail ?? "/assets/no_song.png"} />
|
||||
<ImageViewer src={playlist.cover ?? playlist?.thumbnail ?? "/assets/no_song.png"} />
|
||||
</div>
|
||||
|
||||
<div className="play_info_details">
|
||||
|
@ -18,6 +18,10 @@ export default {
|
||||
default: [],
|
||||
required: true
|
||||
},
|
||||
cover: {
|
||||
type: String,
|
||||
default: "https://storage.ragestudio.net/comty-static-assets/default_song.png"
|
||||
},
|
||||
thumbnail: {
|
||||
type: String,
|
||||
default: "https://storage.ragestudio.net/comty-static-assets/default_song.png"
|
||||
|
@ -27,6 +27,10 @@ export default {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
cover: {
|
||||
type: String,
|
||||
default: "https://storage.ragestudio.net/comty-static-assets/default_song.png"
|
||||
},
|
||||
thumbnail: {
|
||||
type: String,
|
||||
default: "https://storage.ragestudio.net/comty-static-assets/default_song.png"
|
||||
|
Loading…
x
Reference in New Issue
Block a user