Help with script - substring needed
Posted: 2019-02-05 21:30:55
I have been using a script to generate .NFO for long time now.
Basically it saved the full IMDB url in the URL field.
I now moved from Plex to Emby (about time) and emby required the .nfo to contain something like this:
Considering I can get the full URL easily with this:
Which gives me this:
How would I go extracting the tt0085400 reference only instead than the full URL?
The sources can be either called e.g.:
https://www.imdb.com/title/tt0085400/?ref_=fn_al_tt_2
or
https://www.imdb.com/title/tt0085400
(two type of URL format are saved as far as I can tell)
Thanks!!!
Basically it saved the full IMDB url in the URL field.
I now moved from Plex to Emby (about time) and emby required the .nfo to contain something like this:
Code: Select all
<imdbid>ttxxxxxxx</imdbid>
Code: Select all
FormatedData := FormatedData +' <imdbid>'+GetField(fieldUrl)+'</imdbid>'+#13#10;
Code: Select all
<imdbid>https://www.imdb.com/title/tt0085400</imdbid>
The sources can be either called e.g.:
https://www.imdb.com/title/tt0085400/?ref_=fn_al_tt_2
or
https://www.imdb.com/title/tt0085400
(two type of URL format are saved as far as I can tell)
Thanks!!!