Jump to content

Client force Scan-Media-Library upon startup?


jwill

Recommended Posts

Hello,

 

I'm a recent migrant from MB2.

 

I am having the same issue on this.  Does someone have a suggestion aside from going into config and hitting update library?  My library is quite big and it take 5 minutes for a complete update.

 

In MB2, if I exit out a folder (a TV season) and re-enter, it will automatically update.  MB3 does not do that it seems....very troublesome.

Link to comment
Share on other sites

The server should be keeping up with any changes.  If it isn't then we need to figure out why and try to address that.

 

Are you running the server and client on the same machine and put it to sleep or shut it down?

 

What is the file system that holds your media?

Link to comment
Share on other sites

The server should be keeping up with any changes.  If it isn't then we need to figure out why and try to address that.

 

Are you running the server and client on the same machine and put it to sleep or shut it down?

 

What is the file system that holds your media?

 

The server and client are on different machines but the server is always on.

 

The file system I am using is NTFS.

 

EDIT:  One more thing is that the shows are stored on a NAS, which is also always on.  And I just check that both my client that is on the same machine as the server and the standalone client DO NOT keep up with the changes....It may be an entirely server issue where the new shows stored on a NAS is not detected...But again, this is not the case with MB2.  Manually updating MB3 library works but is far from ideal.

Edited by lolento
Link to comment
Share on other sites

Yes, it is a usb drive plugged into the router, formatted from windows.

 

Edit:  Sorry, just went and actually checked, the file system on the Nas is ext4.  Does that make a difference?

 

Your NAS file system is NTFS?

Edited by lolento
Link to comment
Share on other sites

Yes, that means it is linux based and is, therefore, subject to the limitations of that operating system when it comes to notifying us of changes.  In short, we will only be notified of changes in the root directoriies.  If you add something like an episode (which is in a sub-folder) we will not be notified of that event so there is no way for us to see it.

 

The only thing you can do is increase the frequency of the library scan task on your server.

Link to comment
Share on other sites

Workarounds are possible.

 

My linux server runs sickbeard and sabnzbd, but Mediabrowser (MBS) is running on my Windows machine. So the workaround I did was to modify the sabtosickbeard script to `touch` a folder in the root directory of a media library that Mediabrowser is monitoring. That has the effect of triggering Mediabrowser to run Scan Media Library whenever new content is added by sickbeard.

 

Another alternative (which I cannot vouch for from personal experience) is that if sickbeard runs on a windows machine, but adds the content to the linux server file share, then Mediabrowser should be able to pick up new content that is not in the root directory.

 

One other idea (again, I cannot vouch for it from personal experience) would be to modify your configuration so that new TV shows are added without Season folders. I have read that Mediabrowser supports such a configuration. Since there would not be a subfolder, I think Mediabrowser would recognize the new content. I'm not sure it would work, though, and I do not know if sickbeard supports eliminating the Season folders (or whatever software you are using to add content).

Edited by jwill
Link to comment
Share on other sites

Yes, from a Windows client accessing the NAS and it could be the same machine running the MB server (does this last part matter?).

 

How do you add it? From a Windows client accessing the NAS? If so, is it the same Windows machine that is running MB Server?

Link to comment
Share on other sites

I see.  Thanks for the explanation.

 

Will there be something in the works that mimics the behavior of MB2?  Under the same setup, MB2 always refreshes automatically when I enter and leave a folder.  This is much less of an annoyance because I don't have to wait for specific scan intervals for MB3.

 

 

Yes, that means it is linux based and is, therefore, subject to the limitations of that operating system when it comes to notifying us of changes.  In short, we will only be notified of changes in the root directoriies.  If you add something like an episode (which is in a sub-folder) we will not be notified of that event so there is no way for us to see it.

 

The only thing you can do is increase the frequency of the library scan task on your server.

Link to comment
Share on other sites

Thanks for the suggestions.  

 

I don't run either sickbeard or sabnzbd.  Is there a way to port the script to windows so that the root level directory gets touched when I add files to a subfolder?  This would be awesome.

 

I don't plan on running sickbeard and I'm not sure how the last option will work out.

 

 

 

Workarounds are possible.

 

My linux server runs sickbeard and sabnzbd, but Mediabrowser (MBS) is running on my Windows machine. So the workaround I did was to modify the sabtosickbeard script to `touch` a folder in the root directory of a media library that Mediabrowser is monitoring. That has the effect of triggering Mediabrowser to run Scan Media Library whenever new content is added by sickbeard.

 

Another alternative (which I cannot vouch for from personal experience) is that if sickbeard runs on a windows machine, but adds the content to the linux server file share, then Mediabrowser should be able to pick up new content that is not in the root directory.

 

One other idea (again, I cannot vouch for it from personal experience) would be to modify your configuration so that new TV shows are added without Season folders. I have read that Mediabrowser supports such a configuration. Since there would not be a subfolder, I think Mediabrowser would recognize the new content. I'm not sure it would work, though, and I do not know if sickbeard supports eliminating the Season folders (or whatever software you are using to add content).

Link to comment
Share on other sites

I added a new episode of "The Walking Dead" to the season 4 directory.

 

The following is my folder structure:

TV Shows -> The Walking Dead -> Season 4 -> Files.

Link to comment
Share on other sites

If I understood abeloin correctly, he said that the problem only occurs with linux servers where the new content is added from the linux server. I thought he said that if the content is added by a Windows client (or possibly he meant the Windows client that is running MB Server) then the problem should not occur. I did not test that, since my content is added by sickbeard running on my linux server. But I remember ebr saying that when he had sickbeard running on his Windows client and was running a linux Unraid fileserver, that it worked okay.

 

So I would have expected your configuration to work, especially if the content is added by the same Windows machine that is running MB Server.

 

But if you are sure that is not working, then either I misunderstood abeloin, or something is wrong.

 

One thing you can test is what happens if you do something to the root directory of a media library. Just about anything you do should trigger MBS to do a scan media library. For example, you could create a folder named "zzz" and create an empty file inside called ".ignore". Then, whenever you want to trigger a scan media library, just rename the folder (for example, add an extra z or delete a z from the name).

 

If that works, you could automate it. Although if you are adding your content manually, it hardly seems worth it to automate. And you can always trigger a scan media library task from the web interface for MBS.

 

All that being said, your best bet may be to find out why MBS is not automatically recognizing your new content, since my understanding of your description is that MBS should get notified automatically.

Edited by jwill
Link to comment
Share on other sites

Latchmor

Hi guys, just for comparison I too have a Synology NAS with ext file system. When I add content from my 'normal' PC to the NAS, MBS on another PC picks up the changes fine.

Cheers

Link to comment
Share on other sites

Yeah, when I had UnRaid and added content from a Windows box - the notification worked for me as well.  Now I have FlexRaid so it isn't an issue anyway.

 

Maybe there is some configuration setting in the NAS that has the notifications turned off.  Try the test jwill suggested of adding something at the top level of your share and see if the server sees it and kicks off a scan.

Link to comment
Share on other sites

Thanks for the recommendations.

 

After some trial and error, I can confirm that if I add a file to a sub folder from the root folder of a library, MBS will not detect any change.  If I add a file to the root folder of a library, then MBS will start a scan.

 

For now, I wrote a script to add and delete a text file to the root folder whenever I start the client.  I think this will handle the problem 95% of the time.

 

I don't know how to write a script to detect directory changes...

Link to comment
Share on other sites

for those of you who use sickbeard, i am in discussion with their developers to support notifying us when new content is downloaded.

 

in addition, the next server release will have a nifty auto-organize feature that can monitor a download folder for new episodes, grab, rename and move to the correct location. and that of course will not require a library scan after. so there's a couple things coming your way that will offer some improvement here.

  • Like 1
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
×
×
  • Create New...