An Intro and Scraping of Movie Set Artwork
#1
First off as this is my very first post here, just like to say Hi and a huge thank you to Team XBMC and the whole community, XBMC is awesome.
I have been coding for many years but been a very long time since I coded in C++ Blush but took the plunge and made some updates to deal with
scraping local Movie Set artwork, details below. But I have no idea how to push my changes back to the community so any help on using git etc.
very much appreciated. (and sorry for being a bit of a newb) So on to my changes;

This assumes all your movies are in separate folders and is for local artwork only, may look to scrape for remote sources in the future. Wink

If you create a set-poster.jpg|png and a set-fanart.jpg|png inside the movies folder it will pick these up for the set artwork, if none exists
it falls back to using the movies poster and artwork (as XBMC currently does).

But, if a movie or set of movies are in a folder named similar to the Movie Set name in the NFO, it will look for a
poster.jpg|png and a fanart.jpg|png, so for example;

\\SourceFolder\Charlie's Angels\poster.jpg
\\SourceFolder\Charlie's Angels\fanart.jpg

Where the set name in the NFO at least starts with 'Charlie's Angels', i.e. the folder does not have to be the full set name but must match to a point.

poster.jpg and fanart.jpg will always be used in favour of set-poster.jpg and set-fanart.jpg etc.

It will also check and and overwrite the set artwork where the original set artwork is the movies poster and/or fanart so if you start out with a single movie
in its own folder and a sequel then comes out, you can add the sequel movie to your share with a set-poster and set-fanart and it will pick this up and
use them, the same if you move all the movies in a set into their set folder and create a poster.jpg and fanart.jpg.

Hope this makes sense, work really great, looking forward to any help/feedback.

Regards
Monty
Reply
#2
I take it you didn't search the forum, or you would have found the Movie Set Artwork Automator add-on.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#3
(2013-05-04, 21:26)MilhouseVH Wrote: I take it you didn't search the forum, or you would have found the Movie Set Artwork Automator add-on.

Urm, I did, given Movie Sets are a core part of XBMC and my preference, I would like to have seen it in the core scraper.

My Bad!

For what its worth, code has been updated to deal with flat shares and also checks for <Set Name>-fanart.jpg|png and <Set Name>-poster.jpg|png
Reply
#4
What code? A link to your repository or PR (Pull Request) would be good.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#5
(2013-05-04, 22:37)MilhouseVH Wrote: What code? A link to your repository or PR (Pull Request) would be good.

(2013-05-04, 19:25)monty68 Wrote: But I have no idea how to push my changes back to the community so any help on using git etc.
very much appreciated. (and sorry for being a bit of a newb)

ConfusedBig Grin
Reply
#6
https://help.github.com/articles/using-pull-requests
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#7
Thanks, I'm just setting up my repo then will send a pull request
Reply
#8
My repo: monty68/xbmc
Reply
#9
I'm not sure if I understand your text correctly, but you must keep the set-poster.jpg in the movie folder, but it's only needed in one of the movies folder, not in all movies in the set?
What happens if you have different set-poster.jpg in "Charlie's Angels" and "Charlie's Angels Full Throttle"?

Any plans to have a dedicated directory for the set-poster/fanart as in the linked plug-in?
Reply
#10
I have stream lined the approach a little and no longer will support set-poster.jpg|png and set-fanart.jpg|png

You can either create a [Set Name]-poster.jpg|png and [Set Name]-fanart.jpg|png inside the movie folder or just one of the movie folders
if you have your movies in their own folders. OR, create a folder with the set name and create poster.jpg|png and fanart.jpg|png and
store the movies in their, either flat or in their own folders it does not matter.

It will only ever use the first [Set Name]-poster.jpg|png and [Set Name]-fanart.jpg|png found, it will only overide and update the database
if the current set artwork is the same artwork for the movie and then you add set artwork, this is so it will update the set artwork if you
add a sequel at a later date.

I will look to code for using a dedicated folder for the set artwork, shouldn't be too much hassle to do.

I would assume that if there is a dedicated folder then I wouldn't scan the movie folders themselves?
Reply
#11
Not had much time to look at this further but, some advice from the seniors (and not by age :-)) would the additional dedicated folder for the set
artwork lend itself to an advanced settings candidate? If not then really would appreciate some help/advice on modifying the GUI for the right
place (and know how) to code in for this extra setting.
Reply
#12
I found Post 10 confusing. Maybe a tree diagram of the directory structure with the naming convention you are using and when each file name is used.

I would say if it finds Predator Collection-poster.jpg / Predator Collection-fanart.jpg based on the .NFO it would use those then fall back to the first movie based on the year in .NFO file i.g. Predator (1987)-fanart.jpg / Predator (1987)-poster.jpg I know there would have to be a search for the all videos in a specific collection and then a comparison of years then to determine which one to use. I like the idea of keeping the set images with the first movie released in the collection which again would have to be determined by the year but I think it might be easier to just have one directory.

My directory structure is:
MediaCenter\Movies\Predator (1987)
MediaCenter\Movies\Predator 2 (1990)
and so forth.

I use Media Companion to scrape my videos. I am not sure if XBMC creates .nfo files when it scrapes but if not I would think there is probably a table in the SQLlite and MySQL database to find the collection name and year of the movie.

I look forward to discussing this further.
Reply
#13
In all examples, assumes the NFO contains <set>Predator Collection</set>

Example 1

Movies\Predator (1987)\Predator (1987).mkv
Movies\Predator (1987)\Predator (1987).nfo
Movies\Predator (1987)\Predator (1987)-fanart.jpg
Movies\Predator (1987)\Predator (1987)-poster.jpg
Movies\Predator (1987)\Predator Collection-poster.jpg
Movies\Predator (1987)\Predator Collection-fanart.jpg

Movies\Predator 2 (1990)\Predator 2 (1990).mkv
Movies\Predator 2 (1990)\Predator 2 (1990).nfo
Movies\Predator 2 (1990)\Predator 2 (1990)-fanart.jpg
Movies\Predator 2 (1990)\Predator 2 (1990)-poster.jpg

Example 2

Movies\Predator (1987)\Predator (1987).mkv
Movies\Predator (1987)\Predator (1987).nfo
Movies\Predator (1987)\Predator (1987)-fanart.jpg
Movies\Predator (1987)\Predator (1987)-poster.jpg

Movies\Predator 2 (1990)\Predator 2 (1990).mkv
Movies\Predator 2 (1990)\Predator 2 (1990).nfo
Movies\Predator 2 (1990)\Predator 2 (1990)-fanart.jpg
Movies\Predator 2 (1990)\Predator 2 (1990)-poster.jpg
Movies\Predator 2 (1990)\Predator Collection-poster.jpg
Movies\Predator 2 (1990)\Predator Collection-fanart.jpg


In this example, you may have added a sequel at a later date, you don't need to add the set artwork to the first movie in the
set if you don't want to, the patch will check the DB and if the current set artwork belongs to a movie, (XBMC's default behavior) i.e.

Set Fanart=Movies\Predator (1987)\Predator (1987)-fanart.jpg
Set Poster=Movies\Predator (1987)\Predator (1987)-poster.jpg

and then finds the set artwork

Movies\Predator 2 (1990)\Predator Collection-poster.jpg
Movies\Predator 2 (1990)\Predator Collection-fanart.jpg

It will use the later and overwrite the database, otherwise it will ignore all subsequent set artwork files


Example 3

Movies\Predator Collection\Predator (1987)\Predator (1987).mkv
Movies\Predator Collection\Predator (1987)\Predator (1987).nfo
Movies\Predator Collection\Predator (1987)\Predator (1987)-fanart.jpg
Movies\Predator Collection\Predator (1987)\Predator (1987)-poster.jpg
Movies\Predator Collection\fanart.jpg
Movies\Predator Collection\poster.jpg


Similar logic applies in that any set artwork defined at the movie level will be ignored.

Example 4 (flat structure)

Movies\Predator (1987).mkv
Movies\Predator (1987).nfo
Movies\Predator (1987)-fanart.jpg
Movies\Predator (1987)-poster.jpg
Movies\Predator 2 (1990).mkv
Movies\Predator 2 (1990).nfo
Movies\Predator 2 (1990)-fanart.jpg
Movies\Predator 2 (1990)-poster.jpg
Movies\Predator Collection-poster.jpg
Movies\Predator Collection-fanart.jpg


Example 5 (flat structure)

Movies\Predator Collection\Predator (1987).mkv
Movies\Predator Collection\Predator (1987).nfo
Movies\Predator Collection\Predator (1987)-fanart.jpg
Movies\Predator Collection\Predator (1987)-poster.jpg
Movies\Predator Collection\Predator 2 (1990).mkv
Movies\Predator Collection\Predator 2 (1990).nfo
Movies\Predator Collection\Predator 2 (1990)-fanart.jpg
Movies\Predator Collection\Predator 2 (1990)-poster.jpg
Movies\Predator Collection\fanart.jpg
Movies\Predator Collection\poster.jpg


I need to amend the patch and resend the PR so that illegal characters are stripped from the set name otherwise the look-ups fail
and I'm still contemplating the use of a dedicated folder for the set artwork but being new to XBMC dev, need some help
amending the GUI otherwise I'll drop down to using the advancedsettings.xml to store the folder details.

I did start out also allowing set-poster.jpg and set-fanart.jpg which can be a better option for some but was asked to simplify the options
so removed it.

Hope this helps?
Reply
#14
Thank you for that description it was very helpful and it explains it much better. I do have one additional question just to clarify. You stated
Quote:I did start out also allowing set-poster.jpg and set-fanart.jpg which can be a better option for some but was asked to simplify the options so removed it.
Do you mean you we would use the file names like Predator Collection-poster.jpg / Predator Collection-fanart.jpg instead of set-poster.jpg /set-fanart.jpg? If this is what you meant I agree it would make more sense to do it this was so you can easily look at the file name and discern which movie you are referring to.
Reply
#15
(2013-05-29, 12:43)m1975Michael Wrote: Thank you for that description it was very helpful and it explains it much better. I do have one additional question just to clarify. You stated
Quote:I did start out also allowing set-poster.jpg and set-fanart.jpg which can be a better option for some but was asked to simplify the options so removed it.
Do you mean you we would use the file names like Predator Collection-poster.jpg / Predator Collection-fanart.jpg instead of set-poster.jpg /set-fanart.jpg? If this is what you meant I agree it would make more sense to do it this was so you can easily look at the file name and discern which movie you are referring to.

Yes, the set artwork has to be named Predator Collection-poster.jpg / Predator Collection-fanart.jpg this way artwork can be stored in a seperate
folder for all the set artwork for those who choose to do so.

The only reason why I considered the set-poster.jpg / set-fanart.jpg is the issue where the set name may contain illegal characters but as long as people
follow simple rules around the naming it will work just fine. e.g. Replace all slashes / or \ with spaces and remove all $<>:?*
Reply

Logout Mark Read Team Forum Stats Members Help
An Intro and Scraping of Movie Set Artwork0