Jump to content

How to Schedule Emby for Kodi Manual Sync/Updates?


osak00006
Go to solution Solved by Delphi,

Recommended Posts

osak00006

Hi Guys,

 

I'm running into a problem in which large updates to my library are preventing me from quickly accessing new content, when it's added to my library. Instead of immediately watching the content, I have to sit through 15 minutes of syncing library changes. Admittedly, this is partially my fault, based on the way I manage my content, as changes are often written to files... thus the large library updates. 

 

With that said, my goal is to schedule Emby for Kodi Manual Syncs/Updates, every few hours, to make sure that big updates don't get in the way of enjoying content. 

 

What would the best/easiest method be to schedule Manual Syncs/Updates?

 

Thanks! 

Link to comment
Share on other sites

Angelblue05

If Kodi is running, it processes updates instantly...? Are you using the server fast sync plugin?

 

 

Sent from my iPhone using Tapatalk

  • Like 1
Link to comment
Share on other sites

osak00006

If Kodi is running, it processes updates instantly...? Are you using the server fast sync plugin?

 

 

Sent from my iPhone using Tapatalk

 

My LibrELEC boxes run 24/7, as does my server. I do use the Fast Sync Plugin. 

 

However, it doesn't always seem to pull fresh content. Then, when I run a manual sync, it will process a set of changes, which goes pretty quickly, but then it starts a second sync of changes that takes 10-15 minutes... 

 

So my goal would be to just force a manual sync every so often, in the background, via a command line or something

Link to comment
Share on other sites

osak00006

I'll turn on the Add On logging and try to recreate the problem. 

 

In the meantime, could you please explain how the Fast Sync Plugin works? If we're saying that Emby syncs changes instantly, and my Kodi boxes are on 24/7, doesn't that defeat the need for the Fast Sync Plugin? 

 

Put another way, what is it caching, if changes are synced instantly already?

Link to comment
Share on other sites

CBers

Yes it does if they're on 24x7.

 

The Emby server should send a message to the Emby for Kodi addon about any changes and the addon should manage them in the background.

 

Do your devices sleep ??

Link to comment
Share on other sites

Angelblue05

If you are missing new content, please provide your log capturing this issue. That's not normal.

 

Indeed if you are running Kodi 24/7, then the fast sync plugin becomes redundant. However, it does cover updates for all your emby profiles. So if it happens you switch profile in Kodi to load a different emby user, the fast sync will help process updates faster than a manual sync would.

 

 

Sent from my iPhone using Tapatalk

Edited by Angelblue05
Link to comment
Share on other sites

osak00006

Yes it does if they're on 24x7.

 

The Emby server should send a message to the Emby for Kodi addon about any changes and the addon should manage them in the background.

 

Do your devices sleep ??

 

I don't believe they do sleep, no

Link to comment
Share on other sites

osak00006

If you are missing new content, please provide your log capturing this issue. That's not normal.

 

Indeed if you are running Kodi 24/7, then the fast sync plugin becomes redundant. However, it does cover updates for all your emby profiles. So if it happens you switch profile in Kodi to load a different emby user, the fast sync will help process updates faster than a manual sync would.

 

 

Sent from my iPhone using Tapatalk

 

I'll be posting a full log, as soon as possible. However, looking at my Emby Server log, I might have found the issue... 

 

Does Kodi for Emby process content "Updates" or only Additions/Removals?

 

Here's what my log is seeing:

 

Emby.Kodi.SyncQueue: "LIBRARYSYNC" Updated 92 items:

 

That's the kind of change, but in much higher volume -- like 1,600 items -- that creates the delay I'm trying to avoid.  

Link to comment
Share on other sites

CBers

It should do everything for the content you have synced.

 

An update is any change on the Emby server. Added, removed, updated etc.

 

What did you mean in a previous post about when you said:

 

"Admittedly, this is partially my fault, based on the way I manage my content, as changes are often written to files... thus the large library updates"

  • Like 1
Link to comment
Share on other sites

osak00006

It should do everything for the content you have synced.

 

An update is any change on the Emby server. Added, removed, updated etc.

 

What did you mean in a previous post about when you said:

 

"Admittedly, this is partially my fault, based on the way I manage my content, as changes are often written to files... thus the large library updates"

 

I run a script that reformats the metatitle of all my movies into a format that I prefer. As a result, all my movie files are modified on a near daily basis...

Edited by osak00006
Link to comment
Share on other sites

CBers

That's probably why your sync takes so long.

 

What format is it that you prefer?

 

If not what Emby does, then why not turn off the Emby metadata fetching.

Link to comment
Share on other sites

osak00006

That's probably why your sync takes so long.

 

What format is it that you prefer?

 

If not what Emby does, then why not turn off the Emby metadata fetching.

Not metadata. Metatitle. Meaning the title that's actually contained within the MKV file. I already have metadata exporting (nfo files etc) turned off via Emby

Link to comment
Share on other sites

CBers

Metatitle?

 

So your script amends what?

 

It can't change all of your movies all the time though can it?

Link to comment
Share on other sites

osak00006

Metatitle?

 

So your script amends what?

 

It can't change all of your movies all the time though can it?

 

Yes. It's a batch file leveraging mkvpropedit. Just replaces the existing metatitle in the MKV with the existing filename. That way, the titles all end up in the same format. Movie Title (Year) Source Resolution.mkv. 

 

While I work on a log file, is there any kind of HTTP or command line argument that the Kodi for Emby add-on understands that would trigger a manual update?

Edited by osak00006
Link to comment
Share on other sites

CBers

The log covering the sync process on your device will let Angel can check it out.

 

Do you modify the MKV before adding it to Emby?

 

How many MKVs would be modified in a 24-hour period?

Link to comment
Share on other sites

osak00006

1. I don't modify it before adding to Emby. It gets added to my Movies folder, gets scanned, and then gets altered later. At that point, Emby sees the update and processes it. 

2. Close to 2,000 files get modified. It's a very quick process to modify the files, so I just batch process them all, each day. It's overkill, but it's the simplest way to execute, as opposed to manually processing them one at a time when a new file is added. 

Link to comment
Share on other sites

CBers

If you're modifying the MKV, then Emby will see a change as will the Fast Sync plugin, which is why you have 1000s of updates.

 

Could you not just either pre-process the files before adding them to Emby, or just modify the unmodified ones?

 

Does it matter what the internal name is on the MKV, if the filename itself has what you want?

Link to comment
Share on other sites

osak00006

If you're modifying the MKV, then Emby will see a change as will the Fast Sync plugin, which is why you have 1000s of updates.

 

Could you not just either pre-process the files before adding them to Emby, or just modify the unmodified ones?

 

Does it matter what the internal name is on the MKV, if the filename itself has what you want?

 

Simple answer, yes but it'd be a pain. 

 

Based on the back and forth here, I assume there is no current way to trigger a manual update... other than via the Kodi for Emby/Kodi UI?

Link to comment
Share on other sites

CBers

Only by stopping and restarting Kodi.

 

I'm only trying to help until Angel can look at your log file, as she might find something wrong somewhere which makes our posts moot :)

Link to comment
Share on other sites

osak00006

Only by stopping and restarting Kodi.

 

I'm only trying to help until Angel can look at your log file, as she might find something wrong somewhere which makes our posts moot :)

 

Totally understood and I appreciate the help! That's an interesting idea. I could probably get Kodi to reboot at 2AM or something, and just trigger the file updates around 1AM... as a backup plan

  • Like 1
Link to comment
Share on other sites

puithove

You're causing your own issue by modifying each MKV every time the script runs.  It sounds like everything is running properly, and you're seeing the thousands of updates because you are actually doing thousands of updates.  What you are doing is not healthy.

 

It does seem like it would be better to edit this once, before adding to the library.  If that's no possible, then you should edit your script to first read what metadata there is, and only update if it doesn't match.  That way there is only a change to the file if needed.  Then you won't have the constant updates, and Emby won't have to be rescanning... and the Kodi addon won't have to update... on and on down the line.

Link to comment
Share on other sites

osak00006

You're causing your own issue by modifying each MKV every time the script runs.  It sounds like everything is running properly, and you're seeing the thousands of updates because you are actually doing thousands of updates.  What you are doing is not healthy.

 

It does seem like it would be better to edit this once, before adding to the library.  If that's no possible, then you should edit your script to first read what metadata there is, and only update if it doesn't match.  That way there is only a change to the file if needed.  Then you won't have the constant updates, and Emby won't have to be rescanning... and the Kodi addon won't have to update... on and on down the line.

 

A fair point, but I was up front with causality. My question was simply whether the functionality existed to call the Manual Scan via some other method. I'm going to look into modifying the script to only process those that do not match...

  • Like 2
Link to comment
Share on other sites

osak00006

I think there are Kodi addons that can run things in a schedule, perhaps ones of those can call the manual sync for you.

 

That's exactly why I asked the question. There definitely are, I'm just unclear on what I would be calling.... what syntax to use etc

 

Still hoping there's some way to call the Manual Sync... 

 

( :

Edited by osak00006
Link to comment
Share on other sites

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