Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DB Backend PR #12

Open
wants to merge 80 commits into
base: db-backend
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
bc2dfc9
Added SQLite3 to the project.
Aloshi Nov 26, 2014
b20b3eb
Initial work for the SQLite database replacement.
Aloshi Nov 28, 2014
02e91a3
Merge branch 'unstable' into gamelistdb
Aloshi Dec 6, 2014
6ae49e9
Refactored SystemData into SystemData + SystemManager.
Aloshi Dec 22, 2014
1449ab1
Redesigned GamelistDB to store all data in a single table.
Aloshi Dec 27, 2014
0abae19
GamelistDB now handles metadata format changes automatically (e.g. wh…
Aloshi Dec 27, 2014
c0bc2ea
GamelistDB starting to be integrated into SystemManager.
Aloshi Dec 27, 2014
2013215
Added Boost.Regex dependency.
Aloshi Dec 28, 2014
60a52e6
THE GREAT FILEDATA REWRITE OF CHRISTMAS 2014
Aloshi Dec 29, 2014
e501450
Sort support.
Aloshi Jan 8, 2015
35370a4
Fixed FileType/MetaDataListType confusions.
Aloshi Jan 8, 2015
68348ed
Added "IMPORT XML" option to the "SCRAPER" menu.
Aloshi Jan 8, 2015
a99b2e2
Fixed another metadatalisttype/filetype test.
Aloshi Jan 8, 2015
3e50413
Fixed updateExists(system) not actually working.
Aloshi Jan 8, 2015
52ed0ea
Specify FileType in FileData constructor.
Aloshi Jan 9, 2015
bb303c1
Merge branch 'unstable' into gamelistdb
Aloshi Jan 11, 2015
7150e8d
Merge branch 'master' into gamelistdb
Aloshi Jan 15, 2015
4c4fb5e
Fix build errors on Linux.
Aloshi Jan 17, 2015
c0e0f4d
Merge branch 'master' into gamelistdb
Aloshi Feb 10, 2015
44fd9d6
Merge branch 'master' into gamelistdb
Aloshi Mar 3, 2015
c52fcb1
Added automatic gamelist.xml import prompt.
Aloshi Mar 3, 2015
10a59b4
Merge branch 'master' into gamelistdb
Aloshi Mar 3, 2015
1a5b916
Added time conversion for import/export XML.
Aloshi Mar 4, 2015
7635f11
Merge branch 'master' into gamelistdb
Aloshi Mar 6, 2015
ccbf432
Prevent stripping parentheses
jgeumlek Dec 24, 2015
8ec3c0a
switch to gamelistdb
jgeumlek Dec 24, 2015
59a170d
Make DateTimeComponent match time format stored in the database
jgeumlek Dec 25, 2015
c58afe1
Clip the text list selector bar
jgeumlek Dec 25, 2015
11dce75
Pop up text list if selection overflows the boundary
jgeumlek Dec 25, 2015
5e7c53d
Revert clipping box due to bug with slide animation
jgeumlek Dec 25, 2015
44e631e
Quick/Dirty case insensitive sort.
jgeumlek Dec 25, 2015
f9264bc
Combine the two menus roughly for now. Let "start" also start games.
jgeumlek Dec 26, 2015
68924d0
Make Menus cyclic, only slightly hackish
jgeumlek Dec 26, 2015
7a2c65f
Comment out access to the commented out Jump-To-Letter feature
jgeumlek Dec 26, 2015
6b193b4
Fix saving folder metadata to database
jgeumlek Dec 26, 2015
56dcbf3
Restructure the combined contextual/global menu, including quick acce…
jgeumlek Dec 27, 2015
871f506
Make file system scans a menu action rather than automatic, shortenin…
jgeumlek Dec 27, 2015
60fd82c
Make prompt more consistent
jgeumlek Dec 27, 2015
048082a
Store invalid times as NULLs in the database
jgeumlek Dec 28, 2015
1f63858
Improve sorting options
jgeumlek Dec 28, 2015
78c33df
Update details appropriately when on a non-game entry
jgeumlek Dec 28, 2015
497ac8d
More spacing on datetime in metadata editor. Workaround for DateTimeC…
jgeumlek Dec 28, 2015
80b5fbf
Add a little feedback to the database scan
jgeumlek Dec 28, 2015
2caabc3
Make Scraper more consistent with Database menu
jgeumlek Dec 28, 2015
d39b660
Add virtual boy platform id + scraping
jgeumlek Dec 28, 2015
fccdd44
Make rating component go up by half stars
jgeumlek Dec 28, 2015
b1c8962
Add ability to remove an entry from the database without deleting the…
jgeumlek Dec 28, 2015
28087e5
Improve sorting options
jgeumlek Dec 28, 2015
a18e491
Initial support for having filters
jgeumlek Dec 29, 2015
9b7c3b6
Make game details update on list creation, like when entering a folde…
jgeumlek Dec 29, 2015
8d3ed08
minor string fixes
jgeumlek Dec 29, 2015
f9db04c
Add rough UI for creating a filter
jgeumlek Dec 29, 2015
5f0c52d
Switch fully to the SQLite date time string format
jgeumlek Dec 29, 2015
2615bbf
Remove fractional seconds to macth sqlite native date time
jgeumlek Dec 29, 2015
8ca8070
Make filtering games by year of release easier
jgeumlek Dec 29, 2015
90c42ab
Add in construction of tags table
jgeumlek Dec 29, 2015
a65ab54
Update sqlite so that we may successfully create the useful tags view
jgeumlek Dec 29, 2015
ddb71fb
Add a quick terrible UI for adding/removing tags in the metadata editor
jgeumlek Dec 29, 2015
7aa3bb1
Add some rough behavior on empty list viewing
jgeumlek Dec 29, 2015
49cb4ec
whoops
jgeumlek Dec 29, 2015
6582811
fix the addition of a folders-first setting
jgeumlek Dec 29, 2015
d9a9ab6
Continue unwinding even if we somehow get back to the root
jgeumlek Dec 29, 2015
7671d2a
Add a setting for whether folders/filters should float to the top
jgeumlek Dec 29, 2015
0ebaef2
Add secret setting "MakeCombinedSystem" to show the true power of the…
jgeumlek Dec 29, 2015
bef2083
Add default value for MakeCombinedSystem
jgeumlek Dec 29, 2015
dee6d8b
Fix some database silliness
jgeumlek Dec 29, 2015
359eb18
Refactor some more computations as queries
jgeumlek Dec 30, 2015
fd38659
Missed an ORDER BY
jgeumlek Dec 30, 2015
4f2207d
Add a random sort for fun.
jgeumlek Dec 31, 2015
0356f7d
Change the default filter name to something slightly more reasonable
jgeumlek Dec 31, 2015
08665ef
Make RatingComponent avoid introducing spurious changes
jgeumlek Dec 31, 2015
3174edc
Make single-line text edits a little more intuitive
jgeumlek Dec 31, 2015
12e65a2
Add some metadata cache. Might need tweaking on systems of limited me…
jgeumlek Dec 31, 2015
88c2f48
Make gamelists slide animation wrap around like the system select does
jgeumlek Jan 2, 2016
9ab8bfb
Make FileData cache the metadata from the database, ensure it gets cl…
jgeumlek Jan 2, 2016
a13d5a0
Hard set some values just in case an aborted slide launch left us wei…
jgeumlek Jan 2, 2016
99ef2e8
Add floating point fuzz to rating component half-star updates, and ce…
jgeumlek Jan 2, 2016
9cac5c5
Rearrange editing menu
jgeumlek Jan 4, 2016
251195a
Replace hidden MakeCombinedSystem with ability to put filters on systems
jgeumlek Feb 21, 2016
eb4de84
quick DB bug fixes
jgeumlek Mar 10, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ RelWithDebInfo
CMakeCache.txt
CMakeFiles
cmake_install.cmake
CPackConfig.cmake
CPackSourceConfig.cmake
Makefile
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ set(COMMON_LIBRARIES
${CURL_LIBRARIES}
pugixml
nanosvg
sqlite3
)

#add ALSA for Linux
Expand Down
359 changes: 244 additions & 115 deletions data/converted/star_filled_svg.cpp

Large diffs are not rendered by default.

509 changes: 323 additions & 186 deletions data/converted/star_unfilled_svg.cpp

Large diffs are not rendered by default.

59 changes: 48 additions & 11 deletions data/resources/star_filled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 48 additions & 17 deletions data/resources/star_unfilled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 7 additions & 8 deletions es-app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ project("emulationstation")

set(ES_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/src/EmulationStation.h
${CMAKE_CURRENT_SOURCE_DIR}/src/ESException.h
${CMAKE_CURRENT_SOURCE_DIR}/src/FileData.h
${CMAKE_CURRENT_SOURCE_DIR}/src/FileSorts.h
${CMAKE_CURRENT_SOURCE_DIR}/src/MetaData.h
${CMAKE_CURRENT_SOURCE_DIR}/src/PlatformId.h
${CMAKE_CURRENT_SOURCE_DIR}/src/ScraperCmdLine.h
${CMAKE_CURRENT_SOURCE_DIR}/src/SystemData.h
${CMAKE_CURRENT_SOURCE_DIR}/src/SystemManager.h
${CMAKE_CURRENT_SOURCE_DIR}/src/VolumeControl.h
${CMAKE_CURRENT_SOURCE_DIR}/src/Gamelist.h
${CMAKE_CURRENT_SOURCE_DIR}/src/GamelistDB.h

# GuiComponents
${CMAKE_CURRENT_SOURCE_DIR}/src/components/AsyncReqComponent.h
Expand All @@ -18,14 +18,14 @@ set(ES_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextListComponent.h

# Guis
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiFastSelect.h
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMetaDataEd.h
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGameScraper.h
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGamelistOptions.h
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMenu.h
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiSettings.h
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMulti.h
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperStart.h
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiRefreshDatabase.h

# Scrapers
${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/Scraper.h
Expand All @@ -48,30 +48,29 @@ set(ES_HEADERS

set(ES_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/src/FileData.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/FileSorts.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/MameNameMap.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/MetaData.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/PlatformId.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/ScraperCmdLine.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/SystemData.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/SystemManager.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/VolumeControl.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/Gamelist.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/GamelistDB.cpp

# GuiComponents
${CMAKE_CURRENT_SOURCE_DIR}/src/components/AsyncReqComponent.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/components/RatingComponent.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/components/ScraperSearchComponent.cpp

# Guis
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiFastSelect.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMetaDataEd.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGameScraper.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGamelistOptions.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMenu.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiSettings.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMulti.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperStart.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiRefreshDatabase.cpp

# Scrapers
${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/Scraper.cpp
Expand Down
41 changes: 41 additions & 0 deletions es-app/src/ESException.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#pragma once

#include <exception>
#include <sstream>

class ESException : public std::exception
{
public:
const char* what() const throw() override
{
return mMsg.c_str();
}

template<typename T>
friend ESException& operator<<(ESException& e, const T& msg);

// for some reason gcc claims that "ESException()" has the type
// "ESException", but not the type "ESException&", so...this.
template<typename T>
friend ESException operator<<(ESException e, const T& msg);
private:
std::string mMsg;
};

template<typename T>
ESException& operator<<(ESException& e, const T& appendMsg)
{
std::stringstream ss;
ss << e.mMsg << appendMsg;
e.mMsg = ss.str();
return e;
}

template<typename T>
ESException operator<<(ESException e, const T& appendMsg)
{
std::stringstream ss;
ss << e.mMsg << appendMsg;
e.mMsg = ss.str();
return e;
}
Loading