Page 1 of 1

Extras folder causing issues with movie name in parent directory

Posted: 11 May 2019, 16:08
by stephen147
1. Extract this https://we.tl/t-qxjiVRXoTw to the desktop.
2. Change the username or path to where you extracted it for the PowerShell code below.
3. Run the two lines below in powerShell.
4. The folder name will take on the extra files media info and name it John Wick (2014) 1080p as opposed to naming the folder John Wick (2014) 2160p

Code: Select all

$movieFolderPath = "C:\Users\username\Desktop\John Wick (2014) 2160p"
filebot -script fn:renall "$movieFolderPath" -non-strict --format "{n} {y} {vf}" --file-filter "fn != /(?i)Extras/" --db TheMovieDB --def target=folder --action test --log info
:!: If that wetransfer zip file expires here's the tree /a /f . cmd command of that:

Code: Select all

C:\Users\username\Desktop\JOHN WICK (2014) 2160P
|   banner.jpg
|   clearart.png
|   disc.png
|   fanart.jpg
|   folder.jpg
|   imdb.url
|   John Wick (2014) 2160p.mkv
|   landscape.jpg
|   logo.png
|   poster.jpg
|   tmdb.url
|
+---extrafanart
|       fanart1.jpg
|       fanart2.jpg
|       fanart3.jpg
|
\---Extras
        Calling in the Cavalry.mkv


C:\Users\username\Desktop\John Wick (2014) 2160p>

Re: Extras folder causing issues with movie name in parent directory

Posted: 11 May 2019, 17:25
by kim
maybe it gets the info from other file, try removing the extra files

Re: Extras folder causing issues with movie name in parent directory

Posted: 11 May 2019, 18:09
by stephen147
Sorry, I didn't mention that I did and that worked as expected.

See, Kodi uses the folder called extras and with this plugin https://kodi.wiki/view/Add-on:Extras it can display them and play the contents.

Basic structure in Kodi for extras is:

Code: Select all

...\Lucy (2014)\
...\Lucy (2014)\Extras\

Re: Extras folder causing issues with movie name in parent directory

Posted: 11 May 2019, 18:59
by rednoah
If you're formatting a folder, then all MediaInfo bindings are mapped to the next best video file inside that folder, and I guess sub folders come first. Probably makes sense to only consider direct child files though.


EDIT:

Prefer direct descendant video files when formatting folder objects with upcoming revisions.

Re: Extras folder causing issues with movie name in parent directory

Posted: 11 May 2019, 19:14
by stephen147
Ah, I see. So the next best is in the sub-folder! I've always assumed it was the 1st.

:?: So, is that a yes on fixing this behavior? :)

Image

Re: Extras folder causing issues with movie name in parent directory

Posted: 11 May 2019, 19:27
by rednoah
Presumably, alphabetically, this is the order in which it's currently discovering media files within the folder:

Code: Select all

Extras/Calling in the Cavalry.mkv
John Wick (2014) 2160p.mkv
Yes, it does make sense to primarily rely on direct decedents of the video folder in question, and only check indirect decedents if there's no direct decedents.

Re: Extras folder causing issues with movie name in parent directory

Posted: 11 May 2019, 19:47
by stephen147
Brilliant. I'll keep an eye out on on the Beta! Thanks.