Jump to content

Commandline to initiate library scan?


gfgf

Recommended Posts

The server doesn't have command line operations - it isn't that kind of a program since it is running all the time.

 

It is designed around an http API.  You can view the API docs from the tray icon menu.

Link to comment
Share on other sites

If you attempt to back up as far as you were suggesting, you will need to do a complete clean install.  Lots of data structures have changed and whatever databases, cache files and folder structures you have now probably won't be compatible.

 

Also, it is quite likely many of the client apps won't work as well.

Link to comment
Share on other sites

gfgf

Nah, all my clients work fine with it. The folder structure for videos is the same, cos I made it all back then and haven't changed it. It's only a few months, not years. It's interesting that you're so against the idea.

 

And I figured I'd have to erase the AppData folder. No big deal.

Link to comment
Share on other sites

trusselo

how about an http desktop shortcut that can start library scan?

 

I cannot make sense of the API documentation.

Link to comment
Share on other sites

gfgf

how about an http desktop shortcut that can start library scan?

 

I'd go for that too. Although the ideal solution would be via WGET. If no-one here helps I'll get my mate to do it this week and I will share the file.

Link to comment
Share on other sites

trusselo

Or just right click option on the taskbar icon

 

Sent from my SGH-I337M using Tapatalk

Link to comment
Share on other sites

DrWatson

Open 

http://localhost:8096/mediabrowser/ScheduledTasks

and get the id for Scan media library

 

then make a short cut or what ever you were after

http://localhost:8096/mediabrowser/ScheduledTasks/Running/{id}

Swap out localhost for your ip if you need to.

Edited by DrWatson
Link to comment
Share on other sites

MB 3 is operating in dog years.  October is years ago as far as we are concerned ;).  A ton of internals have changed and, by file structures, I meant our internal ones (in the appdata folder).

Link to comment
Share on other sites

gfgf
http://localhost:8096/mediabrowser/ScheduledTasks
http://localhost:8096/mediabrowser/ScheduledTasks/Running/{id}

 

Awesome. Although mine gives an error. Is the URL right? I get the same error if I change the URL randomly ;)

Handler for Request not found:
Link to comment
Share on other sites

Those calls are not going to do it.  The call to initiate a library scan is a POST not a GET.  And it may require an authorization header (not sure about that one but it probably should).

 

We have a button in a web interface that allows users to easily kick off a task manually.  If you want to do it programatically, you may have to write an app that properly communicates with the server via the API. 

Link to comment
Share on other sites

gfgf

does not work, going to address 

http://192.168.0.11:8096/mediabrowser/mediabrowser/ScheduledTasks

 

You duplicated /mediabrowser in the URL.

Link to comment
Share on other sites

gfgf

If you want to do it programatically, you may have to write an app that properly communicates with the server via the API. 

 

Have you considered fixing the scan behavior that three users documented yesterday? The one where a start-up scan takes much longer than a manual scan since December 2013? That would make this unnecessary.

Link to comment
Share on other sites

MrWebsmith

its possible that the startup scan is doing necessary processes that the manual task does not and theres a good reason for the difference in run-times.. on my library they are fairly close in timing actually.. within 30s or so

Link to comment
Share on other sites

DrWatson

Ah sorry my bad i just saw it in fiddler didn't check if it was post or get sorry for misinformation

Edited by DrWatson
Link to comment
Share on other sites

gfgf

its possible that the startup scan is doing necessary processes that the manual task does not and theres a good reason for the difference in run-times..

 

No. Because it works fine if you turn off the start-up scan and do a manual scan. And the problem - which btw is in a different topic - doesn't occur in older versions.

 

on my library they are fairly close in timing actually.. within 30s or so

 

Why not go through all the threads on here and say you don't have the problem referred to in the original post? I'm sure people would thank you for your input.

Link to comment
Share on other sites

Redshirt

Why not go through all the threads on here and say you don't have the problem referred to in the original post? I'm sure people would thank you for your input.

 

The guy is trying to help you. If you don't want input, don't post.

Link to comment
Share on other sites

  • 1 month later...
capler

this command works for me as it performs a POST request:

curl --data "" http://localhost:8096/mediabrowser/ScheduledTasks/Running/2d67d886717cdade18d9640d4ebbb9cb

If you're using Windows and don't have Curl, just get a binary of Curl via google.

Link to comment
Share on other sites

Good day,

 

Curl is cool tho, I was in the same boat as the OP when this project start it.

 

Good idea to share what you guys find for whom need it.

 

My best

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