Jump to content

Auto Organize - Expanding its functionality


aaronsomek

Recommended Posts

chef

@neik I have fixed the naming issue in the javascript which caused the "spinner of death". 😉

Also, from what I have been testing this will group all the subtitle file paths  together in a list and add it to the result object in the database.

 

There a couple things!

1. I'm not sure if,  by adding new columns to the fileorganizer.db,  we have to migrate data to a new table...because... I dunno. LOL!. I think my 'pay-grade' is about to increase though. LOL! 

2. If we are reading files in the source folder recursively, and the source folder IS the parent folder for a bunch of movies and subtitle files, then that is a can of worms. A really big can of worms.

 

 

 

 

Thank so much for taking the time to be here and checking out these changes! remember to clear your browser cache.

Edited by chef
  • Like 1
Link to comment
Share on other sites

chef

Okay, a little further along now.

 

Here in my Auto organize source folder I have two ripped movies (they are fake movie files created for testing).

 

In the movie "Wall-E" there are subtitle files, and in the other movie "The Greatest Showman", there are no subtitles.

neworganize17.thumb.png.9f2d398a69192bf4c0f637ce8976233b.png

 

Once I choose to identify the fake movie "Wall-E" I am given a choice to move the subtitle files.

neworganize18.thumb.png.52f298c91c192567ffb5e1da7ae8f768.png

 

However, this option does not appear, when no subtitles are available:

neworganize19.thumb.png.f84bf3dcdc64f9b7615e4e8adf68420b.png

 

 

Here is what I learned. When you acquire items that contain subtitle files, they will be (most likely)  place in a parent folder.

Items that don't contain subtitle files may or may not be in a parent folder.

This makes it easy to simply place the entire parent folder into the the plugins source folder when it has accompanying subtitle files. 

 

I strongly believe that it is best practice to place all items in parent folders, inside the plugins source folder.

Edited by chef
  • Like 1
Link to comment
Share on other sites

chef

@Luke,

The plugin had a lot of repetitive code because movies where added after the fact, and they had a lot of the same options as the Episodes.

What I did was create in Interface called IOrganizationOptions which both option classes can implement.

Now we  use the Interface in  the function params, and pass in the appropriate option...  We can remove a couple hundred  lines of repeating code.

 

S.O.L.I.D! 👍 Liskov would be proud. LOL!

Edited by chef
  • Thanks 1
Link to comment
Share on other sites

slevin7

Thanks for all your changes. i installed the last version of this plugin, then suddendly this happens 1271709883_Bildschirmfoto2021-07-29um18_13_34.thumb.png.a23521019984a523582fc17d19708373.png

the circle spins the whole time and nothing more. 
if you need more info, i am happy to help.


greetz

Link to comment
Share on other sites

chef
58 minutes ago, slevin7 said:

Thanks for all your changes. i installed the last version of this plugin, then suddendly this happens 1271709883_Bildschirmfoto2021-07-29um18_13_34.thumb.png.a23521019984a523582fc17d19708373.png

the circle spins the whole time and nothing more. 
if you need more info, i am happy to help.


greetz

Did you happen to clear your browser cache when you installed the new version?

 

Thank you for your time.

Link to comment
Share on other sites

slevin7

I did, I even used a different browser with which I had never been to the emby instance before ..

  • Thanks 1
Link to comment
Share on other sites

chef

Right! We changed the database to add subtitle data. I thought this might happen.

 

This might be bad. 

 

I have to back track. I'll be back. 

 

 

Link to comment
Share on other sites

59 minutes ago, chef said:

 I'll be back. 

Said by the coding Terminator.  LOL

  • Like 1
Link to comment
Share on other sites

chef

Here is the fix!

If we want to have the ability to add new functionality to the plugin, we have to make sure to click the "Clear All"  button in the UI before adding new plugin DLL's. This will clear the data  from the database before running new versions of the plugin.

 

Please follow these instructions:

1. Shut down the Emby Server program

2. Place the dll into the "Plugins" folder

3. DELETE the "fileorganizer.db" file found in: "programdata/data/fileorganizer.db"

Note: this is what is creating the spinning circle of death. Our Database is updated, and embys still holing on to the old one.

4. Spin up the server again.

5. Run the scheduled task.

 

 

In the future, if you click the "Clear All" button before try out a newer version of the plugin, you wouldn't have to delete the "fileorganizer.db" file.

 

Edited by chef
Link to comment
Share on other sites

chef
1 hour ago, slevin7 said:

i am pretty shure i did this.
well with the update i have the same error, maby the log could help?embyserver.txt

Oh my.. so sorry. This is the one that fixes the DB. I apologize. Yes the log was exactly what i needed. Thank you.

DOWNLOAD: Emby.AutoOrganize.zip

 

  • Like 1
Link to comment
Share on other sites

slevin7

I have to thank.
Now everything seems to be working again, but unfortunately I don't see the results if a film is not found.
Everything looks normal to me in the log, so he realizes that he doesn't recognize the film, but doesn't show me

Link to comment
Share on other sites

chef
22 minutes ago, slevin7 said:

I have to thank.
Now everything seems to be working again, but unfortunately I don't see the results if a film is not found.
Everything looks normal to me in the log, so he realizes that he doesn't recognize the film, but doesn't show me

Okay,  do you have the first toggle turned on in the movie settings?

Edited by chef
Link to comment
Share on other sites

chef
25 minutes ago, slevin7 said:

yes i Have.
i start the task and after the task i see this 1451988542_Bildschirmfoto2021-07-29um22_22_41.thumb.png.4e9ee86764daaf626b991cd53e31b379.png

embyserver (2).txtand here are the logfiles.
I am not shure if the testfile maby have a very strange name

Interesting, I don't see errors in the log.

Stranger still, I don't see anything that mentions the process even looking for a file.

Is that the whole log file?

Link to comment
Share on other sites

chef
24 minutes ago, slevin7 said:

It is

I had better stop looki g at it on my phone and pull it up on the computer. 😅 I'll take a really good look at it! I'll be back! 

Edited by chef
Link to comment
Share on other sites

chef

Might need to remove the fileorganizer.db again and restart the server. I think the file might be stuck.

Link to comment
Share on other sites

neik
8 hours ago, chef said:

Might need to remove the fileorganizer.db again and restart the server. I think the file might be stuck.

I did that twice now but am still seeing the same issue as @slevin7.
In the logs I can see the plugin detecting the file but it is not showing in the UI

Edited by neik
Link to comment
Share on other sites

chef

Okay, I'm back. I have spent quite a while trying to figure out why the UI might not update properly. Lot's of moments of frustration while I was trying to understand the movie sorter.

please try this. clear the browser cache, and perhaps click the "clear all" button before installation, event though nothing is currently rendered in the UI.

DOWNLOAD: Emby.AutoOrganize.zip

Edited by chef
  • Like 1
Link to comment
Share on other sites

chef

@niek Would it be possible to load this dll and see that you had no issues in the UI? I have a feeling the plugin is about to get a lot of functionality we've been missing.

DOWNLOAD: Emby.AutoOrganize.zip

  • Like 1
Link to comment
Share on other sites

slevin7

Hello, sorry for the late reply. The problem that the plugin does not display anything is solved in that the plugin shows when a movie has been found.
Otherwise it unfortunately shows nothing

  • Thanks 1
Link to comment
Share on other sites

chef
3 hours ago, slevin7 said:

Hello, sorry for the late reply. The problem that the plugin does not display anything is solved in that the plugin shows when a movie has been found.
Otherwise it unfortunately shows nothing

Okay thank you @slevin7.

I realize you are a busy person, would it be possible to see logs from when you add a movie?

perhaps you could look at the dev options of the browser and see if there is any errors in the console?

if you run the task does the table populate?

😬

Edited by chef
Link to comment
Share on other sites

Ryan_vl

Hi @chef

 

Not sure if this will help or not but for me i have 2 separate folders for Movies and TV Series that are being monitored by Autoorganize. If i place a Movie in the Movie folder it is found in the LOGS but not appearing in the Activity Monitor to action.

However if i place this in the TV Series folder it will then appear in the Activity Monitor and can be actioned.

Link to comment
Share on other sites

chef
11 hours ago, Ryan_vl said:

Hi @chef

 

Not sure if this will help or not but for me i have 2 separate folders for Movies and TV Series that are being monitored by Autoorganize. If i place a Movie in the Movie folder it is found in the LOGS but not appearing in the Activity Monitor to action.

However if i place this in the TV Series folder it will then appear in the Activity Monitor and can be actioned.

Yes that is helpful. Thank you. I will test this immediately.

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