full listings » Playback


Command Line Support GeekShadow

Add command line support to Songbird


Description

This extension provides an easy way to control Songbird in command line with these switch :
-play
-pause (play/pause)
-stop
-previous
-next
-mute
-volumeup
-volumedown

For example in Windows "songbird.exe -pause"

It seems this feature is already inside Songbird (broken in version 1.0 ?), but I wanted something more easy and user-friendly to use.

If that help : https://developer.mozilla.org/en/Command_Line_Options#How_to_use_command_options

http://code.google.com/p/songbird-othersaddons/




Release Notes

version 1.1.6 - 12/21/09
- maxVersion bumped to 1.6.0a (Songbird 1.4.1 Compatibility)




Comments

(35)


mark32
mark32

Works well. Thanks! Here are some Autohotkey scripts to tinker with to create hotkeys that work whether Songbird is the active window or not:

#IfWinExist, Songbird

RControl & Right::
Run, C:\Program Files\Songbird\songbird.exe -next
Return

RControl & Left::
Run, C:\Program Files\Songbird\songbird.exe -previous
Return

RControl & Enter::
Run, C:\Program Files\Songbird\songbird.exe -play
Return

RControl & End::
Run, C:\Program Files\Songbird\songbird.exe -stop
Return

#IfWinExist

about 1 year ago
k.granade
k.granade

feature request: could you add a play/pause toggle?
Also thank you so much, this is the one feature songbird was missing for me, to the point where I was trying to do it myself, but I kept getting lost in the code (not at all familiar with java or xul).

about 1 year ago
schwtyl
schwtyl

I agree - play/pause would be very nice. Right now I have stop acting as pause and play/pause acting as play.

about 1 year ago
pandronic
pandronic

It doesn't seem to work on Mac. Are there plans to make it work, because I think this is the only way we'll get global hotkeys support?

about 1 year ago
anagarically
anagarically

Would absolutely love something like this, or even for the support that is already built-in to be fixed, but the only thing missing is new page. I am wanting to switch to songbird as my main browser, but can't, when someone sends me a link and if I click on it, firefox opens. I can configure the default browser, but can't find how to pass a url to open a new page in songbird. Thank you for this though, it really makes life easier.

about 1 year ago
cygnl7
cygnl7

Here's another vote for Mac support.

about 1 year ago
MI3Guy
MI3Guy

I just installed this on Xubuntu. It seems to work properly. I also want the play/pause option please. That is better for setting hotkeys.

about 1 year ago
Ajzimm3rman
Ajzimm3rman

Good. Linux support.

about 1 year ago
dragonmage
dragonmage

Would volume control and mute be possible? Could you make songbird return track name and position also. I'm thinking to have a Rainmeter config to control Songbird.

about 1 year ago
GeekShadow
GeekShadow

@k.granade
@schwtyl
@MI3Guy
Play/pause now work with -pause

@dragonmage
Volume Up and Down with -volumeup and -volumedown (you also have -mute)

(Return track name and position will come soon in LiveTweeter)

about 1 year ago
mark32
mark32

Thanks for the update, GeekShadow. Most of these are great. The only one that seems buggy is -mute which moves the volume slider back and forth, from the previous setting to zero, but no matter where the volume slider is the volume stays muted. In other words, I'm able to mute but not to unmute using this function. Since it moves the volume slider back and forth, I assume it's supposed to toggle the mute on and off. Anyway, the play/pause is a nice addition.

about 1 year ago
jandebe
jandebe

thank you for this (temporarely) very useful plugin :-)

a feature suggestion: options to handle random-playing mode
for example:
-shuffle-on
   --> switches shuffle-mode on
-shuffle-of
   ---> switches shuffle-mode off
-play-random
   ---> jumps to a random song, but from there keeps on playing in order of the playlist

i especially like -play-random....(for ex. in foobar) its just great for jumping around in your library, and rediscovering "long-time-not-heard" and "almost-forgotten" artists/albums :-)

oh and please dont get me wrong, i've got no idea how to implement such functions, and therefore have no idea how complicated and time-consuming this is...so if im asking for the impossible...sry ;-)

about 1 year ago
jasonparekh
jasonparekh

I like it better than the built-in command-line support because the focus doesn't change to Songbird. Thanks.

about 1 year ago
teratomata
teratomata

This doesn't seem to work for me in linux, I would use the command 'songbird -play' and it would tell me 'segmentation fault' in terminal. I'm using ubuntu, any ideas?

about 1 year ago
nicodoggie
nicodoggie

Hi,

The plugin doesn't work for me, for some reason, it just issues a segfault.

I have Songbird 1.1.1 on Intrepid with openbox, installed from a deb file I got from getdeb.net

Thanks for you're hard work, hope this gets fixed soon

about 1 year ago
nicodoggie
nicodoggie

Nevermind, I got it to work already... the package from getdeb.net has a wrapper script for songbird found at /usr/bin/songbird


#!/bin/sh
#songbird wrapper in /usr/bin/songbird
cd /usr/share/Songbird
./songbird

I just added a "$@" so all the arguments are passed properly to the actual songbird app.


#!/bin/sh
#modified wrapper passing all arguments
cd /usr/share/Songbird
./songbird "$@"

Once again, thanks for the great add-on.

about 1 year ago
pheonix
pheonix

Will this work if you ssh into a remote machine that has it installed

12 months ago
henrik
henrik

This plugin doesn't work on MacOSX.

Running "/Applications/Songbird.app/Contents/MacOS/songbird -play" gives me a dialog with "A copy of Songbird is already open. Only one copy of Songbird can be open at a time."

11 months ago
GeekShadow
GeekShadow

@henrik
Try with songbird-play -no-remote

11 months ago
GeekShadow
GeekShadow

"/Applications/Songbird.app/Contents/MacOS/songbird -play -no-remote"

11 months ago
Doches
Doches

Doesn't work for me on OS X, even with the -no-remote switch: I get the same 'already open' error.

10 months ago
dragonmage
dragonmage

Think you could add a Minimize/Restore command? My Songbird controlling Rainmeter config is coming along, except for it crashing Rainmeter when LiveTweeter blanks the .txt file.

10 months ago
mesome
mesome

Any chance of an update to work with 1.2? Was using this to add some controls to my Samurize layout and I'd really love to keep it working. Thanks!

9 months ago
GeekShadow
GeekShadow

@mesome

Updated !

9 months ago
Asph
Asph

For me, this add-on was the last nail on Amarok's coffin. :) I was in dire need of hotkeys. Thanks for the great work, and also many thx to "nicodoggie" for "$@" trick too.

8 months ago
chris_staite
chris_staite

I required support to be able to store the state of playback in songbird (so it can be stopped if it is open/playing before enabling my screensaver). Hence I created another flag that writes a temp file with the status of the playback (currently /tmp/Songbird/status.txt) this will need to be altered for other OSes.

I thought I'd share the code in case anyone else was after this functionality. Also, if it could be added to the add-on that would save my altering the code every time an update is released.

    if (cmdLine.handleFlag("status", false)) {
        var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
        file.initWithPath("/tmp/Songbird/status.txt");
        if (file.exists() == false) {
                file.create(Components.interfaces.nsIFile.NORMAL_FILE_TYPE, 420);
        }
        var stream = Components.classes["@mozilla.org/network/file-output-stream;1"].createInstance(Components.interfaces.nsIFileOutputStream);
        stream.init(file, 0x02 | 0x08 | 0x20, 0666, 0);

        var content;
        var status = gMM.status;
        switch (status.state) {
                case status.STATUS_PLAYING:
                        content = "playing";
                        break;
                case status.STATUS_PAUSED:
                        content = "paused";
                        break;
                case status.STATUS_STOPPED:
                        content = "stopped";
                        break;
                case status.STATUS_BUFFERING:
                        content = "buffering";
                        break;
                default:
                        content = "unknown";
                        break;
        }
        stream.write(content, content.length);
        stream.close();
        cmdLine.preventDefault = true;
    }

7 months ago
NickChaplin
NickChaplin

hey i was wondering if it is possible to write a scrip that would skip a song every 10 seconds sorta like an intro thing that older media players had. i have no idea where to begin with scripts like this could someone help me out?

thanks
nick

6 months ago
coolkehon
coolkehon

on ubuntu 9.04 64bit i get a segmentation fault error

/usr/bin/songbird --pause
Segmentation fault

$ songbird -next
Segmentation fault

songbird --help
Segmentation fault

6 months ago
LIB53
LIB53

@coolkehon
I'm getting Segmentation fault also, but the command still works. I entered the directory that has the songbird shell script (and icon and folders..etc..) as part of the command. So my command looks like this:

   $ /home/LIB53/Compilations/Songbird/songbird --next

I'm learning python right now in hopes of being able to help tighten integration between gnome and songbird. This add-on is the only way into songbird, so i hope it works for you.

6 months ago
lammoth123
lammoth123

use the mpris addon to control through command line in linux http://extensions.songbirdnest.com/addons/1626 along with http://incise.org/mpris-remote.html too many bugs in this addon

3 months ago
Menthix
Menthix

Fantastic, exactly what I was looking for :).

about 1 month ago
Menthix
Menthix

One problem when listening to Last.fm radio streams though. When I use the commandline to mute Songbird, once Last.fm stwitches to the next song the sound becomes unmuted.

Any fix or workaround for this?

about 1 month ago
jabapyth
jabapyth

You totally just made my day. many thanks

29 days ago
jabapyth
jabapyth

Just made a quick tutorial on how to use this to make Global Hotkeys in Ubuntu.

29 days ago
danilo
danilo

this doesn't seem to work for me.

danilo@danilo-ubuntu:~$ songbird -pause
(songbird-bin:7703): GLib-WARNING **: g_set_prgname() called multiple times

The main window focuses, but it doesn't pause.

Version: Songbird 1.4.1, Build 1430 (20091220222026) on Ubuntu 9.10

8 days ago



Log in to Post a Comment


Download
Statistics
Downloads: 6,193

Average Rating:
4 out of 5  based on 7 ratings

Images: 0

Comments: 35

Last Updated: 3 months ago
Details
Name: Command Line Support

Author: GeekShadow

Version: 1.1.6 version history

Categories:


Log in to Add a Tag
Share
Embed:

Share: