Add discart to scraper : possible or not ?
#1
Hi.

We are writing our new scraper for our new french database http://www.media-passion.org/

For each movie, we can find thumbnail and fanart but also discart.

Is there a way for scraper to get discart.png URL from API and write onto disc or network, next to movie file, the disc.png file ?

I suppose it's not possible as Artwork Downloader addon exist but I want to be sure.

This feature exist / did not exist / will exist ?

Thanks.
Sorry for my english, but, you know, I'm French so ...

Main HTPC : Odroid-C2 running CoreELEC with Titan Bingie
Secondary HTPC : Freebox Mini 4K running Android TV with Titan Bingie
Reply
#2
(2012-11-12, 14:21)mikebzh44 Wrote: Hi.

We are writing our new scraper for our new french database http://www.media-passion.org/

For each movie, we can find thumbnail and fanart but also discart.

Is there a way for scraper to get discart.png URL from API and write onto disc or network, next to movie file, the disc.png file ?

I suppose it's not possible as Artwork Downloader addon exist but I want to be sure.

This feature exist / did not exist / will exist ?

Thanks.

Short answer. Scrapers can not
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#3
Thanks Martijn.
Sorry for my english, but, you know, I'm French so ...

Main HTPC : Odroid-C2 running CoreELEC with Titan Bingie
Secondary HTPC : Freebox Mini 4K running Android TV with Titan Bingie
Reply
#4
Longer answer: You CAN specify it via the aspect attribute, however XBMC will not automatically detect it at scan time. It will, however, store the XML from the scrape in the database with that attribute, and hence once you set cdart on the movie item (e.g. via JSON-RPC) those cd-art items will be available for the user to select when they click on "cd-art" in the "Choose Art" dialog.

i.e. it works like this:

1. XBMC stores the <thumb> urls returned from the scraper.
2. XBMC automatically assigns the "poster", "banner", and "fanart" aspects to art (fanart is handled via <fanart> atm).
3. JSON-RPC can set arbitrary art types on videos via SetMovieDetails and the art property.
4. When the user clicks "Choose Art", then all art types available for the item in the database are listed.
5. The art type is then used to pick out the appropriate <thumb> urls to show.

Note: If you do this, then the cdart will not be available to choose in the filebrowser when the user clicks on "poster" or "banner" in the Choose Art dialog.

There's a question as to whether XBMC should read arbitrary aspect tags in the XML and assign those (first come first served). I'm open to that suggestion. It would basically mean that scrapers could automatically assign art that XBMC didn't support out of the box. Thoughts?

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#5
Good news.

So, I can write this line in the scraper XML :

Code:
<RegExp input="$$1" output="&lt;thumb aspect=&quot;discart&quot; preview=&quot;\2&quot;&gt;\1&lt;/thumb&gt;" dest="5+">

To store the information in XBMC database.

And when user will "Choose art" dialog, XBMC will give Poster-Banner-Fanart-Discart items for choice.

But if I choose Discart and then the disc image, XBMC won't store it into the right directory and save it as disc.png for movies and cdart.png for albums, right ?

That why you ask your last question ?

It could be a great feature to get discart, logo, clearart from scraper metadata Big Grin
Sorry for my english, but, you know, I'm French so ...

Main HTPC : Odroid-C2 running CoreELEC with Titan Bingie
Secondary HTPC : Freebox Mini 4K running Android TV with Titan Bingie
Reply
#6
Quote:And when user will "Choose art" dialog, XBMC will give Poster-Banner-Fanart-Discart items for choice.

Only if you've previously used JSON-RPC to add a "discart" art type for that particular item.

It will export it regardless once it's in the database. The trick is getting it into the database. The only way atm is via JSON-RPC (and only for video items).
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#7
You mean that I have to use JSON-RPC to set Discart with : VideoLibrary.SetMovieDetails

http://wiki.xbmc.org/index.php?title=JSO...vieDetails

So with a fresh scrap of a new movie, even if XML provide <thumb aspect=Discart> tag, information won't be stored into DB.

On the other hand, if I have set Discart trough JSON to a particular movie and refresh info with a new scrap with <thumb aspect=Discart> tag in XML, XBMC will update DB and will export discart as disc.png ?

For me, the perfect behaviour of XBMC should be :

- scrap a new movie (for the moment)
- get XML fro scraper
- for every <thumb> tag, get aspect= property
- if aspect didn't exist in DB, create it
- when user use "Choose art", display every available aspect found in DB for the movie
- if user choose a Discart, create or overwrite existing disc.png (naming convention) in movie folder
Sorry for my english, but, you know, I'm French so ...

Main HTPC : Odroid-C2 running CoreELEC with Titan Bingie
Secondary HTPC : Freebox Mini 4K running Android TV with Titan Bingie
Reply
#8
(2012-11-14, 10:34)jmarshall Wrote:
Quote:And when user will "Choose art" dialog, XBMC will give Poster-Banner-Fanart-Discart items for choice.

Only if you've previously used JSON-RPC to add a "discart" art type for that particular item.

It will export it regardless once it's in the database. The trick is getting it into the database. The only way atm is via JSON-RPC (and only for video items).

This is exactly what Artwork Downloader now does including the option to save the image locally too.

I retrieves the artwork list from which you can choose, you select the image you want and it sets the URL (or local path) in the database which skins are now able to use.
You can also use bulk mode to fill all movies when needed.

Problem with current scraper engine is that you need to rescrape the movie to actually update the available artwork if new ones are added.

Quote:On the other hand, if I have set Discart trough JSON to a particular movie and refresh info with a new scrap with <thumb aspect=Discart> tag in XML, XBMC will update DB and will export discart as disc.png ?
If you first set the artwork through JSON and after that you do a rescrape you will loose the ability to change the disc so you would first have to set it through JSON again to get the option to change it back.
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#9
Quote:So with a fresh scrap of a new movie, even if XML provide <thumb aspect=Discart> tag, information won't be stored into DB.

That's not what I said - take a look in your database. Notice the column with the <thumb> stuff in it. These are used when the user clicks on "Choose Art". Then go and look at the art table. Notice how some of the URLs you find there are the first URLs (of each aspect type) in the XML for <thumb>'s.

Your aspect="discart" will be stored in the column containing the <thumb> XML, just like the rest of it. The URL information for discart will not, however, be placed into the art table, and thus won't be available in the UI (skin etc.)

JSON-RPC can fill this gap by filling the art table for each item individually, independent of what is available in the <thumb> XML. Once that is done, not only will that one art URL that JSON-RPC fills be available in the UI, but in addition, your <thumb> urls will also be available for the user to choose from in the "Choose art" dialog.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#10
Thanks guys for your answers.

I'm not sure to fully understand it :S
Sorry for my english, but, you know, I'm French so ...

Main HTPC : Odroid-C2 running CoreELEC with Titan Bingie
Secondary HTPC : Freebox Mini 4K running Android TV with Titan Bingie
Reply
#11
Wouldn't a cleaner approach for the Choose Art dialog be to only automatically include posters, banners, and fanart, but allow the skin to manually include the art types it supports? So, if a skin doesn't support e.g. discart, the option won't be shown even if the item has discart set, and if the skin does support it, it'll still show an empty entry even if the item doesn't have any discart set.

If a skin asks for a specific art type to use in a view, surely the logical sequence for XBMC is:
1. Check the art table, return if found
2. Else check local folder, add to the art table and return if found
3. Else check scraped thumbs, add the first match to the art table and return
4. Else shrug and give up

You wouldn't then need to add the (potentially completely arbitrary) art types to the art table after/during the scrape, only upon skin request.
Reply
#12
You have to do it during scrape, as if it's not in the database you simply don't have it available to the skin, to JSON-RPC or to anywhere else.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#13
(2012-11-13, 23:45)jmarshall Wrote: There's a question as to whether XBMC should read arbitrary aspect tags in the XML and assign those (first come first served). I'm open to that suggestion. It would basically mean that scrapers could automatically assign art that XBMC didn't support out of the box. Thoughts?

Cheers,
Jonathan


that would be great. an additional "extra artwork" scraper would be the most user-friendly way i think.
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#14
(2012-11-15, 00:24)jmarshall Wrote: You have to do it during scrape, as if it's not in the database you simply don't have it available to the skin, to JSON-RPC or to anywhere else.
What if, then, you instead add every thumb or fanart scraped to the art table, and just add an extra field to keep them sorted per type per item, so when a skin or add-on requests a specific art type for an item, it's really just asking for the one marked number 1 among all those in the table. That way it's either there or it's not, and it doesn't matter how it got there, via scraper or through JSON-RPC. This would also allow an add-on like the artwork downloader to add multiple alternatives for each extra art type, not just one. The Choose art dialog could then just enumerate the entries from the table, and switching would just be a case of swapping out the order between the chosen art and the current.
Reply
#15
No. I've taken a look, and it's a non-trivial change. Thus, after Frodo.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply

Logout Mark Read Team Forum Stats Members Help
Add discart to scraper : possible or not ?0