imaginary-upside / JellyfinJav

JAV metadata providers for Jellyfin
GNU Affero General Public License v3.0
81 stars 22 forks source link

File Naming #4

Open seniorm0ment opened 4 years ago

seniorm0ment commented 4 years ago

All the file names need to contain the JAV code seperated by a dash.

What is the proper way to organize & naem multipart videos? For example some videos are split up into 2 or 3 parts. Also can we get support for JAV codes held within brackets? [ ]

imaginary-upside commented 4 years ago

Right now multipart videos aren't supported. I like to merge mine into just single files, so it's not a feature I've had to care about yet. I'll look into adding that functionality. I've just got to think about the best way of handling that.

This is actually kind of a dumb thing about Jellyfin. It gives me a modified filename, so for example if you have a file named "test [ABP-500] sometest.mkv", Jellyfin gives me "test" as the filename. I know the general solution though. I just have to read the actual filepath. Give me a little bit to fix that.

seniorm0ment commented 4 years ago

@imaginary-upside How exactly do you reccomend merging multipart files? Ffmpeg?

imaginary-upside commented 4 years ago

Yeah. Here is the way that I know how to do it without reencoding.

merge.txt
file '/path/to/ABP-500A.mkv'
file '/path/to/ABP-500B.mkv'
file '/path/to/ABP-500C.mkv'

Then run this command:

ffmpeg -f concat -safe 0 -i merge.txt -c copy ABP-500.mkv

I also have this ruby script to semi-automate it for me.

#!/usr/bin/env ruby

nonce = Random.rand(100_000_000)
merge_list = "/tmp/merge_list_#{nonce}.txt"
File.open(merge_list, 'w') do |f|
  ARGV.sort.each do |arg|
    f.puts "file '/mnt/storage/torrents-deluge/jav-done/#{arg}'"
  end
end

`ffmpeg -f concat -safe 0 -i #{merge_list} -c copy '#{File.basename(ARGV[0]) + File.extname(ARGV[0])}'`

`rm #{merge_list}`
imaginary-upside commented 4 years ago

The filenaming issue is actually going to be pretty hard to cleanly fix. I believe I need to make a custom media type which just parses the filename directly without modification. But I'm having issues with adding that custom media type as a selectable option when creating a library. So for now you'll have to either rename or make symbolic links with normalized names.

What naming structure do you have for most of your multipart videos? I have a solution but want to make sure it works generally. Actually multipart videos already work by coincidence. Though right now only r18 works in the release, but javlibrary works on master.

I want to have this plugin be plug and play for the most part, where people can just dump their existing jav collection in without needing to do extra work. But the jellyfin / emby codebase does make that a little difficult in some cases.

seniorm0ment commented 4 years ago

What naming structure do you have for most of your multipart videos?

I haven't merged any videos yet, but currently I have them kinda inconsistent although I mainly use JAVID-A JAV ID-B JAVID-C or JAVID-1, JAVID-2, JAVID-3. Some of them I have the folders labeled JAVID (Part 01), etc. But the actual files labaled JAVID-1. I really gotta organize them. I just like haven't figured out how I want to do them cleanly yet. I want to merge them but it'd be a pain because some of them are seeding tbh.