mirror of
https://github.com/BluemediaDev/muse.git
synced 2025-05-10 04:01:37 +02:00
Small bug fixes
This commit is contained in:
parent
4659717e5f
commit
f25467a41d
6 changed files with 29 additions and 16 deletions
|
@ -176,7 +176,7 @@ export default class {
|
|||
|
||||
private async spotifyToYouTube(track: SpotifyApi.TrackObjectSimplified, playlist: QueuedPlaylist | null): Promise<QueuedSong | null> {
|
||||
try {
|
||||
const {items} = await ytsr(`${track.name} ${track.artists[0].name} offical`, {limit: 5});
|
||||
const {items} = await ytsr(`"${track.name}" "${track.artists[0].name}" offical`, {limit: 5});
|
||||
const video = items.find((item: { type: string }) => item.type === 'video');
|
||||
|
||||
if (!video) {
|
||||
|
|
|
@ -140,6 +140,10 @@ export default class {
|
|||
this.stopTrackingPosition();
|
||||
}
|
||||
|
||||
resetPosition(): void {
|
||||
this.positionInSeconds = 0;
|
||||
}
|
||||
|
||||
private getCachedPath(url: string): string {
|
||||
return path.join(this.cacheDir, hasha(url));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue