Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import and Rename Extra files #1544

Merged
merged 4 commits into from
Mar 4, 2017
Merged

Import and Rename Extra files #1544

merged 4 commits into from
Mar 4, 2017

Conversation

markus101
Copy link
Member

Database Migration

NO

Description

Importing of extra files (new option in the UI) and renaming them when the episode file is renamed.

Issues Fixed or Closed by this PR

Closes #459

@markus101 markus101 changed the title Extra files stage2 Import and Rename Extra files Nov 12, 2016
@dwatley
Copy link

dwatley commented Jan 5, 2017

What's the status here? Seems like #459 is on the cusp of being completed and it's much needed.

@KalleDK
Copy link

KalleDK commented Jan 24, 2017

Looking forward for this feature 💛 Is about to move my whole library, but I really dont want to move the srt's manually

@valantislevas
Copy link

any news about ?

@markus101
Copy link
Member Author

Issues:

  • Do a manual import with a .mkv .en.srt .nl.srt file. Imports the .mkv and a single .srt without suffix. (Both files should be imported with the proper language)
  • got to the series folder, rename the .mkv file by adding something like a character in the episode title. hit refresh series. srt file gets deleted/recycled. (File shouldn't be deleted, ideally this would get linked to the file still and renamed? though this is a bit outside the scope of Sonarr, IMO)
  • Rename Preview doesn't show extra files (I don't think this is critical, but would be great to have).

@markus101
Copy link
Member Author

Rebased and fixed the importing not using the proper language as part of the extension.

@Taloth
Copy link
Member

Taloth commented Feb 24, 2017

Won't that change the extension column in the db?

@markus101
Copy link
Member Author

Looks like past me thought of that and we get it from the path again before returning the TExtraFile.

@Taloth
Copy link
Member

Taloth commented Feb 24, 2017

Not entirely: https://github.com/Sonarr/Sonarr/pull/1544/files#diff-1778dc79c400fb3c577b08af93f8c40fR61

Don't redefine 'extension', for all ExtraFiles the extension is the same thing, the file extension. Don't concat the language there.

What you need to do is add a function that Builds the new filename in it's entirety, including extension. Not a 'GetExtensionWithSuffix'.
That might also help deal with the code duplication between the MoveFilesAfterRename methods.

@markus101
Copy link
Member Author

I'm referring to: https://github.com/Sonarr/Sonarr/blob/develop/src/NzbDrone.Core/Extras/Files/ExtraFileManager.cs#L64 which is getting the extension from the file.

We can get the new file name separately and pass that in instead of building it there and DRY things up a bit though...

@markus101
Copy link
Member Author

DRYed out MoveFilesAfterRename, but mostly left MetadataService's as-is and can revisit cleaning it up another time as it will be more invasive.

@nzbjamz
Copy link

nzbjamz commented Mar 2, 2017

Awesome work @markus101! 👏

@zjpleau
Copy link

zjpleau commented Mar 8, 2017

How do you enable this feature?

@markus101
Copy link
Member Author

Media Management: Import Extra Files and set the extensions to import. It's an advanced setting. It's not released in a master release yet, just develop.

@dbancajas
Copy link

@markus101
Do you know when it's scheduled to be merged with the master? Also, how do I use develop branch on-the-fly?

@spacecabbie
Copy link

hey i am running 0.2.0.654 - Apr 18 2017
I do not see this option ?

@Taloth
Copy link
Member

Taloth commented Apr 22, 2017

@spacecabbie That's a Radarr version number, this is Sonarr.

@spacecabbie
Copy link

@Taloth Yes i already figured out the diferance :) i have posted in the related treath

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants