mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-09 07:29:04 -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;
|
||||
// If filename begins with tt, it's already an imdb id
|
||||
if (filename) {
|
||||
if (filename.substring(0, 2) === 'tt') {
|
||||
if (filename.slice(0, 2) === 'tt') {
|
||||
fileName = filename;
|
||||
} else {
|
||||
const idRegex = /(tt\d{7,8})/;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue