Jump to content

Auto Organize without renaming the file


Recommended Posts

Posted

Hi

 

I would really like that option to use the auto organizer without it renaming the files since some of the stuff i download comes with custom subtitles and renaming the media file would break that.

 

Would this be possible to implement?

  • 2 weeks later...
  • 1 month later...
Posted

Have you thought about embedding the subtitles into the container? Then renaming the container wouldn't matter.

bluemonkey07
Posted

That's not how downloaded files are compiled tho;)

Posted

True, but a script could be written that would batch the embedding of subtitles.

Posted

I think it's probably easier just to add a checkbox "Don't rename" to the Auto-Organize interface.

Posted

Well there is also the possibility of using theRenamer to rename files...this will also rename the sub's and such.

  • 4 months later...
Posted

I'd like that feature too. I love auto-organize, but I can't use it anymore because of loosing the team, resolution, source, etc.

Posted

The resolution is extracted by Emby, that shouldn't be a problem. But the original filename _does_ get lost, that's right.

 

We might be able to add a pattern/token for the original filename to the "Episode file patterns" in the autoorganize configuration.

 

@Luke: What do you think about that?

Posted

Good, I'll put this on my list...

  • Like 1
  • 2 months later...
Posted

Still hoping for some solution for this :)

  • Like 1
  • 4 months later...
Posted (edited)

+1 

 

Been playing around with the code just to learn and this was an easy fix.

 

In Emby.Server.Implementations.FileOrganization you will find the function responsible for naming GetEpisodeFileName and by adding a new pattern I can now use the original file name in my naming pattern like this :  %fn.%ext. 

 

%fn becomes a match for the filename without extension by adding one more Replace to the result.

Of course the settings page would need to be updated to reflect this as well.

 

            var result = pattern.Replace("%sn", seriesName)
                .Replace("%s.n", seriesName.Replace(" ", "."))
                .Replace("%s_n", seriesName.Replace(" ", "_"))
                .Replace("%s", seasonNumber.ToString(_usCulture))
                .Replace("%0s", seasonNumber.ToString("00", _usCulture))
                .Replace("%00s", seasonNumber.ToString("000", _usCulture))
                .Replace("%ext", sourceExtension)
                .Replace("%en", "%#1")
                .Replace("%e.n", "%#2")
                .Replace("%e_n", "%#3")
                .Replace("%fn",Path.GetFileNameWithoutExtension(sourcePath));
Edited by HomerS
Posted

@@Luke (or any other dev)  Could we please get this into the dev branch ?  

 

 Im not into js so not sure how to get it onto the settings page but the it is this file :)

MediaBrowser.WebDashboard\dashboard-ui\dashboard\autoorganizetv.js

Posted

It's possible for a future update, yes.

  • Like 1

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