24. How to control Information Fetching in MediaLibrary 1.5.x Shop

In this article we will take a closer look at how to control Information Fetching in MediaLibrary 1.5.x Shop.


Fetching information from Amazon in MediaLibrary 1.5.x Shop


When you set the Media Information fetching in [Settings Backend] to an Amazon host with the [Default host] entry, then the Media details will be fetched from that Amazon host at each page reload.

This is certainly not desirable in the long run, especially since the MediaLibrary 1.5.x Shop will also pull in the Amazon Media descriptions from Amazon.com, which you can then edit to your liking.

Leaving the [Fetch Information:] entry for the Media set to an Amazon server would then mean that the information you edited is overwritten (because of the new information fetch at the next page reload). From hosts other than Amazon.com, when the Media description is not available through AWS, your Media description entered would then be overwritten by a blank page again at the next page refresh.

So after retrieving the Media info, it is recommend to set the [Fetch Information:] field to "On your own" 

Downloading Media information or not

Put in very short and sweet terms, the idea behind MediaLibrary information fetching is this:

When a Media's [Fetch Information:] option is set to "Amazon host":

Fetches all information and cover from Amazon at every page load

When a Media's [Fetch Information:] option is set to "On your own":

Fetches all information and cover from your own server at each page load.

The only exception to this is the Media cover image. You have to specify that you want to use the locally saved cover! See below.


Manual Media entry in MediaLibrary 1.5.x Shop has one very simple principle:

As soon as you set [Fetch Information:] to [On your own], then ALL fields become freely changeable for manual entry.

The practical way to enter Medias

Fetch the initial info and cover from Amazon (filling in only MediaID, ISBN/ASIN and Category)

Set the Media's [Fetch Information:] field to "On your own"

Edit the Media (title, author, description, etc.)

Indicate that you want to use the locally saved cover with the [Local cover] button

Save your entry

Now all your edited data remains as you put it, until the next time you set the Media to fetch information from Amazon. More explanation below. The added advantage is that your pages will also load much faster, because they don't have to retrieve the Media details from Amazon every time.

Remark:

When you choose to set [Fetch Information:] to [On your own], then ALL fields become freely editable and therefore must be filled in by hand to make a difference. For example, the cover image path will continue to point to the Amazon image, until you set it to a local path!

The standard path for the covers is

/components/com_MediaLibrary/covers

The cover images follow the ISBN/ASIN entered for the Media, so will become ISBN/ASIN_random_number.jpg for example 0470376031_324676788.jpg.

Which means that to set the local Media cover path you would enter:

/components/com_MediaLibrary/covers/0470376031_324676788.jpg

In versions earlier then 1.5.3 Shop you had to set this path manually after choosing "On your own"

From version 1.5.3 onward there is a button provided inside the Media edit page to set the path to the local cover image automatically.


Using local database entries and local covers instead of fetching from Amazon

To avoid issues with data being overwritten when a Media entry has been edited by you, we recommend the following procedure:

In [Settings Backend] set [Download Covers:] to "YES".

This will save a copy of the Media cover in a local folder on your server and make sure you have the cover available after you change the Medias Information Fetching property to "On your own" after editing.

In [Settings Backend] set the [Default host:] to "On your own"

In [Media Manager] enter your Medias manually or through the import functions

Select the Medias for which you want to fetch information, and click the [Refetch Information] button. You will get an option to choose the Amazon server of your choice in the next screen.

Select the Amazon server you want, and then click [Fetch Information] again. You will see a screen with the result of the fetching.

Now click [Cancel] or go directly to the [Media Manager]

Select each Media, edit the information to your liking.

IMPORTANT: set the [Fetch Information:] dropdown box to "On your own".

IMPORTANT: use the button [Set Local Cover Path] inside the Media edit page to set the path to the locally saved Media cover.

Then save your Media details when you are done editing.

Your edited Media information is now locked from [Refetch Information] overwrites until you choose to [Refetch] again.

This will ensure that Media details and covers will now be taken from the local database tables and local cover location instead of from Amazon at each page refresh.

Your pages will also load much faster, because they don't have to retrieve the Media details from Amazon every time

What are you looking for?
Anti-spam question: How many eyes has a typical person?