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

[Feature request] Multiple Folders per Library #217

Closed
Froghut opened this issue May 18, 2020 · 1 comment
Closed

[Feature request] Multiple Folders per Library #217

Froghut opened this issue May 18, 2020 · 1 comment

Comments

@Froghut
Copy link

Froghut commented May 18, 2020

Add the possibility to add multiple folders to one Library.
For example I want some TV series encoded in x265 and some in x264, right now I would need to have a separate library for each tv show since they are all located in the same root folder. I can of course duplicate libraries and change the path, but that would still lead to a massive amount of libraries.
If we could add multiple folders I would instead end up with 2 libraries, one for h264 and one for h265.

@Froghut Froghut changed the title [Feature request] [Feature request] Multiple Folder per Library May 30, 2020
@Froghut Froghut changed the title [Feature request] Multiple Folder per Library [Feature request] Multiple Folders per Library May 30, 2020
@HaveAGitGat
Copy link
Owner

Not possible to include this atm as too much stuff would need to be updated but if you really needed this you could do it in a plugin, processing items from each folder as necessary. So you'd just have one library, scan all your files and then put the transcode logic in the plugin.

const h264Folders = [
  '/media/1/',
  '/media/2/',
  '/media/3/',
]

const fileIsInH264Folder = (path) => {
  for (let i = 0; i < h264Folders.length; i += 1) {
    if (path.includes(h264Folders[i])) {
      return true
    }

  }
  return false;
}

if (fileIsInH264Folder(file._id)) {
  // transcode to h265

} else {
  // transcode to h264

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants