Author Topic: Command Line Gmusicbrowser  (Read 3574 times)

IlVerZ

  • Newbie
  • *
  • Posts: 6
    • View Profile
Command Line Gmusicbrowser
« on: September 18, 2012, 01:48:48 »
Hi!
There is a way to add a song in the queque of gmusicbrowser using the command line?
And also change the current playlist filter to another one using the command line..

Thank you! :D
« Last Edit: September 18, 2012, 03:03:24 by IlVerZ »

Quentin Sculo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1094
    • View Profile
Re: Command Line Gmusicbrowser
« Reply #1 on: September 19, 2012, 20:26:01 »
Hi
To enqueue songs from the command line you can use the command EnqueueFiles, with as arguments a url-encoded list of files/folders. The list is space separated so you have to encode the spaces in filenames with "%20".
example :
Code: [Select]
gmusicbrowser -cmd "EnqueueFiles /path/to/music/file.mp3 /another/path/with%20some%20spaces/"
There is no command currently to change the playlist filter.

I plan to redesign the command system completely, it is currently a mess. The new system will be able to do that and much more and in a better way.
In the meantime, you can cheat by using the RunPerlCode command, it is of course unsupported :

change the filter to songs that contains "test" in their title :
Code: [Select]
gmusicbrowser -cmd 'RunPerlCode ::Select(filter => Filter->new_from_smartstring("title:test"));'
enqueue songs that contains "foo" in their title and "bar" in the album title :
Code: [Select]
gmusicbrowser -cmd 'RunPerlCode ::EnqueueFilter(Filter->new_from_smartstring("title:foo album:bar"));'

IlVerZ

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re:Command Line Gmusicbrowser
« Reply #2 on: September 29, 2012, 00:03:13 »
Ok.. ^^ Thank you so much..