Commit 73fdecf3 authored by Bkg2k's avatar Bkg2k

improvement(scrapers): move from downloaded_images to media/images

parent ed8db326
......@@ -15,7 +15,7 @@ An example gamelist.xml:
<path>/home/pi/ROMs/nes/mm2.nes</path>
<name>Mega Man 2</name>
<desc>Mega Man 2 is a classic NES game which follows Mega Man as he murders eight robot masters in cold blood.</desc>
<image>~/.emulationstation/downloaded_images/nes/Mega Man 2-image.png</image>
<image>~/.emulationstation/media/images/nes/Mega Man 2-image.png</image>
</game>
</gameList>
```
......@@ -31,7 +31,7 @@ Reference
There are a few types of metadata:
* `string` - just text.
* `image_path` - a path to an image. This path should be either the absolute to the image, a path relative to the system games folder that starts with "./" (e.g. `./mm2_image.png`), or a path relative to the home directory that starts with "~/" (e.g. `~/.emulationstation/downloaded_images/nes/mm2-image.png`). Images will be automatically resized by OpenGL to fit the corresponding `<image>` tag in the current theme. Smaller images will load faster, so try to keep resolution low!
* `image_path` - a path to an image. This path should be either the absolute to the image, a path relative to the system games folder that starts with "./" (e.g. `./mm2_image.png`), or a path relative to the home directory that starts with "~/" (e.g. `~/.emulationstation/media/images/nes/mm2-image.png`). Images will be automatically resized by OpenGL to fit the corresponding `<image>` tag in the current theme. Smaller images will load faster, so try to keep resolution low!
* `float` - a floating-point decimal value (written as a string).
* `integer` - an integer value (written as a string).
* `datetime` - a date and, potentially, a time. These are encoded as an ISO string, in the following format: "%Y%m%dT%H%M%S%F%q". For example, the release date for Chrono Trigger is encoded as "19950311T000000" (no time specified).
......
......@@ -281,10 +281,10 @@ std::string getSaveAsPath(const ScraperSearchParams& params, const std::string&
const std::string name = params.game->getPath().stem().generic_string() + "-" + suffix;
// default dir in rom directory
std::string path = params.system->getRootFolder()->getPath().generic_string() + "/downloaded_images/";
std::string path = params.system->getRootFolder()->getPath().generic_string() + "/media/images/";
if(!boost::filesystem::exists(path) && !boost::filesystem::create_directory(path)){
// Unable to create the directory in system rom dir, fallback on ~
path = RootFolders::DataRootFolder + "/system/.emulationstation/downloaded_images/" + subdirectory + "/";
path = RootFolders::DataRootFolder + "/system/.emulationstation/media/images/" + subdirectory + "/";
}
if(!boost::filesystem::exists(path))
......
......@@ -140,8 +140,8 @@ private:
int mMaxHeight;
};
//About the same as "~/.emulationstation/downloaded_images/[system_name]/[game_name].[url's extension]".
//Will create the "downloaded_images" and "subdirectory" directories if they do not exist.
//About the same as "~/.emulationstation/media/images/[system_name]/[game_name].[url's extension]".
//Will create the "media/images" and "subdirectory" directories if they do not exist.
std::string getSaveAsPath(const ScraperSearchParams& params, const std::string& suffix, const std::string& url);
//Will resize according to Settings::getInt("ScraperResizeWidth") and Settings::getInt("ScraperResizeHeight").
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment