Kodi 17 - Background Music in Kodi

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Ragu24 Offline
Junior Member
Posts: 7
Joined: Sep 2017
Reputation: 0
Post: #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.
find quote
ronie Online
Team-Kodi Member
Posts: 13,232
Joined: Jan 2009
Reputation: 394
Post: #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 and Search the forum before posting.
For troubleshooting and bug reporting please make sure you read this first.
find quote
Ragu24 Offline
Junior Member
Posts: 7
Joined: Sep 2017
Reputation: 0
Post: #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
(This post was last modified: 2017-09-13 14:21 by Ragu24.)
find quote
ronie Online
Team-Kodi Member
Posts: 13,232
Joined: Jan 2009
Reputation: 394
Post: #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 and Search the forum before posting.
For troubleshooting and bug reporting please make sure you read this first.
find quote
Ragu24 Offline
Junior Member
Posts: 7
Joined: Sep 2017
Reputation: 0
Post: #5
Hi,

Thanks for the manual. I will check this and revert back. Thanks once again.
find quote
Ragu24 Offline
Junior Member
Posts: 7
Joined: Sep 2017
Reputation: 0
Post: #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.
find quote
ronie Online
Team-Kodi Member
Posts: 13,232
Joined: Jan 2009
Reputation: 394
Post: #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 and Search the forum before posting.
For troubleshooting and bug reporting please make sure you read this first.
find quote