CDrummond / lms-material

Material skin for LMS (Lyrion Music Server)
MIT License
327 stars 76 forks source link

Copy/paste artist or album names to search the net with Material Skin v.5.0.1 #910

Closed Phil995511 closed 5 months ago

Phil995511 commented 5 months ago

Hello,

Your plugin is really great, thank you for your work !!!

Mail there is a small problem... It is currently difficult to copy/paste artist or album names to search the net when using your plugin.

If you could fix this that would be wonderful :)

Best regards.

CDrummond commented 5 months ago

The reason copy is blocked here is that it interferes with drag'n'drop. However, if I removed drag'n'drop between Browse and Queue I could probably enable copy action in more places.

I've posted a query on the Lyrion forums asking if anyone actually uses this drag'n'drop between Browse and Queue. I suspect nobody does, so should be safe to remove.

Phil995511 commented 5 months ago

That would make me happy, because having to retype the names of artists into a web browser by hand to find information about them is somewhat tedious after a while...

Regards.

CDrummond commented 5 months ago

To be honest I'm not 100% sure what to do about this. Material is designed to be an app, so text selection simply cannot work everywhere. To 'fix' your issue I'd have to remove features, which I'm not inclined todo.

However, would the following not suffice?

Save the following as material-skin/actions.json within your LMS's prefs folder:

{
 "album-track":[
  {
   "title":"Copy details",
   "script":"copyTextToClipboard('$TRACKNAME $ARTISTNAME $ALBUMNAME');",
   "icon":"content_copy"
  }
 ],
 "playlist-track":[
  {
   "title":"Copy details",
   "script":"copyTextToClipboard('$TRACKNAME $ARTISTNAME $ALBUMNAME');",
   "icon":"content_copy"
  }
 ],
 "queue-track":[
  {
   "title":"Copy details",
   "script":"copyTextToClipboard('$TRACKNAME $ARTISTNAME $ALBUMNAME');",
   "icon":"content_copy"
  }
 ]
}

...reload Material. Now you should see "Copy details" on the context menus for album tracks, playlist tracks, and queue tracks.

See https://github.com/CDrummond/lms-material/wiki/07-Customisation for more details.

CDrummond commented 5 months ago

Added 'Copy details' action to artists, albums, tracks (album, playlist, queue), and other items (such as from apps). Will be in 5.1.0