Skip to content

Commit

Permalink
feat(monika): add subtitle to search result
Browse files Browse the repository at this point in the history
  • Loading branch information
fzlins committed Feb 23, 2023
1 parent 45732af commit 497cf80
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions resource/schemas/UNIT3D/getSearchResult.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
options.isLogged = true;

this.haveData = true;
this.site = options.site;
}

/**
Expand Down Expand Up @@ -213,6 +214,10 @@
* @param {*} row
*/
getSubTitle(title, row) {
let subTitle = Searcher.getFieldValue(this.site, row, "subTitle");
if (subTitle) {
return subTitle;
}
return "";
}

Expand Down
7 changes: 6 additions & 1 deletion resource/sites/monikadesign.uk/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@
"collaborator": "fzlins",
"searchEntryConfig": {
"merge": true,
"resultSelector": "#torrent-list-table"
"resultSelector": "#torrent-list-table",
"fieldSelector": {
"subTitle": {
"selector": ["td.torrent-listings-overview span:first"]
}
}
}
}

0 comments on commit 497cf80

Please sign in to comment.