Skip to content

Commit cc3750a

Browse files
authored
Merge pull request #28 from alexankitty/metadata
Adds Metadata to search Revamps search Moves old table search to its own setting Removes sorting on old table search as it doesn't really function anymore Embeds old setting in the url so results are identical when sharing links Adds metadata about information Updates translations Adds an info page that will give a summary of the game, when it released, pictures, videos, gamemodes, genre, etc Added image gallery partial with youtube video embed support Adds two new environment variables for IGDB auth Automatically disables the new result interface if metadata db is empty. Adds regional cover support. Adds locale title support. Implements a task to pull all applicable metadata from IGDB. Implements full text search on metadata titles. Adds backup fuzzy search to match as many games to metadata as possible. Provides additional information on task statuses in console Moves db optimization task to be handled after metadata Adds IGDB mappings to keep platform names consistent Adds locale name to code mapping. Makes fuzzy search match run after main metadata match operation so that it doesn't delay the other database tasks unnecessarily Adds badges to point out which search experience the user is currently using. Clicking directs to the settings page where they can change their search experience. Fix suggestions by normalizing the names, and then deduplicating the results before sending them to the client
2 parents b5e3623 + 45ae6e7 commit cc3750a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+2911
-833
lines changed

.env

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ PORT=8062
22
BIND_ADDRESS=0.0.0.0
33
FORCE_FILE_REBUILD=0
44
DEBUG=0
5-
NODE_ENV=production
5+
NODE_ENV=dev
66
# Memory Impacting Settings - Trades for threading efficiency. Much slower, but should be useful for limited memory environments like VPS
77
# May also decrease 504 failure rates
88
# Changes the maximum number of jobs the crawler can queue. Setting it too high will cause a call stack overflow
@@ -13,6 +13,8 @@ MAX_FETCH_JOBS=1000
1313
INSTANCE_NAME=Myrient
1414
# Enable the built-in emulator
1515
EMULATOR_ENABLED=true
16+
# Set the hostname
17+
HOSTNAME=myrient.mahou.one
1618

1719
# Run docker-compose.dev.yml for running locally
1820
# Database Configuration
@@ -24,3 +26,7 @@ POSTGRES_PASSWORD=development
2426

2527
# Elasticsearch Configuration
2628
ELASTICSEARCH_URL=http://localhost:9200
29+
30+
#IGDB Connection Configuration - Not setting this will disable the new search page and metadata pull
31+
TWITCH_CLIENT_ID=
32+
TWITCH_CLIENT_SECRET=

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ It is finally here. There is now a way to search all of Myrient's offerings.
66
- 800MB-ish of memory for running the server
77
- HTTPS for some CORS functions to work correctly.
88

9+
# Post Metasearch update
10+
Please clear your elasticsearch instance, and possibly run a new file rebuild to ensure there are no errors after updating your docker container or pulling the repo.
11+
912
# Self-Hosting
1013

1114
## Docker Method (Recommended)
@@ -69,6 +72,12 @@ server {
6972
For the SSL certificate you can use certbot via the `certbot -d servername.tld` command and adding it to your `crontab`.
7073
[Additional Information for Certbot Setup](https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-20-04)
7174

75+
# Opengraph
76+
To ensure OpenGraph metadata embed for chat apps works correctly, please be sure to set `HOSTNAME` in `.env` or `docker-compose.yml` to the FQDN (fully qualifed domain name) of the server that is hosting the site.
77+
78+
# Metadata
79+
To enable metadata synchronize and matching, you will need to create a developer application in the [Twitch TV Developer Console](https://dev.twitch.tv/console) and then add your client id to `TWITCH_CLIENT_ID` in `.env` or `docker-compose.yml` along with adding your client secret to `TWITCH_CLIENT_SECRET`. Metadata takes about half an hour to synchronize from IGDB to your database, and about another half an hour to match via Postgres Full Text Search. Once all other database maintenance operations are done, the database will attempt to match anything that still isn't matched using a much slower fuzzy trigram search that can take up to a day to complete. These processes won't run again until a new crawl of myrient has been performed and the file count has increased.
80+
7281
# Contributing
7382
You know the usual fluff.
7483
Is there a missing category or string association? `lib/categories.json` and any of the files under `lib/json/relatedkeywords` can both updated to include these. If you do update/improve these, please put in a pull request so that it can be added to the public hosted server, as well.

config/i18n.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ console.log('Available locales:', availableLocales);
2424
i18n.configure({
2525
locales: availableLocales,
2626
defaultLocale: 'en',
27+
retryInDefaultLocale: true,
2728
directory: localesDir,
2829
objectNotation: true,
2930
updateFiles: false,

config/locales/ar.json

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,25 @@
2121
"in_seconds": "في {{seconds}} ثانية",
2222
"indexing": "جارٍ الفهرسة، إذا كان هناك شيء مفقود في القائمة، يرجى المحاولة مرة أخرى بعد بضع دقائق",
2323
"non_game_filter": "تم تفعيل فلتر المحتوى غير اللعبي",
24-
"displaying_results": "عرض النتائج من {{start}} إلى {{end}}."
24+
"displaying_results": "عرض النتائج من {{start}} إلى {{end}}.",
25+
"no_description": "لم يتم العثور على وصف.",
26+
"no_metadata": "لم يتم العثور على بيانات وصفية.",
27+
"released": "تم الإصدار:",
28+
"release_date": "تاريخ الإصدار:",
29+
"region": "المنطقة:",
30+
"platform": "المنصة:",
31+
"genre": "النوع:",
32+
"published": "الناشر:",
33+
"developed": "المطور:",
34+
"modes": "أنماط اللعب:",
35+
"download": "تحميل",
36+
"filename": "اسم الملف:",
37+
"release_group": "مجموعة الإصدار:",
38+
"upload_date": "تاريخ الرفع:",
39+
"more_info": "المزيد من المعلومات",
40+
"size": "الحجم:",
41+
"old_experience": "استخدام تجربة البحث القديمة.",
42+
"new_experience": "استخدام تجربة البحث الجديدة."
2543
},
2644
"about": {
2745
"title": "حول الموقع",
@@ -40,6 +58,10 @@
4058
"credits": {
4159
"created_by": "تم إنشاء محرك البحث بواسطة",
4260
"view_github": "عرض المشروع على GitHub"
61+
},
62+
"metadata": {
63+
"title": "معلومات البيانات الوصفية",
64+
"description": "يقوم هذا الموقع بجلب معلومات البيانات الوصفية عن الألعاب من {{metadata_source}}. قد تكون بعض البيانات الوصفية مفقودة أو غير صحيحة بسبب عدم تطابق اسم ROM أو مشاكل مع مزود الخدمة."
4365
}
4466
},
4567
"settings": {
@@ -67,8 +89,12 @@
6789
"tooltip": "يتطلب تطابق جميع الكلمات في استعلام البحث."
6890
},
6991
"hide_non_game": {
70-
"label": "إخفاء المحتوى غير اللعبي",
71-
"tooltip": "يفلتر تعديلات الـ ROM، والتصحيحات، والرسومات، والمحتويات الأخرى غير اللعبية من نتائج البحث."
92+
"label": "إخفاء المحتوى غير المتعلق بالألعاب",
93+
"tooltip": "يقوم بتصفية تعديلات ROM والتصحيحات والرسومات والمحتويات الأخرى غير المتعلقة بالألعاب من نتائج البحث."
94+
},
95+
"use_old_results": {
96+
"label": "البحث القديم",
97+
"tooltip": "يعيد توجيه بحثك إلى نتائج التنسيق الجدولي القديم. ستحمل هذه النتائج بشكل أسرع لأنها ستتجاهل سحب البيانات الوصفية."
7298
}
7399
},
74100
"save": "حفظ الإعدادات"
@@ -77,6 +103,7 @@
77103
"queries": "عدد الاستعلامات:",
78104
"files": "الملفات المعروفة:",
79105
"terms": "عدد المصطلحات:",
106+
"metadata": "الملفات مع البيانات الوصفية:",
80107
"last_crawl": "وقت آخر زحف:"
81108
},
82109
"emulator": {
@@ -106,6 +133,7 @@
106133
"download": "تنزيل",
107134
"play": "تشغيل",
108135
"not_available": "----",
136+
"not_available_tooltip": "المحاكاة عبر الويب غير متوفرة لهذا العنوان إما لأنه ليس لعبة أو لأن المنصة غير مدعومة.",
109137
"disclaimer": "يقوم هذا المحاكي بتحميل الألعاب مباشرة من {{link}}. تعرف على المزيد في صفحة {{about}}."
110138
},
111139
"results": {

config/locales/bn.json

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,25 @@
2121
"in_seconds": "{{seconds}} সেকেন্ডে",
2222
"indexing": "ইনডেক্সিং চলছে, তালিকায় কিছু অনুপস্থিত থাকলে কয়েক মিনিট পরে আবার চেষ্টা করুন",
2323
"non_game_filter": "নন-গেম কন্টেন্ট ফিল্টার সক্রিয় আছে",
24-
"displaying_results": "{{start}} থেকে {{end}} পর্যন্ত ফলাফল দেখানো হচ্ছে।"
24+
"displaying_results": "{{start}} থেকে {{end}} পর্যন্ত ফলাফল দেখানো হচ্ছে।",
25+
"no_description": "কোন বিবরণ পাওয়া যায়নি।",
26+
"no_metadata": "কোন মেটাডেটা পাওয়া যায়নি।",
27+
"released": "প্রকাশিত:",
28+
"release_date": "প্রকাশের তারিখ:",
29+
"region": "অঞ্চল:",
30+
"platform": "প্ল্যাটফর্ম:",
31+
"genre": "ধরন:",
32+
"published": "প্রকাশক:",
33+
"developed": "ডেভেলপার:",
34+
"modes": "গেমপ্লে মোড:",
35+
"download": "ডাউনলোড",
36+
"filename": "ফাইলের নাম:",
37+
"release_group": "রিলিজ গ্রুপ:",
38+
"upload_date": "আপলোডের তারিখ:",
39+
"more_info": "আরও তথ্য",
40+
"size": "সাইজ:",
41+
"old_experience": "পুরানো অনুসন্ধান অভিজ্ঞতা ব্যবহার করা হচ্ছে।",
42+
"new_experience": "নতুন অনুসন্ধান অভিজ্ঞতা ব্যবহার করা হচ্ছে।"
2543
},
2644
"about": {
2745
"title": "সম্পর্কে",
@@ -40,6 +58,10 @@
4058
"credits": {
4159
"created_by": "সার্চ ইঞ্জিন তৈরি করেছেন",
4260
"view_github": "GitHub-এ প্রকল্প দেখুন"
61+
},
62+
"metadata": {
63+
"title": "মেটাডেটা তথ্য",
64+
"description": "এই ওয়েবসাইট {{metadata_source}} থেকে গেমস সম্পর্কে মেটাডেটা তথ্য সংগ্রহ করে। ROM নামের অমিল বা পরিষেবা প্রদানকারীর সমস্যার কারণে কিছু মেটাডেটা অনুপস্থিত বা ভুল হতে পারে।"
4365
}
4466
},
4567
"settings": {
@@ -68,16 +90,21 @@
6890
},
6991
"hide_non_game": {
7092
"label": "নন-গেম কন্টেন্ট লুকান",
71-
"tooltip": "ROM হ্যাকস, প্যাচ, আর্টওয়ার্ক এবং অন্যান্য নন-গেম কন্টেন্ট অনুসন্ধান ফলাফল থেকে ফিল্টার করে।"
93+
"tooltip": "সার্চ রেজাল্ট থেকে ROM হ্যাকস, প্যাচ, আর্টওয়ার্ক এবং অন্যান্য নন-গেম কন্টেন্ট ফিল্টার করে।"
94+
},
95+
"use_old_results": {
96+
"label": "পুরানো সার্চ",
97+
"tooltip": "আপনার সার্চকে পুরানো টেবিল ফরম্যাটের রেজাল্টে রিডাইরেক্ট করে। এগুলি মেটাডেটা পুল করা এড়িয়ে যাবে তাই দ্রুত লোড হবে।"
7298
}
7399
},
74100
"save": "সেটিংস সংরক্ষণ করুন"
75101
},
76102
"footer": {
77-
"queries": "অনুসন্ধান সংখ্যা:",
78-
"files": "পরিচিত ফাইল:",
79-
"terms": "শব্দ সংখ্যা:",
80-
"last_crawl": "সর্বশেষ আপডেটের সময়:"
103+
"queries": "কোয়েরির সংখ্যা:",
104+
"files": "জানা ফাইল:",
105+
"terms": "শব্দের সংখ্যা:",
106+
"metadata": "মেটাডেটা সহ ফাইল:",
107+
"last_crawl": "সর্বশেষ ক্রল সময়:"
81108
},
82109
"emulator": {
83110
"loading": {
@@ -106,6 +133,7 @@
106133
"download": "ডাউনলোড",
107134
"play": "প্লে",
108135
"not_available": "----",
136+
"not_available_tooltip": "এই টাইটেলের জন্য ওয়েব এমুলেশন উপলব্ধ নয় কারণ এটি হয় একটি গেম নয় অথবা প্ল্যাটফর্মটি সমর্থিত নয়।",
109137
"disclaimer": "এই এমুলেটর {{link}} থেকে সরাসরি গেম লোড করে। {{about}} পৃষ্ঠায় আরও জানুন।"
110138
},
111139
"results": {

0 commit comments

Comments
 (0)