v17 -  Background Music in Kodi
#1
Hi,

I recently built a HTPC and installed Kodi. Kodi is a great application which suits my needs as a media center. I need to play background music while I start Kodi and until I select a movie title the music should continue playing. After the movie selection, the music should stop and movie should play. After watching the movie the music should play again while browsing. All this should be done in the background. I am new to Kodi and I don't know how the scripts or plugins work. Can anyone tell me the method to do this. Thanks in advance.
Reply
#2
general addon dev info:
Add-on_development (wiki)

service addon example:
Service_addons (wiki)

kodi Player docs:
https://codedocs.xyz/xbmc/xbmc/group__py...layer.html
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
Hi ronie,

Thanks for your reply. Previously I saw a thread where they were using Callbacks addon for this function. Can you explain on how to do this. I am new to writing scripts and programming. I am specifying the path below. I also asked in that thread itself but I got no reply. Can you help me with this. I really needed this feature. Thank you so much.

https://forum.kodi.tv/showthread.php?tid=171177
Reply
#4
the callbacks addon is in our repo, so just install it and check if it suits your need.

there's a support thread for the addon here:
https://forum.kodi.tv/showthread.php?tid=256170

and a manual there:
Add-on:Kodi_Callbacks (wiki)
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#5
Hi,

Thanks for the manual. I will check this and revert back. Thanks once again.
Reply
#6
Hi ronie,

I installed the callbacks addon and from kodi interface I found that I can run a script or python file at startup. The point is, I don't know how to write a script for playing background music. Do you have any script that you know that can make the job done.

Thanks in advance.
Reply
#7
perhaps you don't need to write a python script?

the callback addon allows you to execute built-in commands, so you could try a task like this:
Code:
PlayMedia(/path/to/your/playlist)

then create two events to run this task: onStartup / onPlayBackEnded
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#8
Thank you so much for the information. I thought it would be a huge process. This really helped me a lot.



Thank you once again.
Reply
#9
Hi Ronnie,

If I wanted to play a playlist of songs randomly, what should I do ?
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Background Music in Kodi00