mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-09 15:38:19 -07:00
Improve regex to actually match IMDB ids (#196)
This commit is contained in:
parent
621998d8b8
commit
b797c50b31
1 changed files with 2 additions and 2 deletions
|
|
@ -10,7 +10,7 @@ const details = () => ({
|
|||
(requires TMDB api key) and English.
|
||||
'Native' languages are the ones that are listed on imdb. It does an API call to
|
||||
Radarr, Sonarr to check if the movie/series exists and grabs the IMDB id. As a last resort it
|
||||
falls back to '[imdb-ttDIGITS] in the filename.`,
|
||||
falls back to the IMDB id in the filename.`,
|
||||
Version: '1.00',
|
||||
Link: 'https://github.com/HaveAGitGat/Tdarr_Plugins/blob/master/Community/'
|
||||
+ 'Tdarr_Plugin_henk_Keep_Native_Lang_Plus_Eng.js',
|
||||
|
|
@ -139,7 +139,7 @@ const tmdbApi = async (filename, api_key, axios) => {
|
|||
if (filename.substr(0, 2) === 'tt') {
|
||||
fileName = filename;
|
||||
} else {
|
||||
const idRegex = /\[imdb-(tt\d*)]/;
|
||||
const idRegex = /tt\d*/;
|
||||
const fileMatch = filename.match(idRegex);
|
||||
// eslint-disable-next-line prefer-destructuring
|
||||
if (fileMatch) fileName = fileMatch[1];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue