Autoplay music when XBMC idle
#31
Awesome addon, thanks for running with this one Bstrdsmkr.

I have no idea if you're interested in further developing or supporting this, but allow me to propose a different use case if you have any thoughts:

I'm interested in having XBMC act as a combination dj and jukebox, playing random music while allowing guests to simply and easily queue up songs should they desire. Party Mode gets close, except that new songs cut off the current selection if the guest simply uses the default select action. Unexpected and awkward.

Your addon has the capability to do it perfectly though. I'm pointing it to a custom playlist of length 1 (edited version of my current partymode.xsp), changing repeat to "Off", volume "100", and setting idle threshold to the absolute minimum. Wait a minute, a random song plays, and I am able to queue up other songs which begin as soon as the current selection is done for a non-stop interactive music session that keeps going by itself after my songs of choice are done. Brilliant.

Interestingly, the way I am using it the idle threshold value only affects the initial delay - if I start up XBMC and do nothing, the delay passes before any "background" music plays. But if I quickly queue up a song or two and let them play out, bgmusic picks up after only a very short delay. Don't know if this is intended behavior or not, but it sure works for me!

So, all this in mind, feature requests:

- possible to allow an idle threshold of 0? Being a curious meddler I of course tried editing settings.xml manually, but to no avail.
- any way to allow enabling and disabling the service (or otherwise turning the effect on and off) by way of a command I could attach to a custom skin button?

I of course completely understand if you don't want to mess with it, so pointers for this non-python-developer would be equally appreciated.

Thanks for reading.
Reply
#32
Oh, and if you're looking at this: similar to what Dare pointed out with Playlist:Repeat, the same thing seems to be happening to Shuffle. Not actually a big deal the way I'm using it (with a playlist 1 [random] song long I can just turn shuffle off in the settings and it makes no difference) but in case you're wanting to clean up a loose end just because. Smile
Reply
#33
New version 0.0.6:
- Allow threshold of 0
- Added script to toggle the service between enabled and disabled. To call it, use RunScript(C:\path\to\xbmc\addons\service.bgmusic\toggle_service.py)
- Removed shuffle options. They're redundant since you can set Random order in smart playlists
Reply
#34
Wow, absolutely rocking. Thanks so much Bstrdsmkr.
Reply
#35
Hi, I have just 1 playlist but I want it to be renadomized on every start. How can I do it?
Reply
#36
Use a smart playlist and set the order to random: http://wiki.xbmc.org/index.php?title=Smart_playlists
Reply
#37
I've been kind of busy, and I haven't tried the newer builds (since 0.0.2).

I found two issues while using the service.

1. I run two builds at the same time (modified ID's so they don't conflict). The "BGMusic 1" runs between 07.00 - 19.00 with one playlist, and "BGMusic 2" runs from 19.05 - 23.30 with a different playlist. The service starts when it should, but doesn't stop at the specified time. I haven't done any testing, but I think it has to do with the playlist being "repeat on". If I manually press "stop" say after 19.05, BGMusic 2 will start (as it should). Same goes for BGMusic 2, it doesn't automatically stop after 23.30, unless I play something after the specified time, or press stop.

2. When streaming music from my phone to XBMC, the BGMusic service will sometimes cut in, and lower the volume and start playing the playlist, instead of playing the streaming track from the phone. The music player on phone still seems to think it is streaming the song successfully. Skipping track usually sorts it out. But still, the idle time (set to 1 minute) should not start counting until end of song stream, right?


Anybody else having these issues? As I wrote earlier, I haven't really tried to figure out why it behaves like this, maybe it has been fixed already?
Reply
#38
(2013-06-10, 15:48)jappish84 Wrote: I've been kind of busy, and I haven't tried the newer builds (since 0.0.2).

I found two issues while using the service.

1. I run two builds at the same time (modified ID's so they don't conflict). The "BGMusic 1" runs between 07.00 - 19.00 with one playlist, and "BGMusic 2" runs from 19.05 - 23.30 with a different playlist. The service starts when it should, but doesn't stop at the specified time. I haven't done any testing, but I think it has to do with the playlist being "repeat on". If I manually press "stop" say after 19.05, BGMusic 2 will start (as it should). Same goes for BGMusic 2, it doesn't automatically stop after 23.30, unless I play something after the specified time, or press stop.

Hmmm. It only checks to see if it should start the playlist and never automatically stops it. It also checks to see if something is playing before attempting to start the playlist.

(2013-06-10, 15:48)jappish84 Wrote: 2. When streaming music from my phone to XBMC, the BGMusic service will sometimes cut in, and lower the volume and start playing the playlist, instead of playing the streaming track from the phone. The music player on phone still seems to think it is streaming the song successfully. Skipping track usually sorts it out. But still, the idle time (set to 1 minute) should not start counting until end of song stream, right?

Try the new version as this may inadvertently have been fixed. If not, how are you streaming from the phone? It could be a bug in xbmc not updating the idle time when using that streaming method.

Also, I think we could just add a few settings to support different playlists at different times. I'll look into it when I get a few minutes
Reply
#39
I'll try the new version and get back to you. If you are going to add support for different playlists, then you should also add automatic "stop" when the timeframe has passed. Or maybe even better, a stop time in settings menu.

I'm streaming via UPNP, sometimes using doubletwist player, and sometimes HTCs internal music player. It's probably what you said about xbmc not updating idle time. I think I read somewhere that the xbmc team haven't focused so much on DLNA and UPNP in the past, but that they are planning to do alot more work with it in the upcoming xbmc 13 release. So maybe it'll get fixed in ver. 13.

Thank you for your work so far with this addon, it's awesome.
Reply
#40
This is what I love about XBMC. Amazing Add-on!
I was sitting there after a movie and the silence was getting to me as I was reading through emails/texts - why not just try and get music to play automatically whenever on the menu?
Found this thread, installed, and very happy to see this service working exactly as expected within minutes.

One inquiry/suggestion:

Is there any way to manually stop bgmusic playback, such that it won't come back on automatically until the next 'cycle' occurs (i.e. after the next video playback ends). I set my wait time to 0 to ensure music starts immediately when a video ends. However, there may be times when I don't want the music, and want to be able to hit stop to cancel the current playback. As it works now, the music will stop, but will start again within seconds given the wait time is 0. I see myself wanting the music 95% of the time, but there will come times when I decide against it - it's a bit of a pain in the ass to go into the service's config and shut it off manually when this occurs.

in sum: any way to make it so that manual stops put the service on hold until after the next video plays?

(Edit: while it would still be a reasonable 'polish' for the add-on, the PAUSE button works just fine - I was so locked on being able to stop the playback that it took me a while to step back and realize this easy solution, lol)
Reply
#41
Any possibility of re-instating the randomizing options?
I appreciate the smart playlist suggestion, but those only work for music that's part of one's music database. I (and i assume many) have tons of music that's loose or disorganized, not worthy of being formally added to xbmc. It would be much easier to use a simple .m3u list, and have it randomized through this add-on (assuming that this was how it worked before the options were removed).
Reply
#42
Hi,
just discovered this thread. I made some video/audio screensavers that may be interesting for you...
Reply
#43
.nevermind
Reply
#44
Am i correct volume control doesn't work in this addon?
Reply
#45
I haven't looked at it in a while, but IIRC it should work. You can set a specific volume in the settings which the addon will switch to when playing idle music, and should switch back when finished. TBH, AddonScriptorDE's approach is probably better as it uses the screensaver function, and this is just a dirty hack.

Is there anything his addon is missing that's here? If so, I can probably send him a patch
Reply



Logout Mark Read Team Forum Stats Members Help
Autoplay music when XBMC idle2
This forum uses Lukasz Tkacz MyBB addons.