Jump to content

Auto Organize - Expanding its functionality


aaronsomek

Recommended Posts

neik
22 minutes ago, chef said:

If you inspect element in the browser and look at the console, are there any errors?

A page refresh apparently solved the issue, strange...
I will keep an eye on it and in case it happens again trying to narrow it down.

  • Thanks 1
Link to comment
Share on other sites

chef
On 8/5/2021 at 5:38 PM, Ryan_vl said:

That worked perfectly, thanks so much for this!!!!

 

@Ryan_vl, there is a file  on your machine here: "Emby-Server\programdata\config\autoorganize.xml"

 

Inside the config xml there is a node for " <MovieOptions>".

Under MovieOptions is a node called: " <WatchLocations>", which should have a child node called "String". Looks like this:

 <MovieOptions>
    <IsEnabled></IsEnabled>
    <MinFileSizeMb></MinFileSizeMb>
    <LeftOverFileExtensionsToDelete>
      <string />
    </LeftOverFileExtensionsToDelete>
    <WatchLocations>
      <string>RIGHT_HERE!!!</string>
    </WatchLocations>
    <MoviePattern></MoviePattern>
    <OverwriteExistingFiles></OverwriteExistingFiles>
    <DeleteEmptyFolders></DeleteEmptyFolders>
    <ExtendedClean></ExtendedClean>
    <CopyOriginalFile></CopyOriginalFile>
    <AutoDetectMovie></AutoDetectMovie>
    <DefaultMovieLibraryPath />
    <IgnoredFileNameContains />
    <CreateMovieInFolder></CreateMovieInFolder>
    <MovieFolderPattern></MovieFolderPattern>
  </MovieOptions>

 

Does that node exist for you?

If so, does the node (I've marked 'RIGHT_HERE!!!' in the example) contain the proper path to the watched folder for your movies?

I just tested and it seems okay on my machine... but ... that means nothing 😆

 

 

Edited by chef
Link to comment
Share on other sites

chef
1 hour ago, neik said:

A page refresh apparently solved the issue, strange...
I will keep an eye on it and in case it happens again trying to narrow it down.

Excellent! Thank you @neik.

Keep me up to date if anything happens that is out of the ordinary ... or doesn't happen  :)

Link to comment
Share on other sites

Ryan_vl
26 minutes ago, chef said:

@Ryan_vl, there is a file  on your machine here: "Emby-Server\programdata\config\autoorganize.xml"

 

Inside the config xml there is a node for " <MovieOptions>".

Under MovieOptions is a node called: " <WatchLocations>", which should have a child node called "String". Looks like this:


 <MovieOptions>
    <IsEnabled></IsEnabled>
    <MinFileSizeMb></MinFileSizeMb>
    <LeftOverFileExtensionsToDelete>
      <string />
    </LeftOverFileExtensionsToDelete>
    <WatchLocations>
      <string>RIGHT_HERE!!!</string>
    </WatchLocations>
    <MoviePattern></MoviePattern>
    <OverwriteExistingFiles></OverwriteExistingFiles>
    <DeleteEmptyFolders></DeleteEmptyFolders>
    <ExtendedClean></ExtendedClean>
    <CopyOriginalFile></CopyOriginalFile>
    <AutoDetectMovie></AutoDetectMovie>
    <DefaultMovieLibraryPath />
    <IgnoredFileNameContains />
    <CreateMovieInFolder></CreateMovieInFolder>
    <MovieFolderPattern></MovieFolderPattern>
  </MovieOptions>

 

Does that node exist for you?

If so, does the node (I've marked 'RIGHT_HERE!!!' in the example) contain the proper path to the watched folder for your movies?

I just tested and it seems okay on my machine... but ... that means nothing 😆

 

 

Hi @chef

It does exist and the path is correct

    <WatchLocations>
      <string>\\<ServerName>\Downloads\Emby Movies Monitor</string>
    </WatchLocations>

Link to comment
Share on other sites

chef
57 minutes ago, Ryan_vl said:

Hi @chef

It does exist and the path is correct

    <WatchLocations>
      <string>\\<ServerName>\Downloads\Emby Movies Monitor</string>
    </WatchLocations>

Okay. Before I post this version with some extra logging, is there any way I could see a log for when this is happening?

Link to comment
Share on other sites

Ryan_vl

embyserver.txt

Here is the Log File.

So i did do a Test with the below 2 movies

Stay Tuned - Already exists in my library and does appear in the activity log

Nativity 2 - new Movie - seems to be found in the log but does not appear in the Activity log

Link to comment
Share on other sites

chef
15 minutes ago, Ryan_vl said:

embyserver.txt 3.76 MB · 0 downloads

Here is the Log File.

So i did do a Test with the below 2 movies

Stay Tuned - Already exists in my library and does appear in the activity log

Nativity 2 - new Movie - seems to be found in the log but does not appear in the Activity log

Oh! that is exactly what I needed! excellent. 

I tested on a movie that already existed, which is probably why I didn't break.

I will brb!

Edited by chef
Link to comment
Share on other sites

Skopin
On 8/22/2021 at 2:29 PM, chef said:

That folder structure is complex. 

I did read people wanted the plugin to handle a more complex file system.

I suppose it could be possible to create a regular expression to handle complex folder structure. But, how complex? I'm not entirely sure.

What if instead of having it auto handle those, you changed it to allow more than one watch folder and destination to be set up? So if I put a file into watch folder 1, it goes to destination folder 1. If I put it in watch folder 2, it goes to destination 2.

This would be ideal for me personally. I have multiple libraries for both shows and movies with my files separated into folders based on resolution. It looks like this:

Movies Library

Folders: 4K, HD, SD

Kids Movies Library

Folders: 4K, HD, SD

I would love to be able to set up a watch folder for each of those folders and have auto-organize move them to their respective library folders. So if I drop a file into KidsMovies4KReady, it moves it into Kids Movies/4K. Currently I have to manually change the Default Movie Library every time I have a different type to add.

  • Like 2
Link to comment
Share on other sites

chef
1 hour ago, Skopin said:

What if instead of having it auto handle those, you changed it to allow more than one watch folder and destination to be set up? So if I put a file into watch folder 1, it goes to destination folder 1. If I put it in watch folder 2, it goes to destination 2.

This would be ideal for me personally. I have multiple libraries for both shows and movies with my files separated into folders based on resolution. It looks like this:

Movies Library

Folders: 4K, HD, SD

Kids Movies Library

Folders: 4K, HD, SD

I would love to be able to set up a watch folder for each of those folders and have auto-organize move them to their respective library folders. So if I drop a file into KidsMovies4KReady, it moves it into Kids Movies/4K. Currently I have to manually change the Default Movie Library every time I have a different type to add.

It doesn't say it in the UI, and I haven't tested it myself, but if you put a comma delimited set of paths in the watched folder input, I think you can have more then one for both episodes and movies.

It is setup to be an array of paths, but it is untested. 

 

As far as a more complex sort, I'll see what it can do. 

Edited by chef
Link to comment
Share on other sites

Skopin
1 hour ago, chef said:

It doesn't say it in the UI, and I haven't tested it myself, but if you put a comma delimited set of paths in the watched folder input, I think you can have more then one for both episodes and movies.

It is setup to be an array of paths, but it is untested. 

 

As far as a more complex sort, I'll see what it can do. 

Oh, that's good to know. I'll give that a try. Even that would speed up my workflow so I only need to change the destination instead of both the source and destination.

Link to comment
Share on other sites

chef
4 minutes ago, Skopin said:

Oh, that's good to know. I'll give that a try. Even that would speed up my workflow so I only need to change the destination instead of both the source and destination.

I'd be interested to know, I haven't tried it either. 👍

Link to comment
Share on other sites

chef

I just noticed something interesting that needs attention. When the file is in use (direct streaming) from emby, and you want to sort a new version of the file into the library, the plugin will show 'Not Enough Disk Space' error. this is because we assume the IO error at that point of sorting will be not enough disk space.

Apparently, we need to have another status, 'File In Use', and put the sorting of the file into a 'Waiting' state.

Link to comment
Share on other sites

Skopin
12 hours ago, chef said:

I'd be interested to know, I haven't tried it either. 👍

Unfortunately, it didn't work. I tried both with and without quotes around the folder paths, but it never picked up the files I put in either folder. 

Link to comment
Share on other sites

chef
Just now, Skopin said:

Unfortunately, it didn't work. I tried both with and without quotes around the folder paths, but it never picked up the files I put in either folder. 

Ah, looking at the code I can see why it wasn't completely implemented.

It looks as though the ground work is there.

Perhaps getting multiple watch folders is the first step in a more complex sorting.

We definitely want to keep things as straight forward as possible. But, let's see what can be arranged, in any case. 👍

 

  • Like 1
Link to comment
Share on other sites

rbjtech

Does it pick up any (a single) folders ?

If yes, then you can cheat and just put symbolic links into that single Folder which actually point to multiple (unlimited) folders.

  • Like 1
Link to comment
Share on other sites

GrimReaper
15 hours ago, Skopin said:

Currently I have to manually change the Default Movie Library every time I have a different type to add.

I still think current workflow where you change both the source and destination is safer approach, until multiple watch/destination pairs are introduced, else you'll ever be able to import only single movie (or all within a single subfolder) and be particulary cautious not to have movies in two or more subfolders at the same time otherwise they might easily end up in wrong library. Changing source as you currently do is just additional safety switch. 

Edit: Or run multiple Radarr instances. 🤭

Edited by GrimReaper
Append
Link to comment
Share on other sites

neik

Hi chef,

I have some weird behavior. I added two or three files to the watched folder but one is not being shown in the UI although the plugin sees the file and writes it in the log - will send it to you via PM.

Another point: I hope it's not too much to ask but could you use some sort of versioning please? Currently it's difficult to determine whether I'm on the latest version or not.

Link to comment
Share on other sites

chef
15 hours ago, neik said:

Hi chef,

I have some weird behavior. I added two or three files to the watched folder but one is not being shown in the UI although the plugin sees the file and writes it in the log - will send it to you via PM.

Another point: I hope it's not too much to ask but could you use some sort of versioning please? Currently it's difficult to determine whether I'm on the latest version or not.

Yes, thank you. I have a day off of work today, and the kids are at school! Sweet!

That gives me quite a bit of time to find out what is making the UI miss new items. 

 

Thank you for the log. Much appreciated! 😃

I'll also update the versioning. 

Thanks @neik

  • Thanks 1
Link to comment
Share on other sites

chef
On 9/3/2021 at 1:57 AM, neik said:

chef, the black action buttons are not visible on the black theme any chance you can adapt that to a different color?

Yes, I can make them the theme colour.

Won't take long.

  • Thanks 1
Link to comment
Share on other sites

chef

here you go @neik

I think I grabbed the correct color, and it should change with the different themes correctly.

You'll want to clear browser data to show the changes.

Emby.AutoOrganize_v1.6.0.2.zip

Let me know if you still have an issue with that movie not showing up.

  • Like 1
Link to comment
Share on other sites

neik

That did the trick with the buttons, thanks for that.

I am still running into the other issue though not seeing some files in the UI and therefore not being able to organize them.
Anything you can do about that or anything you need from me?

Link to comment
Share on other sites

chef
2 hours ago, neik said:

That did the trick with the buttons, thanks for that.

I am still running into the other issue though not seeing some files in the UI and therefore not being able to organize them.
Anything you can do about that or anything you need from me?

It is a movie file right? 

 

Link to comment
Share on other sites

neik
18 hours ago, chef said:

It is a movie file right? 

 

That's correct, until now it only happened with movies, tv shows have always been shown so far.

Edit: Need to correct that, just have an episode that it's not showing up in the UI.
If you need anything from me then let me know.

Edited by neik
Link to comment
Share on other sites

neik

Chef, the files organized by the plugin used to show up in the library without needing to run the scan task - probably the plugin did some sort of trigger.

Now I have to always start the scan task for the new items to show up.

Just to let you know, definitely no biggy...

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