Need help with "GenerateIndexFilesDuringAnalysis"

Hi,
i try to build a scanner to copy index-sd.bif files from movie folder to the plex folder. Copy runs fine, it lands in the right folder but i have problems with telling Plex that there is an index file to use. I have not much experience with Phyton and Plex devleopment so i was happy to orient at REMIdx from @dane22 (Thanks for all the help).

The Script was from times before we needed to generate a token to communicate with the server. I got this to work from other samples in the forum. I can generate a token and i make calls to the server with that token. But i am not sure if that is all correct done. I call

/:/prefs?GenerateIndexFilesDuringAnalysis=0
/library/metadata/’ + myMediaID (maybe that is just the hash, i hope so) + '/analyze
/:/prefs?GenerateIndexFilesDuringAnalysis=1

The GenerateIndexFilesDuringAnalysis is what i know to tell Plex Server that he can start create index file but because in the destination folder is an index file plex should just add it to the Database.

So copy over to the correct folder is working correct (i think), i do not get errors while calling the urls i think but i can not get Plex to work with the manual copied index files.

I hope someone of you can help me. You can find what i have until now here on gitHub.

Don’t use tokens…

RemIdx was developed a long time before tokens was mandatory…

Instead, use the HTTP framework function call, that bypass the needs of tokens, since it already runs under the context of the PMS

/T

But when i use the code from your script i get a error in the log with 401 Unauthorized, what do i do wrong?

As said…The code is dated before Home mode was invented…

After that, it req. a token…

So switch to the http class of the framework, and it’ll work

Sorry i do not understand, i use the token, can you please check my code from github and give me a hint what is wrong. And what do you mean with http class of framework?

ah i found the problem. I had Get instead of Put in my function that makes the call. After chaging to Put all runs fine, at the moment.

Hmmm…Looked at your code, but…

I really doubt, that the local bif file will make it to the database…

PMS is hardcoded to only look in the origen path for a bif file…

So why the Analyze stuff ?

And if correct, then token, plex.tv stuff etc is also not needed :wink:

/T

Please explain your rejection here?

Have you looked in the xml, and noticed that your bif file was adopted by the database?

I should have close the thread because I got I to work. Token is needed for me because I do not know an other way to start the analyze. The analyze is needed to add the index file to plex database.

It is running now like it is. Thanks for all the help.

So you verified, that Plex picks up the bif file located next to your medias?

/T

In my test my scanner copied the index file from the movie folder to the metadata folder in my plex directory and add it to plex. I know it is adding because without analyze I get no preview when scrobble a movie.

Hmmmm…For that media, please try and rename the bif file in the PMS preferred directory, and then verify, that preview still works, cuz. kinda doubts that, sorry

/T

  • open video in Plex Web and use the scrubber -> getting preview images from bif file
  • rename bif file in Plex Media folder
  • cleared cache of Browser
  • play movie and use scrubber -> no preview image from bif file available
  • change name of file back to index-sd.bif
  • preview images available while using the scrubber

@Skycryer said:

  • change name of file back to index-sd.bif
  • preview images available while using the scrubber

Conclusion: Your local bif file is not adopted by Plex, and as such…

forums.plex.tv/discussion/comment/1042174/#Comment_1042174

/T

Ohh…

And forgot…

Instead of scrubber, you could also use my Plex2CSV file to grap the folder of the bif file…

Check my signature

/T