Jump to content

Auto Organize - Expanding its functionality


Recommended Posts

Posted (edited)

1. Added some extra data to the Table:  Resolution, Size, Type

2. Added Task last run to the to of the page.

neworganize10.thumb.png.db79f4a4356c61c11a71ee56ceca87bb.png

 

Download: 

Edited by chef
  • Like 1
Posted (edited)

The auto organize Activity List can now be sorted:

neworganize11.thumb.png.a3f87a7474b9138306c9503cc99569c1.png

Download: 

I'm updating the pull request :)

Edited by chef
Posted (edited)

The latest Version of the Plugin has the Production Year added to the 'Select' drop down to help better identify series with different years, but the same name.

This fulfills this feature request: 

 

neworganize12.thumb.png.0d5c7b358aa8e3e6de3ac5390fd51c14.png

DOWNLOAD: Emby.AutoOrganize.zip

 

@Luke still working away at it. It has some great extended functionality.  :) and feature requests are being fulfilled.

Edited by chef
  • Like 2
Posted

I really like the "new" Auto Organize, thanks.
But I wanted to ask if it is possible to add a kind of blacklist for filenames, such as SAMPLE

  • Like 1
Posted

You can already set a minimum file size and filter those out.

At least that's what I do...

  • Like 1
Posted

Yes, that's how I do it, I thought it might be a good idea. Doesn't always have to be sample, someone might want XXX filters or something

  • Like 1
Posted
7 hours ago, slevin7 said:

I really like the "new" Auto Organize, thanks.
But I wanted to ask if it is possible to add a kind of blacklist for filenames, such as SAMPLE

yes! that sounds good. 

I can add a text box with a coma delimited list of strings in file names to ignore in the "watched folder".

I think a simple  "string.contains" ,on the file name, should handle this alright.

I'll add it now :)

  • Like 1
Posted (edited)

I wrote an intermediary plugin called "DecompressAndCopy" 

This plugin actually watches a DL folder and will look for '.rar' files as well as files with typical media extensions.

If it finds one, it will either copy the file, or unzip it into the auto organize watched folder for processing.

This way, the auto organize folder will only ever have the media file in it, and the Decompress plugin will leave everything else in the DL folder.

😳🤨🙃😉 might be a topic for another thread. PM me if you are interested.

 

Otherwise, back to programming I go. LOL

Edited by chef
  • Like 1
Posted

Okay,

 

I was able to get the new option working in the UI, and also saving the data to the DB.  All I have to do now is wire it up in the backend when we search the "Watched Folder".

neworganize13.thumb.png.b79b676283a04a156414c660bf40c49e.png

  • Like 1
Posted (edited)

@slevin7 Yeah, this'll have to be tested, but this version has the ability to ignore files with specific names.

DOWNLOAD: Emby.AutoOrganize.zip

 

 

 

Edited by chef
  • Like 1
Posted

I'm thinking  about maybe adding some handling subrip text files. 

It looks like we could handle .srt if they exist in the original media folder, as well as .sub files too.

Perhaps first and foremost having some kind of indicator in the activity log that signals the fact that the media item has a subtitle file in the folder. Dunno.

  • Like 2
Posted (edited)

I spent most of last night trying to figure out subtitle files. The good news is that the plugin already had Naming options available for subtitle files. Go figure, like I said before... Who ever wrote the thing initially, future proofed the heck out if it.

All I had to do was add Subtitles to possible Types the plugin could recognize.

Now I have to add a column to the activity log table with a CC icon to indicate there are subtitles in the 'Source' folder.

And then, I have to write a service which copies them. There will be caviots.

1. The subrip should only move based on the media file moving. 

2. The subrip file must take the name from the media file in the 'Destination' folder

 

Of course that is the easy part. 

 

Does anyone know if .idx files have to accompany the .sub file?

 

 

Edited by chef
  • Like 1
Posted
28 minutes ago, chef said:

Does anyone know if .idx files have to accompany the .sub file?

Afaik they have as they incorporate the time stamps. 

Thanks for the effort, I think lots of people will be thankful for that.

  • Thanks 1
Posted

Good news the new "Waiting" Status is working well.

neworganize14.thumb.png.e99c0988efc5dbcf513532f18eaee194.png

Posted (edited)

Hmm... I make the scheduled task to look for subtitles, however, they show up in their own row in the table. This is because we are recursively looking for files which fit a criteria. 

I have to think of a way to point the subtitle file to it's movie/episode owner. 

 

That might mean a secondary loop though the items to make the relationship between the two files... Which will cause longer task running time. 🤔

 

 

Edited by chef
Posted

Welp... I did it...

If the Source folder has a subtitle file inside, we can know about it.

But, most of the files I end up with all have subtitles inside the media file, and are only sometimes an external file.

So I think I'll hold off on implementing this code, but have it available incase a feature request shows up in the future, and more people want it.

neworganize15.thumb.png.d2b33d73c940391641f8caee04d99a58.png

aaronsomek
Posted
23 minutes ago, chef said:

Welp... I did it...

If the Source folder has a subtitle file inside, we can know about it.

But, most of the files I end up with all have subtitles inside the media file, and are only sometimes an external file.

So I think I'll hold off on implementing this code, but have it available incase a feature request shows up in the future, and more people want it.

neworganize15.thumb.png.d2b33d73c940391641f8caee04d99a58.png

Great work! I would definitely like this feature. I'm constantly shuffling and renaming .srt files.

  • Like 1
Posted
5 hours ago, aaronsomek said:

Great work! I would definitely like this feature. I'm constantly shuffling and renaming .srt files.

+1, I would also like it and if possible also for idk/sub (VOBSUB) & sup (PGSSUB).

  • Like 1
Posted (edited)
9 hours ago, neik said:

+1, I would also like it and if possible also for idk/sub (VOBSUB) & sup (PGSSUB).

Yes, I believe we see all these types, but because we are using emby's library manager to figure it out, I can only see the public methods in the library.

Emby is pretty robust so it means it mostly likely handles identifying those types of subtitles, but only testing would tell for sure.

 

Instead of adding a column to the activity log, we should probably have a checkbox in the config options for: "sort subtitle files with episode/movie".

We should probably try and add an option to the identify page as well "move subtitle with media item"... Or something like that.

 

I'll check it out. 👍

 

 

 

Edited by chef
Posted (edited)

 

So the short answer is: Yes,  we handle all subtitle file types.

But, It wasn't as easy as pointing the organizer at the subtitle files.

I had to check to see if the parent folder had subtitle files, and put the paths for each file into the result object for sorting.

 

Nerd: Ignore the subtitle files during the initial recursive folder scan, but add them to the result object. 

We don't want to create "Unknown" result objects for these files (which happen if the sorting algo thinks they're Episodes or Movies,  and can't understand the extension).

Use libraryManager.IsSubtitleFile to check the file 

1. does the folder contain a subtitle file of any kind.

2. flag the result object:  "HasSubtitleFile" as true or false

3. when true, add all subtitle paths to a list,  and process along with the media item later.

 

 

 

This image show the IDX files being scanned, the SUB files get scanned and added later in the log.

neworganize16.thumb.png.6227e48cbd770b5dd123670da013dd4e.png

 

Now I just have to move them successfully, while naming them properly.

 

I also know that at some point someone is going to ask if we can move only specific languages. But, I dunno yet...

Edited by chef
Posted (edited)

Sorry for all the posts here...

When people are putting files into the source folder of the plugin, are they just dumping a bunch of files into the folder, or are they placing each file into a parent folder named after the file (like I do)??

Or is it (gawd forbid) both?? 😳

 

Edited by chef
Posted

Right now, I just move the actual file into the folder and add the subs after it has been organized to the final folder in the library.

In future, if subs are supported I would also add the subs directly into the "organize folder" and would let the plugin do the renaming of the subs as well. 🙂 

Posted

chef, I am having an, let's call it "infinity circle of death" 😛 when I try to open the auto organize UI.
In the console I am seeing this:

image.thumb.png.78df0bf4b65b6c5f81dc9231d1fbce03.png

  • Like 1
Posted
8 hours ago, neik said:

chef, I am having an, let's call it "infinity circle of death" 😛 when I try to open the auto organize UI.
In the console I am seeing this:

image.thumb.png.78df0bf4b65b6c5f81dc9231d1fbce03.png

Yup! I see it. Thank you. I'll fix it right now.

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