Jump to content

Emby doesn't respect folder location like 4.5.4.0


gokuz

Recommended Posts

rodainas
1 hour ago, rodainas said:

Not talking about replace

If it works appending thats no problem.

Then delete the original season episode lines of your nfo, the line numbers are constant (all your nfos were created by the same program, same format), so after renaming all your episodes that needs the renaming, run the script and then you run the command line to delete the original line numbers.

 

They start like this:

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--created on 2021-04-30 15:54:16 - tinyMediaManager 3.1.14-->
<episodedetails>
  <title>El asesinato en el Hospital General</title>
  <originaltitle/>
  <showtitle>Detective Conan</showtitle>
  <season>1</season>
  <episode>83</episode>
  <displayseason>-1</displayseason>
  <displayepisode>-1</displayepisode>
  <id/>

 

 

If you read a little the article I sent you:

Remove lines from 7 to 9:


sed '7,9d' ./file

So to delete the lines on the nfos, it will be something like this

sed -i  "3,8d" ./*.nfo

Your new nfo will be like this

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--created on 2021-04-28 11:19:19 - tinyMediaManager 3.1.14-->
  <displayseason>-1</displayseason>
  <displayepisode>-1</displayepisode>
  <id>1487202</id>

 

Link to comment
Share on other sites

gokuz
3 minutes ago, rodainas said:

Of course it is

you are not reading the instructions I posted

with the cli command you remove the first episode and season details

Sorry I missed the cli part. Can't find it anywhere now. May I know where is it.

Link to comment
Share on other sites

gokuz
5 minutes ago, Deathsquirrel said:

I'll take this one but you're not gonna like it.

This bug doesn't impact anyone but you because no one else has done something this ridiculously incompetent, failed to realize it even after reviewing the available documentation, and then made an ass of themselves across a 18+ pages insisting that their screw-up is the way things should be done.

The paid staff that make Emby have answered your question.  You're trolling at this point.

You could say that about my other thread too. Take a look at it. It will change your mind.

Link to comment
Share on other sites

Deathsquirrel
5 minutes ago, gokuz said:

You could say that about my other thread too. Take a look at it. It will change your mind.

I was involved in that thread.  Luke identified a bug in processing a nonstandard directory structure and fixed it.  Of course the advice you got, from everyone including me, would also have fixed it since it would have meant correctly naming and grouping your files and then making desired edits in metadata instead.  Oddly enough, the exact same thing you've been told here.

It's not relevant to this thread.  In this case you are combining an unsupported naming system with effectively corrupt metadata and being shocked when the results are unpredictable.  This isn't tied to a bug.  This is all you.  Fix it or don't.  Your call.

Link to comment
Share on other sites

gokuz
4 minutes ago, Deathsquirrel said:

I was involved in that thread.  Luke identified a bug in processing a nonstandard directory structure and fixed it.  Of course the advice you got, from everyone including me, would also have fixed it since it would have meant correctly naming and grouping your files and then making desired edits in metadata instead.  Oddly enough, the exact same thing you've been told here.

It's not relevant to this thread.  In this case you are combining an unsupported naming system with effectively corrupt metadata and being shocked when the results are unpredictable.  This isn't tied to a bug.  This is all you.  Fix it or don't.  Your call.

Same hard time, but better ending.

Hope @Luke fix this.

Link to comment
Share on other sites

EODCrafter
58 minutes ago, gokuz said:

Any idea how to do batch deleting of lines in windows?

You can use Sed from WSL....Windows is /mnt/c/

 

Link to comment
Share on other sites

Happy2Play

The fix still is proper <displayseason> and <displayepisode> as you have to give the metadata context of what you are doing.  The -1 value will no longer work and there is not a fix to give you back the broken way it was handled in the past.  

Manual Metadata correction is required.  

 

 

Link to comment
Share on other sites

justinrh

I wonder if gokuz is just pulling your chains to see how far this can go.  He probably fixed it days ago and is enjoying Emby again.  Or, did he ever really have a problem to begin with and it was contrived?  Hmmm ... we might not ever know.

Link to comment
Share on other sites

GrimReaper

Work in progress

 

Edited by GrimReaper76
Link to comment
Share on other sites

GrimReaper

Okay, here's a working method:

1. Delete all nfos

2. Rename all files as per Absolute order (i.e. S01E01 to S01E1010, as per TVDB 名探偵コナン - Absolute Order - Season 1 - TheTVDB.com).

3. Transfer that Show and Season 1 folder with all episodes to a separate folder

996610814_Screenshot2021-06-12221501.png.524aba505e24574170d870103b726d9f.png

4. Make another Library with nfo saver enabled with that folder

5. Scan library

6. Change order to Absolute

654303613_Screenshot2021-06-12221535.thumb.png.8abdbbdf65e3d86d74dfe150fc72ca56.png

7. Replace all metadata

1324936523_Screenshot2021-06-12221640.png.9e2e7e27139fa89914769ef5e8560c6a.png

66875570_Screenshot2021-06-12221106.thumb.png.6617a01ea6db8757bec23d4d7338c8b9.png

 

8. Make Season 2 (3, 4, 5...) folder

9. Transfer whichever files you want in that Season

87886352_Screenshot2021-06-12221721.png.2b818125857739f5eba5df41934e5bee.png

10. With Notepadd++ replace all <season>1 occurences (episode numbers are irrelevant since all metadata is already scraped; they will be chronological anyway, which is actually nice) with <season>x for the folder you are working with

 518139048_Screenshot2021-06-12221804.png.b5b898b08c8134b086fd4f880c7776ff.png

After Replace in Files, 2 instances replaced (episodes 45 and 50)

455843000_Screenshot2021-06-12221833.png.0460210a61f797f524b6515a0b1e70eb.png

11. Scan Library files on TV Show level

736397570_Screenshot2021-06-12221932.thumb.png.f74f4a4db02a224a8a7f5464c9e131f4.png

 

704323985_Screenshot2021-06-12221946.thumb.png.4c900cbc0c1da77d60ef9c7b5898e0d2.png

 

There yo go, you can distribute those episodes per Seasons however you want.

At last, return that Show folder to your main TV Shows folder or wherever you keep it.

 

Edited by GrimReaper76
Append
  • Like 2
  • Confused 1
Link to comment
Share on other sites

rodainas

Nice use of the absolute order @GrimReaper76, replacing the nfo file season number, mixed solution that works for this particular scenario, does was the poster wants and uses emby as it is meant to be (reading the metadata you feed to it).

  • Thanks 1
Link to comment
Share on other sites

gokuz
7 hours ago, justinrh said:

I wonder if gokuz is just pulling your chains to see how far this can go.  He probably fixed it days ago and is enjoying Emby again.  Or, did he ever really have a problem to begin with and it was contrived?  Hmmm ... we might not ever know.

I have said multiple times I am currently using 4.5.4.0, it works perfectly. Stop assuming, I already confirmed my predicament.

6 hours ago, GrimReaper76 said:

Okay, here's a working method:

1. Delete all nfos

2. Rename all files as per Absolute order (i.e. S01E01 to S01E1010, as per TVDB 名探偵コナン - Absolute Order - Season 1 - TheTVDB.com).

3. Transfer that Show and Season 1 folder with all episodes to a separate folder

996610814_Screenshot2021-06-12221501.png.524aba505e24574170d870103b726d9f.png

4. Make another Library with nfo saver enabled with that folder

5. Scan library

6. Change order to Absolute

654303613_Screenshot2021-06-12221535.thumb.png.8abdbbdf65e3d86d74dfe150fc72ca56.png

7. Replace all metadata

1324936523_Screenshot2021-06-12221640.png.9e2e7e27139fa89914769ef5e8560c6a.png

66875570_Screenshot2021-06-12221106.thumb.png.6617a01ea6db8757bec23d4d7338c8b9.png

 

8. Make Season 2 (3, 4, 5...) folder

9. Transfer whichever files you want in that Season

87886352_Screenshot2021-06-12221721.png.2b818125857739f5eba5df41934e5bee.png

10. With Notepadd++ replace all <season>1 occurences (episode numbers are irrelevant since all metadata is already scraped; they will be chronological anyway, which is actually nice) with <season>x for the folder you are working with

 518139048_Screenshot2021-06-12221804.png.b5b898b08c8134b086fd4f880c7776ff.png

After Replace in Files, 2 instances replaced (episodes 45 and 50)

455843000_Screenshot2021-06-12221833.png.0460210a61f797f524b6515a0b1e70eb.png

11. Scan Library files on TV Show level

736397570_Screenshot2021-06-12221932.thumb.png.f74f4a4db02a224a8a7f5464c9e131f4.png

 

704323985_Screenshot2021-06-12221946.thumb.png.4c900cbc0c1da77d60ef9c7b5898e0d2.png

 

There yo go, you can distribute those episodes per Seasons however you want.

At last, return that Show folder to your main TV Shows folder or wherever you keep it.

 

This is the only "good" band-aid I have seen here. Thank you for this.

I might consider doing a overhaul to every series I got using this but it adds up.

2 years worth of Anime series doing each one manually moving files around/creating a dummy library etc is not ideal at all. Compared to that, staying on 4.5.4.0 and not requiring lifting a finger, I'll stick with the latter.

I'll still continue using 4.5.4.0 indefinitely until @Luke fixes this.

8 hours ago, Happy2Play said:

The fix still is proper <displayseason> and <displayepisode> as you have to give the metadata context of what you are doing.  The -1 value will no longer work and there is not a fix to give you back the broken way it was handled in the past.  

Manual Metadata correction is required.  

 

 

Yea manually changing thousands of episodes is not possible, I only have 2 hands and so much free time/energy.

Edited by gokuz
Link to comment
Share on other sites

gokuz
6 hours ago, rodainas said:

uses emby as it is meant to be (reading the metadata you feed to it).

4.5.4.0 emby is working perfectly.

Link to comment
Share on other sites

Happy2Play
4 minutes ago, gokuz said:

Yea manually changing thousands of episodes is not possible, I only have 2 hands and so much free time/energy.

Yes as the defect in all previous versions has been corrected so Emby will not work with your existing metadata going forward.

You have to fix your defective metadata or live on a old version of Emby that will over time stop working on future client updates.  Those are your options.

So every episode you move from its proper location has to have proper corresponding displayseason and displayepisode to display correctly in 4.6 and up.

Link to comment
Share on other sites

gokuz
2 minutes ago, Happy2Play said:

Yes as the defect in all previous versions has been corrected so Emby will not work with your existing metadata going forward.

You have to fix your defective metadata or live on a old version of Emby that will over time stop working on future client updates.  Those are your options.

So every episode you move from its proper location has to have proper corresponding displayseason and displayepisode to display correctly in 4.6 and up.

Seems like @Luke is not replying to this thread anymore. Is that a sign he has given up on fixing this?

Link to comment
Share on other sites

Happy2Play
6 minutes ago, gokuz said:

Seems like @Luke is not replying to this thread anymore. Is that a sign he has given up on fixing this?

No he is look at this but with it being a metadata defect I don't really see that anything can be done.  As the metadata is missing for the new database columns to present it properly.

Link to comment
Share on other sites

gokuz
2 minutes ago, Happy2Play said:

No he is look at this but with it being a metadata defect I don't really see that anything can be done.  As the metadata is missing for the new database columns to present it properly.

I'm talking about looking at 4.5.4.0 and 4.6 side by side and what changed.

Has he looked at the difference and see if its fixable?

Link to comment
Share on other sites

Happy2Play
6 minutes ago, gokuz said:

I'm talking about looking at 4.5.4.0 and 4.6 side by side and what changed.

The DATABASE changed so there is no looking back.  Fixable require you to fix your defective metadata.  Or stay on a old version where the defect is ignored in a old database.

Link to comment
Share on other sites

gokuz
3 minutes ago, Happy2Play said:

The DATABASE changed so there is no looking back.  Fixable require you to fix your defective metadata.  Or stay on a old version where the defect is ignored in a old database.

I'm asking about @Luke though. He hasn't reply to this thread. Maybe you could help me PM him to give a verdict if he wants to fix this or not.

Link to comment
Share on other sites

Happy2Play
1 minute ago, gokuz said:

I'm asking about @Luke though. He hasn't reply to this thread. Maybe you could help me PM him to give a verdict if he wants to fix this or not.

There is already a PM discussion on this topic and he said he needs to review the details.  So when he makes a discission he will let us know.

Link to comment
Share on other sites

gokuz
11 minutes ago, Happy2Play said:

There is already a PM discussion on this topic and he said he needs to review the details.  So when he makes a discission he will let us know.

Thank you so much for the emby team for this. Hope its good news.

Link to comment
Share on other sites

CasperTV

OMG I just finished watching UFC pay per view and came here from habit and 20 pages 😄 holy sweet jesus hahahahahahaha

Link to comment
Share on other sites

  • 2 years later...
On 6/12/2021 at 12:59 PM, rodainas said:

The script works

you just need to modify the last part

HERE

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.2.10.0
 Author:   Jester Mgee

 Script Function:
    This script is designed to create a simple .NFO file for video files. The script is hard coded to work on files with the following format names:

    Show Name - SSxEE - Episode Title.ext

    The Episode Title, Season Number (SS) and Episode Number (EE) will all be extracted and entered into an NFO file that will be created in the folder
    with the video files.

    The script is run from within the folder that NFO files are to be generated and will process the formats of files listed in the script.
    IF an NFO file already resides in the directory it will be replaced automatically.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here

#include <file.au3>
#include <array.au3>
Global $aravifiles, $file, $title, $season, $episode
$avidir = @ScriptDir
$nfodir = @ScriptDir

; Process 3 character extension files
;get avi files
$aravifiles = _FileListToArray ($avidir, "*.avi", 1)
_processfilename3()
;get mpg files
$aravifiles = _FileListToArray ($avidir, "*.mpg", 1)
_processfilename3()
;get wmv files
$aravifiles = _FileListToArray ($avidir, "*.mpg", 1)
_processfilename3()
;get mkv files
$aravifiles = _FileListToArray ($avidir, "*.mkv", 1)
_processfilename3()

; Process 4 character extension files
$aravifiles = _FileListToArray ($avidir, "*.divx", 1)
_processfilename4()
$aravifiles = _FileListToArray ($avidir, "*.mpeg", 1)
_processfilename4()
$aravifiles = _FileListToArray ($avidir, "*.mt2s", 1)
_processfilename4()

; Function for 3 character filenames (avi; mpg; wmv; mkv)
Func _processfilename3()
;Loop over array with filenames
For $i = 1 To UBound ($aravifiles) - 1
    ;Cut 4 char from the right -> get rid of extension and set new extension
    $file = $nfodir & "\" & StringTrimRight ($aravifiles [$i], 4) & ".nfo"
    ;Split Avi Filename by -
    $temp = StringSplit ($aravifiles [$i], " - ", 1)
    ;_ArrayDisplay ($temp, "StringSplit - File Name")
    ;last element is title -> get rid of extension and rid of leading space
    $title = StringTrimRight ($temp [3], 4)
    ;title and episode is split of 2 nd element of 1st stringsplit, splitting by x
    $temp1 = StringSplit ($temp [2], "x", 1)
    ;_ArrayDisplay ($temp1, "StringSplit - Season / Episode")
    ;season is last elemnt of split, get rid of spaces
    $season = StringStripWS ($temp1 [1], 😎
    ;episode is 1st elemnt of split, get rid of spaces
    $episode = StringStripWS ($temp1 [2], 😎
    ;write nfo file
    _writenfo ()
Next
EndFunc

; Function for 3 character filenames (divx; mpeg; mt2s)
Func _processfilename4()
;Loop over array with filenames
For $i = 1 To UBound ($aravifiles) - 1
    ;Cut 5 char from the right -> get rid of extension and set new extension
    $file = $nfodir & "\" & StringTrimRight ($aravifiles [$i], 5) & ".nfo"
    ;Split Avi Filename by -
    $temp = StringSplit ($aravifiles [$i], " - ", 1)
    ;_ArrayDisplay ($temp, "StringSplit - File Name")
    ;last element is title -> get rid of extension and rid of leading space
    $title = StringTrimRight ($temp [3], 5)
    ;title and episode is split of 2 nd element of 1st stringsplit, splitting by x
    $temp1 = StringSplit ($temp [2], "x", 1)
    ;_ArrayDisplay ($temp1, "StringSplit - Season / Episode")
    ;season is last elemnt of split, get rid of spaces
    $season = StringStripWS ($temp1 [1], 😎
    ;episode is 1st elemnt of split, get rid of spaces
    $episode = StringStripWS ($temp1 [2], 😎
    ;write nfo file
    _writenfo ()
Next
EndFunc

Func _writenfo ()
    If FileExists ($file) Then FileWriteLine ($file, "<episodedetails>")
    ;chr (9) is a TAB
    FileWriteLine ($file, Chr (9) & "<title>" & $title & "</title>")
    FileWriteLine ($file, Chr (9) & "<rating>5.0</rating>")
    FileWriteLine ($file, Chr (9) & "<season>" & $season & "</season>")
    FileWriteLine ($file, Chr (9) & "<episode>" & $episode & "</episode>")
    FileWriteLine ($file, Chr (9) & "<plot>Auto-Generated NFO File.</rating>")
    FileWriteLine ($file, Chr (9) & "<credits>Jester Mgee Systems</credits>")
    FileWriteLine ($file, Chr (9) & "<director></director>")
    FileWriteLine ($file, Chr (9) & "<aired></aired>")
    FileWriteLine ($file, Chr (9) & "<actor>")
    FileWriteLine ($file, Chr (9) & Chr (9) &"<name></name>")
    FileWriteLine ($file, Chr (9) & Chr (9) &"<role></role>")
    FileWriteLine ($file, Chr (9) & Chr (9) &"<thumb></thumb>")
    FileWriteLine ($file, Chr (9) & "</actor>")
    FileWriteLine ($file, "</episodedetails>")
EndFunc

 

Output result will be, you see, just remove the original lines and leave the new ones at the end with the cli command.

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--created on 2021-03-24 11:18:59 - tinyMediaManager 3.1.10-->
<episodedetails>
  <title>El Papa Cazador de brujas (Innocentius)</title>
  <originaltitle/>
  <showtitle>A Certain Magical Index</showtitle>
  <season>1</season>
  <episode>2</episode>
  <displayseason>-1</displayseason>
  <displayepisode>-1</displayepisode>
  <id>395179</id>
  <uniqueid default="true" type="tvdb">395179</uniqueid>
  <ratings>
    <rating default="true" max="10" name="tvdb">
      <value>8.7</value>
      <votes>196</votes>
    </rating>
  </ratings>
  <userrating>0.0</userrating>
  <plot>El mago se llama Styil Magnus que pertenece a la iglesia anglicana. Una vez acabado su presentación, Styil ataca a Touma con magia de fuego; sin embargo Touma lo anula con su mano derecha, luego Styil invico a Innocentius, un gigante de fuego capaz de carbonicar todo lo que lo rodea. Con la ayuda de Index, a pesar de estar inconsciente, Touma , utilizando su ingenio, pudo derrotar a Styil. Después, Index necesitaba ayuda médica, así que la llevó donde Komoe, su profesora, para curarla con magia , pero el debe abandonar el lugar, si no la magia no funcionaria solo con su presencia, dejando a Index en manos de su profesora.</plot>
  <runtime>0</runtime>
  <mpaa/>
  <premiered>2008-10-12</premiered>
  <aired>2008-10-12</aired>
  <watched>false</watched>
  <playcount/>
  <studio/>
  <credits>赤星政尚</credits>
  <director>錦織博</director>
  <trailer/>
  <dateadded>2021-03-24 10:56:15</dateadded>
  <epbookmark/>
  <code/>
  <fileinfo>
    <streamdetails>
      <video>
        <codec>HEVC</codec>
        <aspect>1.78</aspect>
        <width>1920</width>
        <height>1080</height>
        <durationinseconds>1422</durationinseconds>
        <stereomode/>
      </video>
      <audio>
        <codec>Opus</codec>
        <language>jpn</language>
        <channels>2</channels>
      </audio>
      <audio>
        <codec>Opus</codec>
        <language>eng</language>
        <channels>2</channels>
      </audio>
      <subtitle>
        <language>eng</language>
      </subtitle>
      <subtitle>
        <language>eng</language>
      </subtitle>
      <subtitle>
        <language>spa</language>
      </subtitle>
      <subtitle>
        <language>spa</language>
      </subtitle>
      <subtitle>
        <language>fra</language>
      </subtitle>
      <subtitle>
        <language>deu</language>
      </subtitle>
      <subtitle>
        <language>ita</language>
      </subtitle>
      <subtitle>
        <language>por</language>
      </subtitle>
      <subtitle>
        <language>pol</language>
      </subtitle>
      <subtitle>
        <language>tur</language>
      </subtitle>
      <subtitle>
        <language>swe</language>
      </subtitle>
      <subtitle>
        <language>dan</language>
      </subtitle>
      <subtitle>
        <language>fin</language>
      </subtitle>
      <subtitle>
        <language>nld</language>
      </subtitle>
      <subtitle>
        <language>nor</language>
      </subtitle>
      <subtitle>
        <language>rus</language>
      </subtitle>
      <subtitle>
        <language>hun</language>
      </subtitle>
      <subtitle>
        <language>ell</language>
      </subtitle>
      <subtitle>
        <language>heb</language>
      </subtitle>
      <subtitle>
        <language>ara</language>
      </subtitle>
      <subtitle>
        <language>ron</language>
      </subtitle>
      <subtitle>
        <language>ces</language>
      </subtitle>
      <subtitle>
        <language>jpn</language>
      </subtitle>
    </streamdetails>
  </fileinfo>
  <!--tinyMediaManager meta data-->
  <source>UNKNOWN</source>
  <original_filename>[Judas] Toaru Majutsu no Index - S01E02.mkv</original_filename>
  <user_note/>
</episodedetails>
<episodedetails>
    <title>El Papa Cazador de brujas (Innocentius)</title>
    <rating>5.0</rating>
    <season>02</season>
    <episode>05</episode>
    <plot>Auto-Generated NFO File.</rating>
    <credits>Jester Mgee Systems</credits>
    <director></director>
    <aired></aired>
    <actor>
        <name></name>
        <role></role>
        <thumb></thumb>
    </actor>
</episodedetails>
 

 Some news on multi-episode nfo files: 

 

Link to comment
Share on other sites

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