Jump to content

Trigger the Sync with a API


soloam

Recommended Posts

soloam

Hello, I use flexget to automate my media management, flexget moves the files and renames them to a emby monitored folder, and triggers a emby library sync. With this sync the update on emby is faster. Sometimes, not always, kodi does not update, or only one of my kodi boxes updates (I have 3), and I need to make a restart to make them work. I would like to make the same kind of trigger to the kodi boxes, to make them sync with emby on new content. Is this possible?

 

Another question, what is the kodi companion way of triggering a sync? Does Emby make a call to the kodi boxes? Or Kodi checks with emby? Because in my network the emby can't talk with the kodi boxes, but the kodi boxes can talk with emby. I do this because I have all services that are accessed from the outside world in a separated vlan.

 

Thank You

Edited by soloam
Link to comment
Share on other sites

jachin99

Are you using EmbyCon, or Emby for Kodi? I use Emby for Kodi, and my updates are usually pretty quick.  When you say you need to restart something do you mean Kodi, or Emby for Kodi?  Looking over the options in Emby for Kodi the only option I see that might accomplish what you want is the restart Emby for Kodi option but I'm not sure.  Maybe someone like saulfred might know if there is some script that can be run to either restart emby for Kodi, or perform a quick sync.  

Link to comment
Share on other sites

soloam

I use emby kodi! What I have to do is restart kodi to update the movies/episodes! This is not always required, sometimes it updates, but never at the same time, or few seconds later than emby! It looks like if I'm lucky that it scrubs at that time, it works, if not it will take forever!

 

Restart kodi is the last resource, because it's very intrusive! I manly watch the media in kodi, and sometimes I think it's strange that a episode is not on the system, I go to emby and it's there, but in kodi nowhere to be found! I restart kodi and it shows!

 

Forcing library sync in kodi does not trigger sync with emby, that would be nice because a lot of apps have integration with kodi api to trigger the library sync on kodi!

 

Thank you

Link to comment
Share on other sites

jachin99

Try restarting emby for kodi next time in the Emby for Kodi addon settings.  Maybe that is something you can automate through scripting, and it will have the same effect?  its just an idea, and you might also try tracking down exactly why things don't sync correctly as you originally asked.  

Link to comment
Share on other sites

soloam

Thank you @@jachin99 ! Do you think that the fact that emby in in a different vlan that can't talk with the kodi boxes is related with this problem? Kodi can talk freely with emby, just the opposite is blocked!

 

Thank you

Link to comment
Share on other sites

TeamB

When Kodi is running new media syncing is triggered by the WebSocket channel that the K4E add-on keeps open with the Emby server.

I would check that your Kodi clients are able to make the WebSocket connection and that they are able to keep it open and running.

The easiest way to do this is make sure you can remote control one of the Kodi client using the Emby Web Client. Can you start playback, pause, stop items on the remote Kodi client using the Emby Web Client, if not then the WebSocket is not connected or working and this is probably why your new media syncs are not happening.

Link to comment
Share on other sites

jachin99

I'll also add that I watched a TV show tonight, and Kodi updated my next episode type widget almost immediately.  

Link to comment
Share on other sites

soloam

I noticed something strange when testing this out! At the moment I have 2 emby boxes connected (I have 3 but one is disconnected), and I noticed that the bedroom one was not appearing in the cast button! So I resented the database and it appeared, but the living room kodi disappeared! So I went and resented the database to the living room, and now the bedroom disappeared! I'm only able to see one of them! I know 100% sure that I have seen both kodi in the cast button!

 

I use only one user for both devices and I'm running emby server 4.3.1.0 and emby for kodi 4.1.19

 

Thank you

Link to comment
Share on other sites

soloam

Problem solved, thank you all, from what I can tell both devices where using the same device id. TeamB post pointed me on the right path. When one device was online, the other was kicked from the session. This probably happened because when I installed the new box I copied the backups from the other.  :o  :mellow:  :unsure:  :blink:  :ph34r:

 

I generated a new device Id and now everything is working again.

 

Thank you all

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...