Skip to content

Commit

Permalink
accidentally published buggy release
Browse files Browse the repository at this point in the history
  • Loading branch information
axellse committed Aug 2, 2024
1 parent aa9932e commit 54e1676
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions helpers/commandProcessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Written by axell (mail@axell.me) for pyrret software.
import { getAudioUrl } from './cobalt.js'
import { searchInvidious } from './invidious.js';
import { changeAudioVolume, playAudioUrl} from '../snippets/player.js'
import { currentSongReport, setPlayStatus } from './playStatus.js';
import { currentSongPlayingReport, setPlayStatus } from './playStatus.js';
import { performFullRealTimeReRender, setSongTitle, startProgressBarMoving, startSongDurationMoving } from '../ui/uiManagers/player.js';
import { addSong, clearList, listContinue, removeLastSong, toggleLooping } from './listManager.js';
import { loadThemeObject } from '../ui/themes.js';
Expand Down Expand Up @@ -62,8 +62,8 @@ export async function processCommand(command) {
changeAudioVolume(command.split(" ")[1])
break;
case 'share':
if (currentSongReport) {
clipboard.write('https://termusic.axell.me?s=' + currentSongReport['id'])
if (currentSongPlayingReport) {
clipboard.write('https://termusic.axell.me?s=' + currentSongPlayingReport['id'])
setPlayStatus('important', 'Copied song link to clipboard!')
} else {
setPlayStatus('important_err', 'No song playing.')
Expand Down
4 changes: 3 additions & 1 deletion helpers/playStatus.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { changeRpcStatus } from "./discordRpc.js";

export let outputWritten = false;
export let currentSongReport
export let currentSongPlayingReport

const widthChars = 46
const idlingImageStyle = config['idlingImageStyle']
Expand All @@ -15,10 +16,11 @@ export function setPlayStatus(type, playStatus) { //playStatus can either be a s
if (type == 'report') {
if (playStatus['special'] == 'idling') {
changeRpcStatus('', 'https://apis.axell.me/termusic/v1/idling-images/from-style/' + idlingImageStyle, '', true)
currentSongReport = []
currentSongPlayingReport = []
} else {
changeRpcStatus(playStatus["title"], playStatus["thumbnail"], playStatus["id"])
currentSongReport = playStatus
currentSongPlayingReport = playStatus
}
} else if (type == 'important' || type == 'important_err') {
moveCursorPos(0, 4)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "termusic",
"version": "1.2.0",
"version": "1.2.1",
"description": "a music player inside your terminal",
"main": "termusic.js",
"bin": "termusic.js",
Expand Down

0 comments on commit 54e1676

Please sign in to comment.