pimusicbox / mopidy-musicbox-webclient

Web Client for Mopidy Music Server and the Pi MusicBox
https://www.pimusicbox.com
Apache License 2.0
398 stars 106 forks source link

Other extensions url, like "alarmclock"? #263

Open JuMalIO opened 5 years ago

JuMalIO commented 5 years ago

Is it possible to add another url link, similar like its done with "alarmclock" link? I think it should be more customizable, maybe someone else will want to add another.

kingosticks commented 5 years ago

It should be quite easy to edit the source files (you can find the location of them by running mopidy deps). I don't want to add a config option just for this.

JuMalIO commented 5 years ago

Yes, I did, but still think it would be nice to have custom extension links. I guess its feature request.

My current hackish solution is editing index file: nano /usr/local/lib/python2.7/dist-packages/mopidy_musicbox_webclient/static/index.html change data-has-alarmclock="true": <body data-websocket-url="{{ websocketUrl }}" data-is-musicbox="{{ isMusicBox }}" **data-has-alarmclock="true" data-on-track-click="{{ onTrackClick }}" data-program-name="{{ programName }}" data-hostname="{{ hostname }}" data-title="{{ title }}"> and change links: <a href="/your_link_instead_of_alarmclock/"> <a id="homeAlarmClock" href="/your_link_instead_of_alarmclock/">