Libraries and Folders

Hi,
I am using the latest version of Jellyfin server on W10. I remotely access it from W10, Mac and Roku.

My experience (and apologies for making a list).
i) Libraries contain a mix of material from other folders, and many duplicates
ii) When selecting folders the material is visible whereas in some libraries it will not show the material.
iii) When making a selection of a favourite when returning you are sent to the top of the list again and selecting the side letter does not work.

On the Roku (which is I understand more of a work in progress),
As above
i) folders do not work
ii) reordering does not work

In all cases the refresh rate is slow.
I use single folders for libraries (I have moved from Plex where the file naming convention and folder size was not an issue.) This seems to make the bleed between libraries all the more strange.

On the positive side I like the interface and that it is not cluttered with premium services.

Many thanks for any advice.

Hi,
I installed this:jellyfin_10.6.0_windows-x64.exe)64.exe |application/x-dosexec |129961131 |Mon, 20 Jul 2020 03:07:48 -0400
The sever is on a machine running w10 pro Version 10.0.18362 Build 18362

I could not find this problem in the list, at least when first reviewing it.
Best,
Nick

Could you give us an example of one of the folders?

When you say single folders, I’m guessing it’s like this (an example):

C:\Movies\
 - Movie 1.mkv
 - Movie 2.mkv
 - etc

Instead of this:

C:\Movies\
- Movie 1\
  - Movie 1.mkv

- Movie 2\
  - Movie 2.mkv

Hi,

The naming conventions I use currently are![tv|403x343] those recommended by plex i.e.

Films: name (year).mp4

TV: name s01e01.mp4

(upload://lwKawwNnY8O6eoRXu3tHWG2oW0G.jpeg)naming

Music I don’t touch and it is as ripped, so it will have the metadata already with it.

Looking back at the names I have used, I clearly got better over time from not putting the date to putting the date with some left-over numbers from the rip, to clean descriptions.

I have not, except in rare circumstances had problems with metadata, and never with library allocation/duplication.

I’d be ‘happy’ to tidy up the names if it is helpful for Jellyfin. Your second example would be a huge headache unless it could be done by software. I have several thousand films and many TV series.

Might it be that the file name is here taken as an instruction? But, I won’t second guess you.

Many thanks!

Nick

Looks like some of the pictures got a little mixed up. Could you try again?

Even if you have to upload them somewhere else and link them here, that’s fine.

Hi,
Thanks for this.
Can I take it that my naming convention even if a bit sloppy, is not the cause of this problem?!
I have tried deleting the libraries and then re assigning them to the folders.
Attached is an example of the sort of thing I am getting (inclding duplication). You can see here links to media in three different folders (there are in fact more but these should give an example). These are not just images but active links to the media.
Mixup|690x362
As I mentioned I think, each library has only one folder.
I don’t follow your instruction. Do you mean to create a new library for each,e.g. a .1 library and repeat?
Best,
Nick

Do you have a specific reason for the numbers after the years in the filenames? For example, you have Princess Mononoke (1997)1-19 - is this a movie, or a TV show?

Movies and TV shows need to be maintained in different libraries (and hence different directories), as different metadata scrapers are used.

Hi,
The only reason is that when the dvd was ripped the file had these numbers (all my films are ripped rather than downloaded) and rather than delete them I just inserted the date - it just avoided key strokes.
TV Shows are in a different folder and always follow the name s01e01 format.
As I mentioned above all my folders are a direct map to my libraries.
Some of the films appear from different folders (libraries such as before and after 39 and foreign langage are mixed up) in a library that does not point the folder in question.
Best,
Nick

So they’re chapter counters. I’d suggest you delete those superfluous numbers, as it’s possible that the scraper is mistaking them for episode numbers and attempting to attribute metadata from (for the most part) non-existent TV shows.

Can you confirm that they actually are the films from the different folders?

In Jellyfin, click on the menu for an offending film and choose “Media Info” - does the path show the wrong folder from which you suspect it was imported, or does it show the filename of an entirely different film which was misidentified?

One more thing to consider… Are you using the “Automatically group content from the following folders into views such as Movies, Music and TV” feature? That would group all selected libraries into one display library, irrespective of their source.

Hi,
Many thanks.

I will tidy up the numbers, which is a good idea.

I do not have group into collections checked.

Having looked at the libraries, I owe you an apology for miss-describing the problem. I found that Drama Post 39 was directed at the drive as a whole, a drive on which the other two are held.
This, I must assume is my fault. Even with this the duplication is hard to understand, but I will double check the folders to see if my backup program is responsible for this.

One interesting (?) effect however is that when the other libraries pointed at their correct folders nothing was displayed.

Thanks again,
Nick

That would explain a lot - because Jellyfin recurses through directories, that library which pointed to the root directory will contain all files, even if they are also included in other libraries.

For example…

D:\
     \Movies
          \Comedy
               Movie1.mkv
               Movie2.mkv
          \Horror
               Movie3.mkv
          \Western
               Movie4.mkv
               Movie5.mkv
     \Documentaries
          \Nature
               Doc1.mkv
               Doc2.mkv
          \Science
               Doc3.mkv

A library pointing to “D:” will contain all of the video files.
A library pointing to “D:\Movies” will contain all of the movies.
A library pointing to “D:\Movies\Comedy” will contain only the movies from that directory.
A library pointing to “D:\Documentaries” will contain all of the documentaries.
… and so on.

Did you perform a library scan after changing the settings? Did you confirm that those directories were visible from File Explorer, and that the files within were of a recognised video file format?

Thanks, this all makes sense, thanks.
Yes, I have rescanned the libraries and the directories are all visible.
I have not been able to resolve problems with TV series.
I’ve attached the images, but in brief, the episodes are pretty tightly described, they appear in the folders, but nothing appears for any of them in the library views.
I can only upload one image, but I hope this illustrates the top level.
Thanks again.

Are the libraries for TV series set up as “TV Shows?”

Can you give an example of the name (including path) of one episode of a show which isn’t being recognised? An example of the proper naming of an episode is…
/MythBusters/Season 01/MythBusters S01E01 - Jet Assisted Chevy.mkv

That is, <show name>/<season number>/<show name with season & episode number> (the human-readable episode title at the end isn’t mandatory).

Hi,
I have used the naming convention as in the attached image. filestv

This then equates to Show Name s01e01

This is the format I used with Plex. As you will notice with ‘A Kind of Loving’ there are some stray numbers at the end - but this is very rare, and didn’t hitherto cause any problems.

These names I take from the rips of the DVD’s and add the series and episode info.

The shows are visible in the Folders library, but are not collated into Series.

Best,
Nick

I’ve just performed a test and see that Jellyfin doesn’t want to import TV shows which are simply sitting in a flat directory.

You should move your TV shows into their own directories, preferably separating them into seasons;

Shows\
     A Kind of Loving\
          Season 01\
               A Kind of Loving S01E01.m4v
               ...
          Season 02\
               A Kind of Loving S02E01.m4v
               ...
          ...
     A Perfect Spy\
          Season 01\
               A Perfect Spy S01E01.m4v
               ...
          Season 02\
               A Perfect Spy S02E01.m4v
               ...
          ...

Hi,
Thanks for looking into this. It is grim news though. Plex users will be very likely to have shows in the format I use.
I wonder if anyone has a little app that would convert the one into the other…:slight_smile:
All the best,
Nick

I don’t see it as being a problem - the fact that Plex recognises files in a flat directory doesn’t mean that it mandates (or even prefers) it that way. As far back as MythTV (the “great grandfather” of media servers), preferred storage and naming of TV shows has been consistent.

Notwithstanding the contention in this issue, there’s also the problem file systems (particularly NTFS and even worse FAT32) have with storing more than a set number of files in the same directory. This can get dangerous in terms of data integrity - once upon a time (Windows XP and earlier), the operating system would refuse to create a new file if the directory was full - but since Vista, Microsoft decided that an extra sanity check was unnecessary, and Windows will now happily allow you to overwrite allocation tables and file pointers of valid files when adding new ones.

I’ll see if I can clobber together a batch file for you to automatically place your shows into their own directories; give me a few hours (on my way out to dinner now).

Hi,
I bow to your evident authority on this. I could create arbitrary folders If the flat folder limit was reached, but, still I’d be surprised if I am the only one who has organised files this way (but, I guess it is possible…:).
If there is something that would automate the process I would be eternally in your debt.
Best,
Nick

OK, I’ll offer this to you with ZERO guarantees. It includes some very rudimentary error checking and I’ve tested it on a collection of sample files (named similarly to yours), but beyond that the risk is yours. It won’t delete any of your files, but it may end up putting them into entirely wrong directories.

If at any stage it stops and asks you to confirm that you want to overwrite a file, press CTRL-C to stop processing - as it should never encounter duplicate files.

What this batch script will do is create directories for each show, create subdirectories for each season, and move each episode into its correct directory. As an added bonus, it will strip the “-1,” “-2,” etc. chapter counts from the ends of your filenames (if any exist).

Do not use this on files which contain episode names, as it’ll strip them off.

Do not use this on files which contain a dollar sign ($), as that’s what this script uses as a temporary marker to distinguish the show name from the season/episode number.

Do not use this on shows which have more than nine seasons - it’ll create an error and stop processing, as it looks for “ S0” as a marker to separate show names from season/episode numbers.

Open a text editor and paste the following into it, then save the result as “processfiles.bat” in the directory where your episode files are currently located. Then double-click on the batch file to execute it; you’ll get a black text box showing the processing as it happens (and it’ll be very fast, so don’t blink!).

If you have any files which are of a different type (for example, MP4, MKV, AVI), you can change the third line in the script (change the part after “set _filetype=” and make sure not to insert any spaces before or after the file extension) to reflect that file extension, then run it again.

@echo off
setlocal enableextensions enabledelayedexpansion
set _filetype=m4v
set _delim= S0
if not exist *.!_filetype! (
	echo Nothing to do - no !_filetype! files exist in the current directory.
	goto :quit
)
for /f "tokens=*" %%f in ('dir /b *.!_filetype!') do (
	set _filename=%%f
	set _mungedfile=!_filename:^ S0=$!
	if "!_filename!"=="!_mungedfile!" (
		echo Error - Can't find season identifier
		goto :quit
	)
	for /f "tokens=1,2 delims=$" %%g in ("!_mungedfile!") do (
		set _showname=%%g
		set _season=%%h
	)
	set _episode=!_season:~0,4!
	set _season=!_season:~0,1!
	set _newfilename=!_showname! S0!_episode!.!_filetype!
	if "!_filename!"=="" (
		echo Error - No file name.
		goto :quit
	)
	if "!_showname!"=="" (
		echo Error - No show name.
		goto :quit
	)
	if "!_season!"=="" (
		echo Error - No season number.
		goto :quit
	)
	if "!_episode!"=="" (
		echo Error - No episode number.
		goto :quit
	)
	if "!_newfilename!"=="" (
		echo Error - No new file name.
		goto :quit
	)
	if not exist "!_showname!"\* (
		echo Creating show directory [!_showname!]
		mkdir "!_showname!"
		echo ... Creating season directory [Season 0!_season!]
		mkdir "!_showname!\Season 0!_season!"
	) else (
		if not exist "!_showname!\Season 0!_season!"\* (
			echo ... Creating season directory [Season 0!_season!]
			mkdir "!_showname!\Season 0!_season!"
		)
	)
	echo ...... Moving [!_filename!] to [!_showname!\Season 0!_season!\!_newfilename!]
	move /-y "!_filename!" "!_showname!\Season 0!_season!\!_newfilename!"
)
endlocal
:quit
pause

Good luck!

This is really kind and generous. I’ll try it out on some backups and then in earnest.
thanks again!
N