forked from Shinonome/dots-hyprland
music: no [FREE DOWNLOAD]
This commit is contained in:
@@ -7,9 +7,9 @@ import { AnimatedCircProg } from "../../lib/animatedcircularprogress.js";
|
|||||||
import { showMusicControls } from '../../variables.js';
|
import { showMusicControls } from '../../variables.js';
|
||||||
|
|
||||||
function trimTrackTitle(title) {
|
function trimTrackTitle(title) {
|
||||||
// Removes stuff like【C93】 at beginning
|
var cleanedTitle = title;
|
||||||
var pattern = /【[^】]*】/;
|
cleanedTitle = cleanedTitle.replace(/【[^】]*】/, ''); // Remove stuff like【C93】 at beginning
|
||||||
var cleanedTitle = title.replace(pattern, '');
|
cleanedTitle = cleanedTitle.replace(/\[FREE DOWNLOAD\]/g, ''); // Remove F-777's [FREE DOWNLOAD]
|
||||||
return cleanedTitle.trim();
|
return cleanedTitle.trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -75,9 +75,9 @@ function getTrackfont(player) {
|
|||||||
return DEFAULT_MUSIC_FONT;
|
return DEFAULT_MUSIC_FONT;
|
||||||
}
|
}
|
||||||
function trimTrackTitle(title) {
|
function trimTrackTitle(title) {
|
||||||
// Removes stuff like【C93】 at beginning
|
var cleanedTitle = title;
|
||||||
var pattern = /【[^】]*】/;
|
cleanedTitle = cleanedTitle.replace(/【[^】]*】/, ''); // Remove stuff like【C93】 at beginning
|
||||||
var cleanedTitle = title.replace(pattern, '');
|
cleanedTitle = cleanedTitle.replace(/\[FREE DOWNLOAD\]/g, ''); // Remove F-777's [FREE DOWNLOAD]
|
||||||
return cleanedTitle.trim();
|
return cleanedTitle.trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -301,7 +301,7 @@ const PlayState = ({ player }) => {
|
|||||||
overlays: [
|
overlays: [
|
||||||
Widget.Button({
|
Widget.Button({
|
||||||
className: 'osd-music-playstate-btn',
|
className: 'osd-music-playstate-btn',
|
||||||
onClicked: () => { console.log('uwu'); execAsync('playerctl play-pause').catch(print) },
|
onClicked: () => execAsync('playerctl play-pause').catch(print),
|
||||||
child: Widget.Label({
|
child: Widget.Label({
|
||||||
justification: 'center',
|
justification: 'center',
|
||||||
hpack: 'fill',
|
hpack: 'fill',
|
||||||
|
|||||||
Reference in New Issue
Block a user