Page 1 of 1

{emby} for TV Shows duplicates top folder

Posted: 22 Mar 2023, 11:50
by allineedis
Getting some strange behavior from the {emby} binding since 5.0.

When reprocessing a TV show, filebot duplicates the Top Folder. Basically creating a TV Shows folder within the already existing TV Shows folder and moving all re-processed shows to that new TV Shows folder.

Filebot result in this case: X:/TV Shows/TV Shows/Whatever TV Show (YYYY)/Season 01/Episode

When adding a fresh episode (from outside the TV Show folder), the behavior is the normal one only one TV Show folder (X:/TV Shows/Whatever TV Show (YYYY)/Season 01/Episode)

I have nothing else in the script that could trigger something like this, I only add some data to the filename like {aco} {hdr}

Re: {emby} for TV Shows duplicates top folder

Posted: 22 Mar 2023, 12:13
by rednoah
:?: What is your format?


:arrow: I recommend specifying the target file path absolutely:

Code: Select all

X:/{emby.id}

:idea: Please read FAQ #1 for details.

Re: {emby} for TV Shows duplicates top folder

Posted: 22 Mar 2023, 13:00
by allineedis
Don't laugh at this, but it works in my cases. Except the TV Shows TV Shows thing.

But this double TV Show thing also happens when using no script, just add an already processed TV Show and us the option " Match" and Episode Mode, TVDB

Code: Select all

{emby}

 [{any{vf.match(/2160p|1080p|720p|480p/)}{vf}.replace('2160p' : 'UHD-2160', '1080p' : 'HD-1080', '720p' : 'HD-720', '480p' : 'SD-480')}]

 [{aco}]
 
{if (vf=="720p") " [WEB-DL]" else ""}
{if (vf=="480p") " [WEB-DL]" else ""}
{if (vf=="576p") " [WEB-DL]" else ""}

{if (vf=="1080p" && (bitrate.toInteger() / 1e6d).round(1)<15.0) " [WEB-DL]" else ""}
{if (vf=="1080p" && (bitrate.toInteger() / 1e6d).round(1)>15.0) " [BD Remux]" else ""}

{if (vf=="2160p" && video[0].colourprimaries =~ "709" && (bitrate.toInteger() / 1e6d).round(1)<27.0)" [SDR] [WEB-DL]"else""}
{if (vf=="2160p" && video[0].colourprimaries =~ "709" && (bitrate.toInteger() / 1e6d).round(1)>27.0)" [SDR] [UHD Remux]"else""}

{if (hdr=="") " [SDR] " else ""}
{if (hdr=="Blu-ray") " [Dolby Vision] " else ""}
{if (hdr=="HDR") " [HDR10] [UHD Remux]" else ""}

{if (hdr=="Dolby Vision" && video[0].HDRformatprofile =~ "05")" [Dolby Vision P5] [WEB-DL]" else ""}
{if (hdr=="Dolby Vision" && video[0].HDRformatprofile =~ "06")" [Dolby Vision P6] [WEB-DL]" else ""}
{if (hdr=="Dolby Vision" && video[0].HDRformatprofile =~ "07")" [Dolby Vision P7] [UHD Remux]" else ""}
{if (hdr=="Dolby Vision" && video[0].HDRformatprofile =~ "08" && (bitrate.toInteger() / 1e6d).round(1)<27.0)" [Dolby Vision P8] [WEB-DL]" else ""}
{if (hdr=="Dolby Vision" && video[0].HDRformatprofile =~ "08" && (bitrate.toInteger() / 1e6d).round(1)>27.0)" [Dolby Vision P8] [UHD Hybrid Remux]" else ""}

{if (hdr=="HDR10" && video.size()==2) " [Dolby Vision] [UHD Remux]" else ""}
{if (hdr=="HDR10" && video.size()==1 && (video[0].bitrate.toInteger() / 1e6d).round(1)<27.0) " [HDR10] [WEB-DL]" else ""}
{if (hdr=="HDR10" && video.size()==1 && (video[0].bitrate.toInteger() / 1e6d).round(1)>27.0) " [HDR10] [UHD Remux]" else ""}

{if (hdr=="HDR10+" && video.size()==1 && (video[0].bitrate.toInteger() / 1e6d).round(1)<27.0) " [HDR10+] [WEB-DL]" else ""}
{if (hdr=="HDR10+" && video.size()==1 && (video[0].bitrate.toInteger() / 1e6d).round(1)>27.0) " [HDR10+] [UHD Remux]" else ""}
{if (hdr=="HDR10+" && video.size()==2) " [Dolby Vision] [UHD Remux]" else ""}
{if (hdr=="undefined" && video.size()==1) " [CHECK HDR] [UHD Remux]" else ""}

 [{bitrate}]
 
 

Re: {emby} for TV Shows duplicates top folder

Posted: 22 Mar 2023, 13:05
by allineedis
Ha, success.

I added this in front, based on your suggestion.

Code: Select all

X:/{emby}
I am now getting the correct path again.

No idea what was causing this.

Thanks!!

Re: {emby} for TV Shows duplicates top folder

Posted: 22 Mar 2023, 13:11
by rednoah
Make your format generate an absolute path, and it'll always work:

Code: Select all

X:/
{emby}
...

:idea: If your format generates a relative path, then FileBot will try to integrate this relative file path into the file structure at hand, somehow, as best as possible. This should mostly work, but there's certainly room for getting it wrong for one corner case or another.


:arrow: We'll try to make FileBot smarter, but for the time being, using absolute paths should work, and it's probably always a good idea anyway.