GNOME Bugzilla – Bug 323511
Playing a song/playlist at a set time (alarm)
Last modified: 2018-05-24 10:57:53 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.
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).
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.
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.
Bug 129650 is probably a combination of this and the queue.
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.
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.
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
(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.
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'
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.
(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.
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.
Created attachment 75575 [details] Alarm plugin
So how does the sleep functionality work? I check the box but nothing happens, when I return to the config menu it's unchecked.
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.
Adding this to CVS will require fixing the sourcelist issue described in bug #362488, so adding as a dep.
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
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?
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?
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
-- 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.