Jump to content

Auto Organize Smart Match, picking up wrong shows


GiGo

Recommended Posts

GiGo

Hopeing for some guidence, I've been getting a few new shows recently and ran into a problem;

For instance, I have "Stargate Origins" in my collection and I am trying to add "Origins" however it keeps trying to sort these files to Stargate Origins. I have tried renaming the TV series in my watch folder from "Orgins" to "Origins (2018)" but it still try's the match it to Stargate Origins, I have deleted the smart match for the show also and still no luck.

The same is smiliar to the show "You" it is matching it to "Younger".

extract from the log. I'm running the latest emby server beta for synology

2021-07-09 06:05:21.436 Info App: Sorting file /volume1/Download/_emby/Origin.Season.1.S01.720p.WEB-DL.x265-HETeam/Origin (2018).S01E02 .RE2D.WEB-DL.x265-HETeam.mkv to new path /volume1/TV/Stargate Origins (2018)/Season1/Stargate Origins.S01E02 - Episode 2.mkv

Thanks for any help.

Link to comment
Share on other sites

Is this Origins (2015) ?

If so have you tried using "Origins (2015)" in the name?

Link to comment
Share on other sites

chef

I've been working with this plugin today.

 

I was able to add multi-version naming to it.

I've seen the regex for naming and sorting and I can see why you are having this issue.

It is a tough fix, and is an issue I have experienced myself recently.

 

I'm definitely not going to put this plugin code away. If there is something I can do to help fix the lookup and smart matching, I'll try.

I have a question:

Is Origin already part of your library, or is it a new series you are trying to add?

It is my opinion, that we should not try and be so smart about smart matches.

We should be a little tighter on the look up for series names.

If the match is not specific enough, we should wait for user interaction to best match the item.

Then, use the smart match from that point forward.

I also think that we should remove auto smart match for Movies all together. Still allow organization of Movies, but remove the automatic lookup for them.

Edited by chef
Link to comment
Share on other sites

GiGo
8 hours ago, chef said:

I've been working with this plugin today.

 

I was able to add multi-version naming to it.

I've seen the regex for naming and sorting and I can see why you are having this issue.

It is a tough fix, and is an issue I have experienced myself recently.

 

I'm definitely not going to put this plugin code away. If there is something I can do to help fix the lookup and smart matching, I'll try.

I have a question:

Is Origin already part of your library, or is it a new series you are trying to add?

It is my opinion, that we should not try and be so smart about smart matches.

We should be a little tighter on the look up for series names.

If the match is not specific enough, we should wait for user interaction to best match the item.

Then, use the smart match from that point forward.

I also think that we should remove auto smart match for Movies all together. Still allow organization of Movies, but remove the automatic lookup for them.

"Origin (2018)" is not part of my library at the moment, nor is "YOU".  Glad you are looking into the issue. I'll have to do it the 'old fashioned' way and manual rename them

 

8 hours ago, cayars said:

Is this Origins (2015) ?

If so have you tried using "Origins (2015)" in the name?

Sorry my mistyping, it's "Origin" not Origins.

Link to comment
Share on other sites

This one right? Origin (2018)
image.thumb.png.77669063f473af4fcec66d9019bc6812.png

Yes, it's possible this could easily get taken for the wrong series if the file names don't have the year in them.  You can always take a series like this into your own hands and do it "the old fashion way" so to speak. :)

Edited by cayars
Link to comment
Share on other sites

GiGo
1 hour ago, cayars said:

This one right? Origin (2018)
image.thumb.png.77669063f473af4fcec66d9019bc6812.png

Yes, it's possible this could easily get taken for the wrong series if the file names don't have the year in them.  You can always take a series like this into your own hands and do it "the old fashion way" so to speak. :)

Yes, thats the one, I have changed it from "Origin" to "Orgin (2018)" and it still gets confused with Stargate Origin and after I deleted the Smart Match. But looks likes it going to the old fashioned way lol

 

Link to comment
Share on other sites

chef

After reading the code last night, I think we need to create a "threshold of confusion" for the plugin 😆

Bare with me while I explain.

When items are sitting in the watched folder and are about to be placed in the library folders, we should have a threshold number that, should the Lookup results exceed, nothing is moved and organized until a user can match them.

 

I also think that a condition should be implemented, that looks for the name and year specifically. If both are not matched, nothing happens.  

 

@cayars is this a crazy idea? 

  • Like 1
Link to comment
Share on other sites

GiGo
14 minutes ago, chef said:

After reading the code last night, I think we need to create a "threshold of confusion" for the plugin 😆

Bare with me while I explain.

When items are sitting in the watched folder and are about to be placed in the library folders, we should have a threshold number that, should the Lookup results exceed, nothing is moved and organized until a user can match them.

 

I also think that a condition should be implemented, that looks for the name and year specifically. If both are not matched, nothing happens.  

 

@cayars is this a crazy idea? 

It could be a good idea to have an extra button alongside Delete and Move, on a matched item that already exsits that gives you the ablility to 'change match' as once it's been matched with a show you can't unmatch it? Would this not be an easier solution?

  • Like 1
Link to comment
Share on other sites

chef
1 hour ago, GiGo said:

It could be a good idea to have an extra button alongside Delete and Move, on a matched item that already exsits that gives you the ablility to 'change match' as once it's been matched with a show you can't unmatch it? Would this not be an easier solution?

Okay, so an unmatch button. This would remove the smart match entry?

The only thing I'm wondering about is the fact that the scheduled task might kick off before we have a chance to hit that button.

 

Edited by chef
Link to comment
Share on other sites

1 hour ago, chef said:

I also think that a condition should be implemented, that looks for the name and year specifically. If both are not matched, nothing happens.  

@cayars is this a crazy idea? 

Funny, I was thinking about this as well.

I think most people would prefer the plugin to not make false matches.  If that means doing nothing when it's not sure then so be it.  This could be as simple as moving the contents to a different unprocessed folder where the admin will have to take care of those files to having the ability to match using the UI.

Link to comment
Share on other sites

GiGo
1 hour ago, chef said:

Okay, so an unmatch button. This would remove the smart match entry?

The only thing I'm wondering about is the fact that the scheduled task might kick off before we have a chance to hit that button.

 

Sorry I think you have mis-understood me; to use my issue as above;
Origin is being matched to Stargate Origins when I do a scan, as it lists S01E01 as being in my collection it goes 'Blue' and tells me that it's already there so will not overwrite the file (as i've set it that way), so it would be good on these files to either being able to manual re-identify each file (with a button?) which could give the usual Auto Organize screen.

40 minutes ago, cayars said:

Funny, I was thinking about this as well.

I think most people would prefer the plugin to not make false matches.  If that means doing nothing when it's not sure then so be it.  This could be as simple as moving the contents to a different unprocessed folder where the admin will have to take care of those files to having the ability to match using the UI.

This sounds like a good idea also

It would be good not to have to leave the UI to manually rename the files using a file explorer.

  • Like 1
Link to comment
Share on other sites

chef

Okay here is what I have on the UI side./ This might be long winded, and I'm going to use the word "Match" too much here and try not be confusing... I apologize.

 

There is now a button on each item that will remove the correlated  "match" from the saved Smart Matches.

neworganize2.thumb.png.6370273356d57e5ecdd23baf842930dd.png

This button  to remove the entry, only appears (on the item row) after the item has been processed... as a "success".

In other words. This button to remove the smart list match appears after the file has been processed, and moved. 

It is a quick way to remove the smart match for the specified item, so, in my opinion, the button is worth being there.

However, this doesn't fix our main concern regarding mis-matching items, but does help clean up the mis-matching quicker.

 

We need to intervene prior to the organizing scheduled task making the wrong  match.

 

I think I have some ideas, but please feel free to  jump in and get some more ideas happening.

 

 

Side-note:

I created another thread about this, but I'll though it here too.

I also, added the ability to handle Multi-Version Movies while I was under the hood.

neworganize.png.14d3ee0dfdb91ced93a3bc62de1614a4.png

 

Edited by chef
Link to comment
Share on other sites

chef
6 minutes ago, GiGo said:

Sorry I think you have mis-understood me; to use my issue as above;
Origin is being matched to Stargate Origins when I do a scan, as it lists S01E01 as being in my collection it goes 'Blue' and tells me that it's already there so will not overwrite the file (as i've set it that way), so it would be good on these files to either being able to manual re-identify each file (with a button?) which could give the usual Auto Organize screen.

This sounds like a good idea also

It would be good not to have to leave the UI to manually rename the files using a file explorer.

Oh! Right! I see what you mean now. Okay! 

Link to comment
Share on other sites

chef
1 minute ago, GiGo said:

Would this solve the issue of having a matched item but it not being moved?

No, but now I understand what is happening. We need the smart match (folder icon) button to be available when the status is (blue) or has mis matched the item and emby thinks it already exists.

I think I can fix that.

 

Did I understand properly?

  • Like 1
Link to comment
Share on other sites

GiGo
Just now, chef said:

No, but now I understand what is happening. We need the smart match (folder icon) button to be available when the status is (blue) or has mis matched the item and emby thinks it already exists.

I think I can fix that.

 

Did I understand properly?

Yes, thats perfect, that would be amazing to be able to add, I'm shocked no one has asked/requested this before. Hopefully this can be pushed out soon if it's not a too big a job.

Thanks for your input.

Link to comment
Share on other sites

chef

This is wired. From what I am seeing in the code, the folder icon should appear in skipped items.

 

There is a line of code that says:

for any state the item is in that is not 'Success', show the folder/edit button.

 

Perhaps I need to test a function that handles skipped items specifically.  

I need to dig a bit deeper.

Edited by chef
Link to comment
Share on other sites

GiGo
5 minutes ago, chef said:

This is wired. From what I am seeing in the code, the folder icon should appear in skipped items.

I think I need to dig a bit deeper.

The folder icon does appear, but it only gives you the option to overwrite the file that it has found and is in the collection already.

Auto Organize1.png

Auto Organize2.png

Edited by GiGo
Link to comment
Share on other sites

chef
2 minutes ago, GiGo said:

The folder icon does appear, but it only gives you the option to overwrite the file that it has found and is in the collection already.

Okay. That's it right there. 

Link to comment
Share on other sites

chef

I think I have figured this out. I'm just testing.

Just to make sure I have all options set the same.

 

Under the TV options, you have "Copy over existing item" un-checked, correct?

Link to comment
Share on other sites

chef

Okay here is where its at.

 

There is now three buttons available on the Item when it is marked as "Existing/Skipped".

neworganize3.thumb.png.f5c775c39621ea5d1bfd55c282fb77db.png

1. Opens the Identify Editor - Incase we need to edit and Identify the item (this will fix the current issue)

2.. Will open the "Organize" modal - The one we see already open when an item is skipped. This way if the "Destination" folder in the table looks correct, you can simply press this button and the file will be moved.

3. Delete the entry from the table.

 

I've gotta run a couple more tests here, incase there are bugs by changing this much code. But I think we got it. 

 

I'll be back. I'm going to try and move an entire series around and see what happens. :)

neworganize4.thumb.png.07ebd0bfdc9bdd1f004385d8c9f22526.png

 

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

chef

I found a rather large bug that needs to be addressed.

 

If the user doesn't have the "Copy over existing items" selected in the options menu, then the server will throw a 500 error when we try and copy the file with this new method.

 

I need to find out where those options are in the code and override them,  so we can start the process of moving the file. 

I think that if the user chooses the "Process" button from the table item, then we show the "Are you sure" dialog, and the user hits the "OK" button, we shouldn't  be concerned about overriding the copy value.

Also, if the user chooses the new "Identify" button, goes through the Identification form, and hits the "OK" button, we can show the "Are you sure" dialog.

At that point if the user selects "OK", then we can override the copy value as well.

----------

I also think the 500 error that appears in the popup needs a little more explanation. It just says either "Error Null" or "500 Server Error".

I had to sift through logs to find out what that meant.

I take a look, and see if I can change the error popups to better explain what happened.

 

 

This plugin needed some serious attention. I'll try to keep fixing it.

 

Link to comment
Share on other sites

chef

I think i figured it out. I have to change the status of the file from "Skipped/Existing" to Process.... I think

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