Update rutor.js
Browse files
rutor.js
CHANGED
|
@@ -35,9 +35,14 @@ function extractInfoHash(magnetLink) {
|
|
| 35 |
return match ? match[1] : null;
|
| 36 |
}
|
| 37 |
|
| 38 |
-
// ✅ Removes the year from queries
|
| 39 |
function cleanQuery(query) {
|
| 40 |
-
return query
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
}
|
| 42 |
|
| 43 |
// ✅ Decodes Unicode escape sequences
|
|
|
|
| 35 |
return match ? match[1] : null;
|
| 36 |
}
|
| 37 |
|
| 38 |
+
// ✅ Removes the year and brackets from queries
|
| 39 |
function cleanQuery(query) {
|
| 40 |
+
return query
|
| 41 |
+
.replace(/\(\d{4}\)/g, '') // Removes (YYYY)
|
| 42 |
+
.replace(/\[\d{4}\]/g, '') // Removes [YYYY]
|
| 43 |
+
.replace(/\{\d{4}\}/g, '') // Removes {YYYY}
|
| 44 |
+
.replace(/\s+/g, ' ') // Replace multiple spaces with single space
|
| 45 |
+
.trim(); // Remove leading/trailing whitespace
|
| 46 |
}
|
| 47 |
|
| 48 |
// ✅ Decodes Unicode escape sequences
|