Jump to content

Script to scan library


chudak

Recommended Posts

chudak

I run Emby Server on ubuntu 16.04 and use  Scan media library in scheduled tasks.

 

However I did not find that that scan doing what I am expecting and I have to run scan manually.

 

I want to be able to scan for new videos as soon as it was added.

 

Wonder what other people doing with this and also if there is some command line or similar option I can use to enforce desired behavior ?

 

Thx

Link to comment
Share on other sites

chudak

Try enabling the real-time monitor for your libraries.

 

I don't see it under scheduled or plug ins

Where is it ?

 

Thx

Link to comment
Share on other sites

chudak

Click on one of your libraries and you can configure it for that library.

 

Thx fount it!

(not intuitive I must tell!)

We will see now!

Link to comment
Share on other sites

chudak

Why is it not intuitive? When you add the library it's right there.

Because I could not find it :)

 

Bacuse under scheduled tasks there are similar items and I’d expect it in one place not in two

Link to comment
Share on other sites

Scheduled task is a generalized area not specific to any one certain thing.

 

I think you just didn't scroll down to explore the available per library settings. I think at some point we will redo that whole interface but there's one thing that will never change. If you have five settings and you can only see four without scrolling, many users will never know the fifth one exists.

Link to comment
Share on other sites

chudak

Scheduled task is a generalized area not specific to any one certain thing.

I think you just didn't scroll down to explore the available per library settings. I think at some point we will redo that whole interface but there's one thing that will never change. If you have five settings and you can only see four without scrolling, many users will never know the fifth one exists.

You are right, but generally speaking if you see one user not being able to find something, you try to pay attention to others, and then based on results you will get your answer.

 

*in my opinion* that was not intuitive ... see what others think

Link to comment
Share on other sites

chudak

Then another point is - do you provide scan setting option on top level, e.g. for all libraries , or on per library basis as now or both

Not sure...

Link to comment
Share on other sites

chudak

“the real-time monitor” - you have it now under each library, but could have it for all, one option, somewhere in general settings

Link to comment
Share on other sites

That's how we started in the past, community feedback led us to making it configurable per library.

Link to comment
Share on other sites

chudak

That's how we started in the past, community feedback led us to making it configurable per library.

 

@@Luke

 

Back to the initial question.

New videos would not show up in emby search when Enable real time monitoring was enabled.

I see note "Changes will be processed immediately, on supported file systems." so I am on ubuntu, is it supported?

 

Emby server restart also won't rescan new videos, which is odd and unexpected.

 

Please advice.

Thx

Link to comment
Share on other sites

Restarting the server does not run a library scan. Why are you expecting that? To run a library scan, go into library setup and click the button to run a scan.

 

As far as the real-time monitor, it takes a few minutes so you just have to be patient.

Link to comment
Share on other sites

chudak

Restarting the server does not run a library scan. Why are you expecting that? To run a library scan, go into library setup and click the button to run a scan.

 

As far as the real-time monitor, it takes a few minutes so you just have to be patient.

 

I waited for maybe 3 min.  What is time delay?

 

I will try again, thx !

 

It seems reasonable to scan libraries on start, no ?  Or at least have an option to do so

Link to comment
Share on other sites

chudak

Restarting the server does not run a library scan. Why are you expecting that? To run a library scan, go into library setup and click the button to run a scan.

 

As far as the real-time monitor, it takes a few minutes so you just have to be patient.

 

It seems liked worked after 5 min, cool !

Link to comment
Share on other sites

  • 3 weeks later...
chudak

Restarting the server does not run a library scan. Why are you expecting that? To run a library scan, go into library setup and click the button to run a scan.

As far as the real-time monitor, it takes a few minutes so you just have to be patient.

I reinstalled clean latest version today and not sure if real-time monitor is working...

Did not see updates after awhile.

 

Luke, how long is the time out?

Edited by chudak
Link to comment
Share on other sites

Usually within 2-3 minutes. Can you discuss what happened and what you were expecting? thanks.

Link to comment
Share on other sites

chudak

Usually within 2-3 minutes. Can you discuss what happened and what you were expecting? thanks.

 

Well does not seem to be working for me and I see this in the log:

 

2018-05-10 08:12:06.002 Error LibraryMonitor: Error in Directory watcher for: /media/seagatecentral/Public/Videos

    *** Error Report ***

    Version: 3.4.1.0

    Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby-server-deb_{version}_amd64.deb

    Operating system: Unix 4.13.0.39

    64-Bit OS: True

    64-Bit Process: True

    User Interactive: True

    Processor count: 4

    Program data path: /var/lib/emby

    Application directory: /opt/emby-server/system

    System.IO.FileNotFoundException: Could not find file '/xxx/movie.yyy'.

    File name: '/media/seagatecentral/Public/Videos/xxx/movie.yyy'

    System.IO.FileNotFoundException

    No Stack Trace Available

 

then when I do manual scan it works fine

Any suggestions ?

 

Thx

Link to comment
Share on other sites

Yea that's an error i haven't seen before. It could be a defect with the .net core runtime filesystemwatcher on ubuntu. Are you immediately renaming or deleting a file after copying it into your media directory? It looks like that might be the sequence of events that causes it, so you might be able to work around it. The strange thing is that we've tested and verified the realtime monitor under linux and other users are also using it.

Link to comment
Share on other sites

chudak

Yea that's an error i haven't seen before. It could be a defect with the .net core runtime filesystemwatcher on ubuntu. Are you immediately renaming or deleting a file after copying it into your media directory? It looks like that might be the sequence of events that causes it, so you might be able to work around it. The strange thing is that we've tested and verified the realtime monitor under linux and other users are also using it.

 

 

I actually don't do any renaming.

After video download, usually see if it shows up in the library (compare emby vs plex)

 

I wonder if emby is not waiting till files gets moved fully into video dirand therefor crashing ?  That does not make too much sense since it used to work.

 

How can I work around?

 

PS:  Be happy to help with testing since I got it in my env

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...