mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-15 10:15:54 -07:00
Use slice as substring deprecated
This commit is contained in:
parent
a0b719f5a5
commit
74e7a94cd7
1 changed files with 1 additions and 1 deletions
|
|
@ -175,7 +175,7 @@ const tmdbApi = async (filename, api_key, axios) => {
|
||||||
let fileName;
|
let fileName;
|
||||||
// If filename begins with tt, it's already an imdb id
|
// If filename begins with tt, it's already an imdb id
|
||||||
if (filename) {
|
if (filename) {
|
||||||
if (filename.substring(0, 2) === 'tt') {
|
if (filename.slice(0, 2) === 'tt') {
|
||||||
fileName = filename;
|
fileName = filename;
|
||||||
} else {
|
} else {
|
||||||
const idRegex = /(tt\d{7,8})/;
|
const idRegex = /(tt\d{7,8})/;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue