After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 323511 - Playing a song/playlist at a set time (alarm)
Playing a song/playlist at a set time (alarm)
Status: RESOLVED OBSOLETE
Product: rhythmbox
Classification: Other
Component: Plugins (other)
0.9.x
Other All
: Normal enhancement
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on: 159342 362488
Blocks:
 
 
Reported: 2005-12-08 03:53 UTC by Mårten Woxberg
Modified: 2018-05-24 10:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
implements alarm clock plugin (43.00 KB, patch)
2006-08-15 22:27 UTC, Jon Oberheide
none Details | Review
Alarm plugin (6.73 KB, application/x-compressed-tar)
2006-10-28 19:40 UTC, FabienCarrion
  Details
updates Jon Oberheide's plugin to work with the new source list model (52.06 KB, patch)
2007-11-29 14:20 UTC, Benoit Garret
needs-work Details | Review

Description Mårten Woxberg 2005-12-08 03:53:20 UTC
Since my computer is allways running I want an easy way to use it as an alarm.
It would be great if I was able to set a time and a playlist/song to play and
then have rhythmbox do just that.
Comment 1 James "Doc" Livingston 2005-12-08 04:04:45 UTC
Although you can't choose a playlist, you can have a song play at a particular
time by having something run "rhythmbox --play file://path/to/song" at the
particular time. Running "rhythmbox --play" with no file will play from the
library (if Rhythmbox isn't running) or whatever is paused (is it is).
Comment 2 Mårten Woxberg 2005-12-08 14:52:19 UTC
I should have informed that I knew of this option before but what I'm after is a
way to do it with a gui...

#>sleep 6h && rhythmbox --play
works to a certain extent but then I'll have to calculate the amount of hours or
minutes from the moment I run the command to the moment I want rhythmbox to play.

I could use atd and at to specify a time but that's also a commandline program.
The clock-applet (to which I have linked this bug) should have this
functionality or rhythmbox should do it.
Comment 3 James "Doc" Livingston 2005-12-08 15:09:02 UTC
What would be nice is if you could add alarms from the clock applet, and have a
menu to select the action - which in this case would be for it to ask Rhythmbox
to start playing.

If you care about what it will play, it would probably  be best done from
Rhythmbox itself. This would be the kind of thing that is perfect for a
plugin/extension, except that we don't have those yet.
Comment 4 James "Doc" Livingston 2005-12-09 12:36:20 UTC
Bug 129650 is probably a combination of this and the queue.
Comment 5 William Jon McCann 2005-12-17 21:28:38 UTC
We've rejected alarm features a few times for the clock applet in the past.  I
think the consensus is to use evolution alarms for this sort of thing.  As I
recall you can configure evolution to run a command when the alarm goes off.
Comment 6 James "Doc" Livingston 2005-12-19 08:09:23 UTC
I agree that Evolution should be used for the actual alarms, but having a "Add alarm" in the clock's context menu (or something similar) might be nice.
Comment 7 Jon Oberheide 2006-08-15 22:27:47 UTC
Created attachment 70993 [details] [review]
implements alarm clock plugin

Attached is a patch against CVS that implements a python alarm clock plugin.

A couple points to mention:

* The functionality is currently very simple and simply uses the rb_shell_player_playpause() function to start playing the currently selected source/song when the alarm is triggered.  In the future, specifying a source/playlist to begin playing from may be desirable.

* The alarm is checked every 50 seconds using a glib timeout.  50 seconds was chosen as possible delays blocking glib's main loop could potentially cause the alarm to be missed in an extreme case, but is enough that it won't be triggered twice in one minute.

* The alarm config is currently pickled out to $(HOME)/.alarmconfig-rb.plugin.  Perhaps this should be moved to gconf?

* Volume setting/fading may be desirable so that waking up to a loud song is not so abrupt.

Regards,
Jon Oberheide
Comment 8 Alex Lancaster 2006-08-15 23:35:13 UTC
(In reply to comment #7)

> * The alarm config is currently pickled out to $(HOME)/.alarmconfig-rb.plugin. 
> Perhaps this should be moved to gconf?

Probably

~/.gnome2/rhythmbox/alarmconfig-rb.plugin

at the very least.  gconf might be better, although check with Doc Livingston.
Comment 9 FabienCarrion 2006-10-02 06:55:13 UTC
Hi all,

I modify a little bit this plugin. I implemented a default alarm for all week long, a volume fadding and I change the path of the alarm config file. It is now $(HOME)/.gnome2/rhythmbox/

You can get this plugin on http://fabien.carrion.free.fr

Cheers'
Comment 10 Jon Oberheide 2006-10-13 01:23:44 UTC
The latest version of this plugin can now be found at http://jon.oberheide.org/projects/rb-alarmclock/

It's now a standalone package and shouldn't be merged into mainline until a problem relating to hooking in to the sourcelist_model is resolved.
Comment 11 Alex Lancaster 2006-10-18 09:16:05 UTC
(In reply to comment #10)
> The latest version of this plugin can now be found at
> http://jon.oberheide.org/projects/rb-alarmclock/
> 
> It's now a standalone package and shouldn't be merged into mainline until a
> problem relating to hooking in to the sourcelist_model is resolved.

This problem seems to have been reported at bug #362488. 

Comment 12 FabienCarrion 2006-10-28 19:37:55 UTC
The lastest version of this plugin can be found at http://fabien.carrion.free.fr/Rhythmbox.html

- Default alarm
- Alarm each day
- Sleep functionality
- Playlist chooser to wake up

I test it during one week and it worked for me. I use rhythmbox 0.9.6 from the debian unstable.
Comment 13 FabienCarrion 2006-10-28 19:40:33 UTC
Created attachment 75575 [details]
Alarm plugin
Comment 14 Mårten Woxberg 2006-10-29 20:53:09 UTC
So how does the sleep functionality work?

I check the box but nothing happens, when I return to the config menu it's unchecked.
Comment 15 FabienCarrion 2006-10-29 21:43:53 UTC
Sleep functionality :

When you check the sleep box, I calculate the delta to use to get the volum down. And I uncheck the sleep box.

When the actual volum is equal to the volum you register I stop the player.

I uncheck the sleep box, because imagine you stop you rhythmbox and the sleep functionality is activated. Then when you execute the rhythmbox again, and if you forgot you activated the sleep, rythmbox is going to stop :)

I think it is better that when you want the sleep you activate it, and just leave your computer :)

The best would be to have the possibility to have the sleep and alarm status in the status bar.
Comment 16 Alex Lancaster 2006-12-08 03:38:15 UTC
Adding this to CVS will require fixing the sourcelist issue described in bug #362488, so adding as a dep.
Comment 17 FabienCarrion 2006-12-31 03:23:02 UTC
Hi,

I made some update to my alarm plugin.

Now you can tell RB to stop playing after the current song as asked by Karsten Schmiedecke.

You have the status of the sleep function in the status bar.

You can get the plugin on http://fabien.carrion.free.fr/Rhythmbox.html
Comment 18 Mårten Woxberg 2007-03-16 16:45:30 UTC
So whats the update on this?

The latest version 1.2, also crashes the first time you run it.
Are we still waiting for something to be implemented in rhythmbox?
Comment 19 Benoit Garret 2007-11-29 14:20:29 UTC
Created attachment 99840 [details] [review]
updates Jon Oberheide's plugin to work with the new source list model

Random observations:

* This patch is based on the rb-alarmclock plugin version 0.3 found on Jon's website.

* I somehow doubt I got the autotools bits right, it'd be nice if someone could double check...

* It is only possible to choose from the playlists as I don't know how to determine if a source is playable or not. For those wanting to play the whole library, it is rather easy to set up a bogus playlist containing all tracks.

* I tested it on one computer only, it works for me but don't be surprised if something breaks as I'm not exactly a python wizard.

* The playlist source is not available when the plugin activates, I set up a glib timer to check for its presence every 5 sec. If this is not the right way to do it, feel free to yell at me ;-)

* This check is done by looking for a source named 'Playlists'. This doesn't work with versions localized in a language other than english. Can someone tell me either another way to look for the playlists source or how can I translate the string?
Comment 20 FabienCarrion 2007-12-18 04:56:17 UTC
Hi,

I am using the last version of my plugin available on http://fabien.carrion.free.fr/alarmclock-1.2.tar.bz2 and the debian package of rhythmbox 0.11.2-1, and I get a strange error. I put the alarm and it stop after one song. I activate the debug and I observe this at the begining of the song:

(22:25:07) [0x80fa028] [rb_shell_player_playpause] rb-shell-player.c:2021: doing playpause
(22:25:07) [0x80fa028] [rb_player_gst_sync_pipeline] rb-player-gst.c:653: syncing pipeline
(22:25:07) [0x80fa028] [rb_player_gst_sync_pipeline] rb-player-gst.c:655: PLAYING pipeline

(rhythmbox:14468): RhythmDB-CRITICAL **: rhythmdb_entry_ref: assertion `entry != NULL' failed
(22:25:07) [0x80fa028] [rb_shell_player_sync_with_source] rb-shell-player.c:2563: playing source: 0x8335dc0, active entry: 0x8ab3400
(22:25:07) [0x80fa028] [rb_shell_set_window_title] rb-shell.c:2102: setting title to "Ludwig Von 88 - Amoureux solitaires (lonely lovers)"
(22:25:07) [0x80fa028] [show_controls] rb-visualizer-plugin.c:826: showing controls
(22:25:07) [0x80fa028] [rb_header_sync] rb-header.c:355: syncing with entry = 0x8ab3400
(22:25:07) [0x80fa028] [rb_shell_player_sync_buttons] rb-shell-player.c:2666: syncing with source 0x8335dc0
(22:25:07) [0x80fa028] [new_playing_stream_idle_cb] rb-shell-player.c:3013: new playing stream: file:///multimedia/music/Punk/ludwig%20von%2088/17%20plombs%20pour%20p%E9ter%20les%20tubes/03%20-%20Amoureux%20solitaires%20(lonely%20lovers).mp3
(22:25:07) [0x80fa028] [rb_tray_icon_notify] rb-tray-icon.c:710: doing notify: Amoureux solitaires (lonely lovers)
(22:25:07) [0x80fa028] [rb_lastfm_song_changed_cb] rb-lastfm-source.c:1320: non-lastfm entry being played
(22:25:07) [0x80fa028] [rb_shell_player_sync_with_source] rb-shell-player.c:2563: playing source: 0x8335dc0, active entry: 0x8ab3400
(22:25:07) [0x80fa028] [show_controls] rb-visualizer-plugin.c:826: showing controls
(22:25:07) [0x80fa028] [rb_header_sync] rb-header.c:355: syncing with entry = 0x8ab3400
(22:25:07) [0x80fa028] [rb_shell_player_sync_buttons] rb-shell-player.c:2666: syncing with source 0x8335dc0
(22:25:07) [0x80fa028] [show_controls] rb-visualizer-plugin.c:826: showing controls

(rhythmbox:14468): RhythmDB-CRITICAL **: rhythmdb_entry_get_ulong: assertion `entry != NULL' failed

(rhythmbox:14468): RhythmDB-CRITICAL **: rhythmdb_entry_get_string: assertion `entry != NULL' failed
(22:25:07) [0x80fa028] [tick_cb] rb-shell-player.c:3148: tick: [(null), 4294967295:0(0)]

(rhythmbox:14468): RhythmDB-CRITICAL **: rhythmdb_entry_get_ulong: assertion `entry != NULL' failed

(rhythmbox:14468): RhythmDB-CRITICAL **: rhythmdb_entry_get_string: assertion `entry != NULL' failed
(22:25:07) [0x80fa028] [tick_cb] rb-shell-player.c:3148: tick: [(null), 4294967295:0(0)]



It seems that the uri of the song played get lost somewhere... But I don't know where. Anybody experiencing something similar?

Thx

Fabien
Comment 21 GNOME Infrastructure Team 2018-05-24 10:57:53 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/rhythmbox/issues/102.