Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add api to start filescanner from skin #262

Open
jluc2808 opened this issue Oct 5, 2015 · 8 comments
Open

add api to start filescanner from skin #262

jluc2808 opened this issue Oct 5, 2015 · 8 comments

Comments

@jluc2808
Copy link
Member

jluc2808 commented Oct 5, 2015

could you add an entry / api to allow user to start filescanner from the skin

@modmax
Copy link
Member

modmax commented Oct 5, 2015

I think that will not work, cause the filescanner is an independant program, which just pushes informations/data to the YAMJ3 core, but doesn't get any informations from the core.
Also the filescanner then must run as daemon to receive a possible "rescan" command from the core.

I leave this issue open; perhaps somehow someone find a solution for this .. :-)

@jluc2808
Copy link
Member Author

jluc2808 commented Oct 6, 2015

i thought about a line command which could be started from a script like any .cmd or .sh

@jluc2808
Copy link
Member Author

i thought about a solution

as it's available to change date and hour via yamj3 configuration page , the solution could be the use the same mecanism and change the date via api which will set a date before , that will start the task automatically ? am i wrong ?

@Omertron
Copy link
Member

Why do you want to start the filescanner from the skin?

You can start the scanner in "watch mode" that allows it to update when there are changes in the file system. This isn't like YAMJv2 where you have to keep running the scanner.

Additionally, if you can't run the scanner in watch mode, you could just run it more often (every 30 mins) if you wanted to as it is not a "heavy" process in the same way as the v2 scanner was.

@jluc2808
Copy link
Member Author

'watch mode' is: when i start filescanner.cmd , the process is looking for update and loop indefinitivly at this task, but i don't like to let a process still alive on the background , i'm not aware with (perhaps i'm not the only one)

my filescanner is running (manually) some days , perhaps one a week , not at the same time , not every week, and let a process 7x7/24x24 and even every 30' seems to me too large for the number of time it is used

so start the scanner while you're looking at your collection seems to me a good way to update the database.

@modmax
Copy link
Member

modmax commented Feb 17, 2016

The filescanner is a standalone program ... also the core with it's skin and API is a standalone program; with the difference, that the core is a web application with a runnig web server (until stopped).

What you want to do is: start the filescanner program via an API call, which then sends information to the core. Seems to be a valid question ...

Then the next question should be: Why is the filescanner not part of the core? Then the file scanning could be done by the core, without the overhead of http requesting and calling external programs, which sends info to itself ...
The reason is the design decision, that multiple file scanners can be used to push informations to the core; wherever the core is ... so it doesn't matter if the core is on a different machine than the filescanner or if the core has access to a NAS, when then filescanner is executed on a NAS and the core somewhere else .. (okay: right now local NFOs and images would not work if core has no access, but that is another problem ... :-)).

@jluc2808
Copy link
Member Author

the filescanner couln't be let running on background , to much issue with that way

  • growing logs to much
  • when you rename a file or replace an existing one ==> to much trouble
  • when a file is added , if it takes a very long time (like a download directly in the movie folder) ==> filescanner and jetty get crazy

so a good solution is (as NMJtoolbox does):

  • allow to select a file to the filescanner from the skin UI
  • allow to start a filescanner of a specified folder choosen with the skin UI
  • allow to start the filescanner process from the skin command

this is priority 1

  • because of the bugs
  • because of the last return from yamj3's newby (which have stop yamj3 try , because of the garbagge created with the filescanner running in background)

@jluc2808
Copy link
Member Author

perhaps a 1rst implementation could be a php exec program that launch filescanner (once, and stop after complete) from yamj3 task ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants