Jump to content

Completed Sync jobs re-syncing


SlyPop
 Share

Recommended Posts

Ok I obviously don't understand the concept of Folder Sync jobs. I have about 20 movies and TV episodes with Sync jobs. They Queue, Sync, Ready for Transfer and Transfer. Then they seem to play fine. I thought great! But they do this every night! The files work and the files don't actually seem to change the files haven't been modified in over a week. FFMpeg just runs all night for nothing. 

 

If I cancel the Sync job the media will be removed right? What am I missing?

Link to comment
Share on other sites

I'll have to review this. Sync is designed so that if the synced content disappears but the sync jobs are still active, then it will resync. do you sometimes disconnect or shut off the drive? i will have to make it handle that situation.

Link to comment
Share on other sites

Interesting, I put the Sync folder on a 2TB Green drive which does spin down and takes a minute to spin up. It might look "disconnected" so Emby processes just to find the file exists when it wakes up the drive for final transfer. I wonder if putting the sync process cache on the same drive would wake it up in the beginning of the process to show the files exist and don't need a resync? 

Link to comment
Share on other sites

Either that or we could just not do the resync for folder sync. Will have to think about that.

Link to comment
Share on other sites

Personally, I think if content "disappears" I'd rather it was tagged unavailable and maybe allow me to resync rather than simply resync blindly. There could be a lot of jobs that kick off inadvertently. If the drive were disconnected (or unavailable on the network) would it resync with no where to transfer the final files? Just seems to me if Emby expects media to be there (job not deleted) it should alert you if it isn't. And for a slower or network attached drive maybe just multiple pings or an an increased timeout to make sure it really disappeared.

 

Not sure how any of that plays into sync only unwatched or keeping shows current though.

 

Regardless thank you for the response and all the effort you put in!

  • Like 1
Link to comment
Share on other sites

Does Emby check to see if a sync job or file already exists? It seems to me that if I sync a media title it dutifully starts transcoding even if the exact same title and format already exists created by this or another user. 

Link to comment
Share on other sites

Well that's a different scenario than this thread discussion, but no, it currently does not check that and will resync.

Link to comment
Share on other sites

Yes it is a different scenario and I realize now I have both going on! Putting the transcode cache on the same drive seems to usually avoid the mass transcode at night but I was still seeing duplicate syncing and this other scenario is probably why. Also I am seeing that if a client transcodes they tend to keep transcoding different media even in the house. I have seen other threads to the effect that the default Direct streaming seems to be forgotten and they transcode rather than direct stream even if that is available. So I assume this is known.

 

I have another thread asking if users can be allowed to see other users syncs or for a report or filter. It would be great for a client to see what is available to them that is already processed.

 

Obviously seeing multiple scenarios I wasn't aware of. Working on external play, syncing and downloading because I have kids away and at home in college! Thanks so much for the assistance.

Link to comment
Share on other sites

My solution to this "problem" was creating a scheduled script that runs setting all sync jobs to "Only Sync Unwatched Videos" and marking all synced items as "Watched" for the user who synced them.

 

For example:

User Tim syncs South Park S1, S2. Script runs in 6 hour intervals marking all of South Park S1 and S2 as watched and ensuring that the Sync Job only syncs Unwatched content. Now if any of the files from Tim's sync folder are moved (ie to his hard drive) Emby will just sit their happily as it didn't think the files needed syncing anyway.

 

If this is a suitable solution for you SlyPop be aware that when Emby runs its next "Sync" it will realize that those synced items should be removed. To avoid this, I included in my script a bit that moved all files from the sync target to a higher level folder. Files sync to: A:\Sync\Tower\General\TV\South Park\E1  move files to: A:\Sync\Tower\TV Shows\South Park\E1      You also would then need to remove the data.json that records the synced items.

 

 

If you are interested more let me know and I can show you my PowerShell script.

 

Hope this at least gives you a few ideas. :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...