Extras folder causing issues with movie name in parent directory

Any questions? Need some help?
Post Reply
stephen147
Donor
Posts: 131
Joined: 01 Sep 2015, 22:40

Extras folder causing issues with movie name in parent directory

Post 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>
Last edited by stephen147 on 11 May 2019, 19:17, edited 1 time in total.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

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

Post by kim »

maybe it gets the info from other file, try removing the extra files
stephen147
Donor
Posts: 131
Joined: 01 Sep 2015, 22:40

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

Post 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\
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

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

Post 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.
:idea: Please read the FAQ and How to Request Help.
stephen147
Donor
Posts: 131
Joined: 01 Sep 2015, 22:40

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

Post 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
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

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

Post 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.
:idea: Please read the FAQ and How to Request Help.
stephen147
Donor
Posts: 131
Joined: 01 Sep 2015, 22:40

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

Post by stephen147 »

Brilliant. I'll keep an eye out on on the Beta! Thanks.
Post Reply