Skip to content

Commit

Permalink
feat(new site): fearnopeer
Browse files Browse the repository at this point in the history
  • Loading branch information
techmovie committed Mar 11, 2024
1 parent 578e2c5 commit d551afb
Show file tree
Hide file tree
Showing 7 changed files with 146 additions and 79 deletions.
141 changes: 71 additions & 70 deletions SUPPORTED.md
Original file line number Diff line number Diff line change
@@ -1,70 +1,71 @@
| Site name | Source(supports transfer) | Target(allows transfer) |
| :-------: | :-----------------------: | :---------------------: |
| 1PTBA |||
| 3Wmg |||
| 52pt |||
| ACM |||
| Aither |||
| Audiences |||
| AvistaZ |||
| Bdc |||
| BTN |||
| BTSCHOOL |||
| BeiTai |||
| BeyondHD |||
| Blutopia |||
| BYR |||
| CHDBits |||
| Cinematik |||
| CinemaZ |||
| DicMusic |||
| DiscFan |||
| EMP |||
| FBCD |||
| GPW |||
| HaresClub |||
| HD4FANS |||
| HDAI |||
| HDArea |||
| HDAtmos |||
| HDBits |||
| HDChina |||
| HDDolby |||
| HDFans |||
| HDHome |||
| HDMaYi |||
| HDPOST |||
| HDRoute |||
| HDSpace |||
| HDT |||
| HDTime |||
| HDU |||
| HDZone |||
| HH |||
| iTS |||
| KEEPFRDS |||
| KG |||
| MTeam |||
| MTV |||
| NPUBits |||
| NYPT |||
| OurBits |||
| PrivateHD |||
| PTHome |||
| PTMSG |||
| PTN |||
| PTP |||
| PTSBAO |||
| PTer |||
| PuTao |||
| RED |||
| SC |||
| SPEEDAPP |||
| SSD |||
| SoulVoice |||
| TCCF |||
| TeamHD |||
| TJUPT |||
| TLF |||
| TTG |||
| UHDBits |||
| Site name | Source(supports transfer) | Target(allows transfer) |
| :--------: | :-----------------------: | :---------------------: |
| 1PTBA |||
| 3Wmg |||
| 52pt |||
| ACM |||
| Aither |||
| Audiences |||
| AvistaZ |||
| Bdc |||
| BTN |||
| BTSCHOOL |||
| BeiTai |||
| BeyondHD |||
| Blutopia |||
| BYR |||
| CHDBits |||
| Cinematik |||
| CinemaZ |||
| DicMusic |||
| DiscFan |||
| EMP |||
| FBCD |||
| fearnopeer |||
| GPW |||
| HaresClub |||
| HD4FANS |||
| HDAI |||
| HDArea |||
| HDAtmos |||
| HDBits |||
| HDChina |||
| HDDolby |||
| HDFans |||
| HDHome |||
| HDMaYi |||
| HDPOST |||
| HDRoute |||
| HDSpace |||
| HDT |||
| HDTime |||
| HDU |||
| HDZone |||
| HH |||
| iTS |||
| KEEPFRDS |||
| KG |||
| MTeam |||
| MTV |||
| NPUBits |||
| NYPT |||
| OurBits |||
| PrivateHD |||
| PTHome |||
| PTMSG |||
| PTN |||
| PTP |||
| PTSBAO |||
| PTer |||
| PuTao |||
| RED |||
| SC |||
| SPEEDAPP |||
| SSD |||
| SoulVoice |||
| TCCF |||
| TeamHD |||
| TJUPT |||
| TLF |||
| TTG |||
| UHDBits |||
2 changes: 1 addition & 1 deletion src/components/Container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { getQuickSearchUrl } from './common';
const Container = () => {
const [settingPanelOpen, setSettingPanelOpen] = useState(false);
const isNexusPHP = CURRENT_SITE_INFO.siteType.match(/NexusPHP|AvistaZ/) ||
CURRENT_SITE_NAME?.match(/BeyondHD|TTG|Blutopia|HDPOST|Aither|ACM|KG|iTS|MDU|LST/);
CURRENT_SITE_NAME?.match(/BeyondHD|TTG|Blutopia|HDPOST|Aither|ACM|KG|iTS|MDU|LST|fearnopeer/);
const isHDB = CURRENT_SITE_NAME === 'HDBits';
const baseTitleClass = ['title-td'];
const baseContentClass = ['easy-seed-td'];
Expand Down
2 changes: 1 addition & 1 deletion src/components/UploadSiteList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const getGPWGroupId = async (imdbUrl:string|undefined) => {
};
const UploadSiteList = () => {
const handleSiteClickEvent = async (url:string) => {
if (url.match(/hdpost|blutopia|asiancinema|monikadesign|lst/)) {
if (url.match(/hdpost|blutopia|fearnopeer|asiancinema|monikadesign|lst/)) {
const catMap = {
movie: '1',
tv: '2',
Expand Down
58 changes: 58 additions & 0 deletions src/config/fearnopeer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
url: https://fearnopeer.com
host: fearnopeer.com
siteType: UNIT3D
icon: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAPoAAAD6AG1e1JrAAACnklEQVR4nK1UO0hjURA9KRIw6EOUYIgWaqVRMRjBQtFnWgujkCLgBwsRERRMZZIiiJqAKIiVqPgjLAiSNJqPIClsBBtFxC4WtjYr2OlZ5vKy7Kq7G1wHhvvevJnz5pw79wIfmwWADmADwBWA7wBejPXKiOtG3j/NBsADIAwgBSAP4BnAq7HmjXjYyLP9CcgEoAxA0ChiEZ438suM+t9Mgt8APBYJVvBHo67sLc3gJ8D4C2iwQN9saFEszb/R9wigbrVaQ1VVVWxoaGBLS4vy1tZWut1utZaWlr4DqK2tVXlNTU2qrq6ujpqmhQRww263p0dGRnh0dMREIsHd3V3u7OwwmUxyb29PFQmIyWSixWJRz0tLS8xms9zf3+fy8jLX19fp8XjSAnitaVq+v7+ft7e3jMVibGxspNlspnRdUlKingXE4XBQfizvq6urzGQyHB8fZ2VlJS8vL7m1tSW08VRdXf08Pz/P+/t7lej3+xVdKQwEApyYmGB9fT1dLhcPDg5ot9t5eHjIeDzOrq4uFX94eODi4qLMKV6cTufr8fExb25uVPuDg4NKF5vNxlwux7OzMw4PD7O3t5fb29tsb29X3Z2cnHB6eprBYJCbm5vs6emR4cdTR0fHs4CJhkJJqIpWAiBFqVSKKysrnJycVBRHR0d5fn6u9J6ZmeHs7Czb2tqkRnV43dfXl7+7u+PU1BQrKip+7mIkEuHc3BwHBga4tramKIoUIsvFxQXHxsbej47P59uIRqPp09NTRaWwi6LT0NAQu7u71dh4vV6Gw2G1YQsLCwpU1/W3gGl0dnbqbrc71NzcTKvVqkZDPgqwaFiYwfLyctbU1Khdl+7FNU17Cxj68KQUQD97Ur78LMOwL71txL78PizYf93YPwA8btamn3E35AAAAABJRU5ErkJggg==
asSource: true
asTarget: true
uploadPath: /torrents/create?category_id=1
needDoubanInfo: true
seedDomSelector: .torrent__buttons+.panelV2
search:
path: /torrents
replaceKey:
- tt
- ''
params:
name: '{name}'
imdbId: '{imdb}'
sortField: size
name:
selector: '#title'
description:
selector: '#bbcode-description'
imdb:
selector: '#autoimdb'
tmdb:
selector: '#autotmdb'
mediaInfo:
selector: textarea[name="mediainfo"]
anonymous:
selector: .form__group input[type="checkbox"][name="anon"]
category:
selector: '#browsecat'
map:
movie: '1'
tv: '2'
tvPack: '2'
videoType:
selector: '#autotype'
map:
uhdbluray: '1'
bluray: '1'
remux: '3'
encode: '12'
web: '4'
hdtv: '6'
dvd: '1'
dvdrip: '12'
other: ''
resolution:
selector: '#autores'
map:
4320p: '11'
2160p: '1'
1080p: '2'
1080i: '3'
720p: '5'
576p: '6'
480p: '8'
4 changes: 2 additions & 2 deletions src/source/unit3d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default async () => {
.siblings('.table-responsive').find('.panel-body').clone();
descriptionDom.find('#collection_waypoint').remove();
let mediaInfoOrBDInfo = $('.decoda-code code').text();
if (CURRENT_SITE_NAME.match(/Blutopia|Aither/i)) {
if (CURRENT_SITE_NAME.match(/Blutopia|Aither|fearnopeer/i)) {
const title = $('.meta__title').text().trim();
movieName = title.replace(/\(.+\)/g, '');
IMDBYear = title.match(/\((\d{4})\)/)?.[1] ?? '';
Expand Down Expand Up @@ -114,7 +114,7 @@ const getBasicInfo = () => {
Resolution: 'Resolution',
resolution: 'Resolution',
};
if (!CURRENT_SITE_NAME.match(/Blutopia|Aither/i)) {
if (!CURRENT_SITE_NAME.match(/Blutopia|Aither|fearnopeer/i)) {
const lineSelector = $('#meta-info+.meta-general>.panel:has(".table-responsive"):first table tr');
lineSelector.each((index, element) => {
const key = $(element).find('td:first').text().replace(/\s|\n/g, '');
Expand Down
10 changes: 5 additions & 5 deletions src/target/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,15 @@ export default class ExportHelper {

if (CURRENT_SITE_NAME.match(/HDRoute|HDSpace/)) {
$(imdbSelector).val(imdbId?.replace('tt', '') ?? '');
} else if (CURRENT_SITE_NAME.match(/Blutopia|HDPOST|ACM|Aither|Concertos|MDU|LST/)) {
} else if (CURRENT_SITE_NAME.match(/Blutopia|fearnopeer|HDPOST|ACM|Aither|Concertos|MDU|LST/)) {
let tmdbId = '';
const fillIMDBId = this.currentSiteInfo.siteType === 'UNIT3D' ? imdbId.replace('tt', '') : imdbId;
$(imdbSelector).val(fillIMDBId);
getTMDBIdByIMDBId(imdbId).then(data => {
tmdbId = data.id;
$(this.currentSiteInfo.tmdb.selector).val(tmdbId);
});
if (CURRENT_SITE_NAME.match(/Blutopia|Aither|MDU|LST/)) {
if (CURRENT_SITE_NAME.match(/Blutopia|fearnopeer|Aither|MDU|LST/)) {
$('#torrent').on('change', () => {
$(imdbSelector).val(fillIMDBId);
$(this.currentSiteInfo.tmdb.selector).val(tmdbId);
Expand Down Expand Up @@ -179,7 +179,7 @@ export default class ExportHelper {
}

if (this.currentSiteInfo.mediaInfo) {
if (CURRENT_SITE_NAME.match(/^(Blutopia|Aither|MDU)/)) {
if (CURRENT_SITE_NAME.match(/^(Blutopia|fearnopeer|Aither|MDU)/)) {
const selector = isBluray ? 'textarea[name="bdinfo"]' : this.currentSiteInfo.mediaInfo.selector;
$(selector).val(mediaInfo);
description = description.replace(mediaInfo.trim(), '');
Expand Down Expand Up @@ -222,7 +222,7 @@ export default class ExportHelper {
}
}
// Blutopia可以通过设置为显示缩略图
if (CURRENT_SITE_NAME.match(/Blutopia|Aither|MDU/)) {
if (CURRENT_SITE_NAME.match(/Blutopia|fearnopeer|Aither|MDU/)) {
if (this.info.sourceSite === 'PTP') {
description = buildPTPDescription(this.info);
}
Expand All @@ -242,7 +242,7 @@ export default class ExportHelper {
}
}

if (CURRENT_SITE_NAME.match(/Blutopia|Aither/)) {
if (CURRENT_SITE_NAME.match(/Blutopia|fearnopeer|Aither/)) {
description = description.replace(/\[align(=(.+?))\]((.|\n)+?)\[\/align\]/g, '[$2]$3[/$2]');
description = description.replace(/\[(\/)?hide(?:=(.+?))?\]/g, (match, p1, p2) => {
const slash = p1 || '';
Expand Down
8 changes: 8 additions & 0 deletions src/target/site-operations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ export const SITE_OPERATIONS = {
return info;
},
},
fearnopeer: {
titleHandler: (info:TorrentInfo.TargetTorrentInfo) => {
const isWebSource = !!info.source.match(/web/gi);
const title = fixTorrentTitle(info.title, isWebSource);
info.title = title;
return info;
},
},
Aither: {
titleHandler: (info:TorrentInfo.TargetTorrentInfo) => {
const isWebSource = !!info.source.match(/web/gi);
Expand Down

0 comments on commit d551afb

Please sign in to comment.