Jump to content

Auto Organize - Expanding its functionality


aaronsomek

Recommended Posts

chef

Currently we process the files to by the date added to the queue.

Do you guys want to have the ability to edit the actual queue? The order in which we process many items?

Edited by chef
Link to comment
Share on other sites

GiGo
1 minute ago, chef said:

Currently we process the files to by the date added to the queue.

Do you guys want to have the ability to edit the actual queue? The order in which we process many items?

I don't have the need to edit the queue, but having the ability to sort it by Name makes SO SO much more sense than by date added, will make it much easier to find files.

  • Thanks 1
Link to comment
Share on other sites

chef

@Luke sorry to bother you sir.

What is the equivalent of the "ConfigurationService" ->  "System/Configuration" endpoint in the API?

I need to get "PreferredMetadataLanguage",and "MetadataCountryCode":  for the identify lookup in auto organize.

There have been reports of the lookup returning English results when we're trying to get German ones.

 

I'm pretty sure I've narrowed down the problematic code to this line in the movie organizer:

                    var movieInfo = LibraryManager.IsVideoFile(path.AsSpan()) ? 
                    LibraryManager.ParseName(Path.GetFileName(path).AsSpan()) : 
                    new ItemLookupInfo()
                    {
                        MetadataCountryCode = "{Need some localization data here}",
                        MetadataLanguage = "{... and here}"
                    };

 

 Many thanks sir.

Link to comment
Share on other sites

chef
8 minutes ago, chef said:

@Luke sorry to bother you sir.

What is the equivalent of the "ConfigurationService" ->  "System/Configuration" endpoint in the API?

I need to get "PreferredMetadataLanguage",and "MetadataCountryCode":  for the identify lookup in auto organize.

There have been reports of the lookup returning English results when we're trying to get German ones.

 

I'm pretty sure I've narrowed down the problematic code to this line in the movie organizer:

                    var movieInfo = LibraryManager.IsVideoFile(path.AsSpan()) ? 
                    LibraryManager.ParseName(Path.GetFileName(path).AsSpan()) : 
                    new ItemLookupInfo()
                    {
                        MetadataCountryCode = "{Need some localization data here}",
                        MetadataLanguage = "{... and here}"
                    };

 

 Many thanks sir.

Ops! nevermind I found "IServerConfigurationManager". carry on 😆

Link to comment
Share on other sites

chef

Here is: 1.6.0.9

  • Sorting options can be accessed by selecting "Date", "Name" or "Status" at the top of the table column. clicking the column  header swaps the direction.
  • Sort by date (ascending/descending) 

sortbydate.png.3700cb80b8ea966fe54ba86c99cad645.png

  • Sort by name  (ascending/descending) 

sortbyname.png.3631fb70e6e735971889932ae437bd38.png

  • Group by Status 

sortbystatus.png.7e37156a2218240f0cbe2b4aae7ad7b0.png

 

  • Organization now starts off by attempting to determine the media type of the file by name, then accessing the appropriate organizer method.
  • Example:
  • This is a TV episode: AwesomeSeries.S01E01.1080p.WEB.mkv
  • This also is a TV episode: AwesomeSeries.2022.S01E01.1080p.WEB.mkv
  • This is a Movie: AwesomeMovie.2022.1080p.mkv
  • Extra logging just in case.
  • UI changes
  • One "Settings" tab
  • autoorganizetabs.png.547a17141a84d6aeaaac9b87cc41c6c6.png
  • Settings page
  • autoorganizesettings.png.7178d374863e5442fab80f9a674194c3.png

 

  • Item lookup now request localized results. We should see better lookup results in the proper language. However, if this isn't the case there are other lookup methods that need attention.
  • It is possible that by consolidating the configuration, you will most likely have to re-enter your settings data. Double check that before attempting to sort new items.

 

DOWNLOAD: 

 

I don't think I missed anything.

Next I'll try and get multiple watched folders working properly, and see about removing the enable options for the organizer. They are pointless to have.

 

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

vaise
8 hours ago, chef said:

For movies we can force a folder. NP.

New series that are found the in the monitored folder also can be forced into a specific folder.

But, any file that is found in the monitored folder, that belongs to an existing series, should automatically be sorted into that series folder.

That isn't happening? 

 

It’s happening but in my two examples I posted, it’s picking the the wrong folder, likely the first one it finds or something, which in my 2 examples are the incorrect ones.

  • Thanks 1
Link to comment
Share on other sites

chef
19 minutes ago, vaise said:

It’s happening but in my two examples I posted, it’s picking the the wrong folder, likely the first one it finds or something, which in my 2 examples are the incorrect ones.

I'll take a look 😉

Link to comment
Share on other sites

chef

What if we had an option like this?

720p => R:/Folder_Of_Your_Choice/etc....

1080p => R:/Folder_Of_Your_Choice/etc...

2160p=> you get the idea....

 

Would that help sorting?

 

Link to comment
Share on other sites

AdrianW
10 hours ago, norbo80 said:

it is possible to just add e.x. (1) instead to overwrite  the file? Sometimes I download some versions of movie.

Adding PROPER or REPACK would work for me.  

So, only overwriting IF one of the special words exists in the file name.

Edited by AdrianW
Link to comment
Share on other sites

chef
5 minutes ago, AdrianW said:

Adding PROPER or REPACK would work for me.  

So, only overwriting IF one of the special words exists in the file name.

Yup! That is a good idea.

I don't *think* that needs to be an option in the UI, but should be a condition used on the back end when calculating "overwrite existing items".

Or should it be an option?

Link to comment
Share on other sites

AdrianW

In Metabrowser there was a field where you enter a semi-colon separated list of words that would allow overwriting. If the field was empty then nothing would be overwritten. Then it's up to the user what words to use. 

  • Agree 1
Link to comment
Share on other sites

chef
11 minutes ago, AdrianW said:

In Metabrowser there was a field where you enter a semi-colon separated list of words that would allow overwriting. If the field was empty then nothing would be overwritten. Then it's up to the user what words to use. 

Cool. We'll show an input when that option is turned on. 

So, if the item doesn't contain any of the key words, and the option is on, then we'll do nothing, and mark the item as "existing item", and wait for user input?

Link to comment
Share on other sites

AdrianW

I don't think you even need an option toggle. An empty field would mean it's off.

 

  • Agree 1
Link to comment
Share on other sites

vaise
1 hour ago, chef said:

What if we had an option like this?

720p => R:/Folder_Of_Your_Choice/etc....

1080p => R:/Folder_Of_Your_Choice/etc...

2160p=> you get the idea....

 

Would that help sorting?

 

And a catch all if none of those are present.

  • Like 1
Link to comment
Share on other sites

chef

overwirtesettings.png.d19cb277cac67ae09a25b0a2edea941f.png

Does the input description make sense?

"Overwrite existing files with the following key words"....

"Overwrite existing files with files with the following key words"... 🤮

"Overwrite library items with files containing the following key words"  ?? <= this one?

 

I can code the thing, I'm just awful at explaining what it does. 😬

 

Link to comment
Share on other sites

AdrianW

How about "Overwrite library items when files contain the following key words: "

Link to comment
Share on other sites

vaise
13 minutes ago, chef said:

overwirtesettings.png.d19cb277cac67ae09a25b0a2edea941f.png

Does the input description make sense?

"Overwrite existing files with the following key words"....

"Overwrite existing files with files with the following key words"... 🤮

"Overwrite library items with files containing the following key words"  ?? <= this one?

 

I can code the thing, I'm just awful at explaining what it does. 😬

 

I best not comment on this - I have no idea what this is for. 

I have simple requirements, but the tools direction is to be an all singing all dancing thing - great for the people that ONLY use this for media movement/management, but sonarr/radarr does > 95% of my media naming/moving/management, this tool is only for the limited download of obscure UK TV Shows I have to get from other sources.  My only requirements over the base autoorganize in emby are :

1)- name the file correctly if > 9 seasons

2)- move the file into the correct target folder, not pick one that is finds that it has seen before   

My operation of it is thus - 

1) download the file

2) copy it to the embyautoorganise folder (on my server)

3) run the autoorganise process

In the last run of this, as I reported - two issues - Googlebox went to the RecordedTVSSD folder/library instead of the TVShows linrary (as it has been in both), and Dynasties wento to 4KTVShows instead of TVShows (as it exists in both).  I think you are onto that issue with the version process you plan for.

  • Thanks 1
Link to comment
Share on other sites

AdrianW

Does that screenshot indicate that:

Toggle is ON: overwrite regardless of naming.
Toggle is OFF: overwrite only when names contain any of the specified words.

If so, then that is perfect.

Link to comment
Share on other sites

chef

Like magic!

//Do we have any key words?
if (options.OverwriteExistingItemsKeyWords.Any())
{
    //Do those key words appear in our file name?
    if (options.OverwriteExistingItemsKeyWords.Any(word => result.OriginalFileName.ToUpperInvariant().Contains(word.ToUpperInvariant())))
    {
        //Yup! overwrite the library item.
        PerformFileSorting(options, result, cancellationToken);
    }
}

//Nope! No key words, or key words don't appear in the file name, not going to sort it. User should eventually delte this file in the UI.

overwirtesettings.png.9ac397762c37e133ff3b7926945c505b.png

Link to comment
Share on other sites

chef
2 minutes ago, AdrianW said:

Does that screenshot indicate that:

Toggle is ON: overwrite regardless of naming.
Toggle is OFF: overwrite only when names contain any of the specified words.

If so, then that is perfect.

Hmm... well... yeah it could do that...

 

So if the user doesn't want the option at all. The toggle would be off, and the input would be empty.

Yes that is better...

Brb.

Link to comment
Share on other sites

AdrianW
2 minutes ago, chef said:

So if the user doesn't want the option at all. The toggle would be off, and the input would be empty.

Yes, exactly.

 

  • Like 1
Link to comment
Share on other sites

chef

okay. just so there is no confusion with the two options.

When the toggle is ON, and we are set to move any files in the watched folder, and overwrite library items

I have hidden the input.

overwirtesettings_ON.png.2d2a6882d200a986bc7ed01874bebeda.png

 

But, if the toggle is OFF, the input appears because we are not going to move any items, only items that match the keywords.

overwirtesettings_OFF.png.c83c83a8d6872e227335795224d4b1db.png

 

If the toggle is off, and the input is empty, we do nothing.

 

Good?

 

Does that make sense  @vaise

By the way, do you still see strange naming:  S010E02? 

I'm working on finding  the proper folders as we speak. 👍

 

Edited by chef
Link to comment
Share on other sites

AdrianW
4 minutes ago, chef said:

If the toggle is off, and the input is empty, we do nothing.

 

Good?

Yes, I like it. Makes it clear.

  • Like 1
Link to comment
Share on other sites

chef

Cool,

version 1.6.1.0 does that. Currently only for TV episodes.

I'll have to write the code for movies next. But I have to jump over to IntroSkip for a bit. LOL!

 

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

GiGo

Just trying v1.6.1.0

When clicking on Smart Matches, it appears to bring up the old settings, I have refreshed cache but still the same;
image.png.2d7e6babcf4df7bcac71a6c447cf8dee.png

Also, doesn't appear to have Default Series Library folders;
image.thumb.png.4f1c5aafdc77acf07e6f02dcb7672ed0.png

 

image.png

Edited by GiGo
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...