Author Topic: AllMovie Url in custom items  (Read 10856 times)

0 Members and 1 Guest are viewing this topic.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2743
    • View Profile
AllMovie Url in custom items
« on: June 08, 2010, 07:25:07 pm »
Question:
Is it possible to add or switch AllMovie Url in custom items.

I try fix it myself at work but I only write the URL address and not the url as a hyperlink or other URL.
I changed this:
Code: [Select]
//Get URL
 EndPos := Pos('">Overview</a>', HTML);
 if EndPos > 0 then begin
  curPos := PrevPos('<a href="', HTML, EndPos);
  AddFieldValue(mfURL, Copy(HTML, curPos + 9, EndPos - curPos - 9));
 end else

  //AddFieldValue(mfURL, MovieURL); // Changed to:
AddCustomFieldValueByName('AMG Url', MovieURL);  

I wonder what it would be necessary to add or change the url to act as a hyperlink or other URL.

[attachment deleted by admin]
« Last Edit: June 12, 2010, 11:03:51 am by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: AllMovie Url in custom items
« Reply #1 on: June 08, 2010, 10:45:15 pm »
If you remove AddFieldValue(mfURL, MovieURL);, the URL will not be added to the URL field and the script will not be able to update the record without searching for it again. I suppose you could modify the script to use the new field, but I don't have a clue how to do that.

To display a URL as a hyperlink, use a memo field.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2743
    • View Profile
Re: AllMovie Url in custom items
« Reply #2 on: June 09, 2010, 04:44:41 am »
Thanks.
URL is not a problem because I use the original AllMovioe script and AllMovie + (Ivek23) script.
This change I wanted to do in AllMovie + (Ivek23) script where you can do a hyperlink
Quote
To display a URL as a hyperlink, use a memo field.
but since the update with a new search function me that this update remove the hyperlink.
Quote
If you remove AddFieldValue(mfURL, MovieURL);, the URL will not be added to the URL field and
the script will not be able to update the record without searching for it again.
Yes it is true.

In the future I will try maybe find a solution.

« Last Edit: June 14, 2010, 05:51:54 am by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2743
    • View Profile
Re: AllMovie Url in custom items
« Reply #3 on: June 09, 2010, 08:08:30 pm »
I did not change this
Code: [Select]
//Get URL
 EndPos := Pos('">Overview</a>', HTML);
 if EndPos > 0 then begin
  curPos := PrevPos('<a href="', HTML, EndPos);
  AddFieldValue(mfURL, Copy(HTML, curPos + 9, EndPos - curPos - 9));
 end else

  //AddFieldValue(mfURL, MovieURL); // Changed to:
.

I just changed this
Code: [Select]
AddCustomFieldValueByName('AMG Url', '<link>'+ MovieURL + TmpStr1 + '</link>');.

I came to this result, as seen in attached images.It is not a hyperlink and the URL is not work.
Who may have some idea of chance how this might give way to edit.

I helped a little bit of DVD releases code here.

[attachment deleted by admin]
« Last Edit: June 09, 2010, 08:17:21 pm by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2743
    • View Profile
Re: AllMovie Url in custom items
« Reply #4 on: June 10, 2010, 04:29:41 pm »
Here is a solution :

Code: [Select]
//Get URL
 EndPos := Pos('">Overview</a>', HTML);
 if EndPos > 0 then begin
  curPos := PrevPos('<a href="', HTML, EndPos);
    AddFieldValue(mfURL, Copy(HTML, curPos + 9, EndPos - curPos - 9));
 end else

  //AddFieldValue(mfURL, MovieURL); // Changed to:
AddCustomFieldValueByName('AMG Url', '<link url="' + MovieURL + '">Url For Movie</link>');
or
Code: [Select]
//Get URL
 EndPos := Pos('">Overview</a>', HTML);
 if EndPos > 0 then begin
  curPos := PrevPos('<a href="', HTML, EndPos);
    AddFieldValue(mfURL, Copy(HTML, curPos + 9, EndPos - curPos - 9));
 end else

  //AddFieldValue(mfURL, MovieURL); // Changed to:
AddCustomFieldValueByName('Url', '<link url="' + MovieURL + '">Url For Movie</link>');

Work,I have tested and show pictures attached.


Even this
Code: [Select]
//Get URL
 EndPos := Pos('">Overview</a>', HTML);
 if EndPos > 0 then begin
  curPos := PrevPos('<a href="', HTML, EndPos);
  AddFieldValue(mfURL, Copy(HTML, curPos + 9, EndPos - curPos - 9));
 end else

  //AddFieldValue(mfURL, MovieURL); // Changed to:
AddCustomFieldValueByName('AMG Url', MovieURL);

//Get URL
 EndPos := Pos('">Overview</a>', HTML);
 if EndPos > 0 then begin
  curPos := PrevPos('<a href="', HTML, EndPos);
    AddFieldValue(mfURL, Copy(HTML, curPos + 9, EndPos - curPos - 9));
 end else

  //AddFieldValue(mfURL, MovieURL); // Changed to:
AddCustomFieldValueByName('Url', '<link url="' + MovieURL + '">Url For Movie</link>');
 
like this added together, I have tested ,work,
and show pictures 1 attached.

[attachment deleted by admin]
« Last Edit: June 11, 2010, 05:53:43 am by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2743
    • View Profile
Re: AllMovie Url in custom items
« Reply #5 on: June 14, 2010, 09:32:10 pm »
Now I found a partially correct code for AllMovie Url:

This code
Code: [Select]
//Get URL
 EndPos := Pos('">Overview</a>', HTML);
 if EndPos > 0 then begin
  curPos := PrevPos('<a href="', HTML, EndPos);
    AddFieldValue(mfURL, Copy(HTML, curPos + 9, EndPos - curPos - 9));
 end else

  //AddFieldValue(mfURL, MovieURL); // Changed to:
AddCustomFieldValueByName('Url', '<link url="' + MovieURL + '">Url For Movie</link>');
works properly but can not display AllMovie Url.

This code
Code: [Select]
//Get URL
 EndPos := Pos('">Overview</a>', HTML);
 if EndPos > 0 then begin
  curPos := PrevPos('<a href="', HTML, EndPos);
    AddFieldValue(mfURL, Copy(HTML, curPos + 9, EndPos - curPos - 9));
 end else

  //AddFieldValue(mfURL, MovieURL); // Changed to:
AddCustomFieldValueByName('Url', '<link url="' + MovieURL + '">' + MovieURL + '</link>');
is working properly and it appears that AllMovie Url.

Attached are pictures to prove it is indeed shown AllMovie Url.
I apologize for the first scan picture Before AllMovie Url logo can be seen as Portable Appz so I added an additional figure.

If you remove AddFieldValue(mfURL, MovieURL);, the URL will not be added to the URL field and the script will not be able to update the record without searching for it again. I suppose you could modify the script to use the new field, but I don't have a clue how to do that.

To display a URL as a hyperlink, use a memo field.

Rick.ca here is a partial answer to the second part of the reply(quote).
Quote
I suppose you could modify the script to use the new field, but I don't have a clue how to do that.

In the first part still attached to the reply(quote).
Quote
If you remove AddFieldValue(mfURL, MovieURL);, the URL will not be added to the URL field and the script will not be able to update the record without searching for it again.
Quote
To display a URL as a hyperlink, use a memo field.
Only by hand not automatically.

[attachment deleted by admin]
« Last Edit: June 15, 2010, 06:55:53 am by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2743
    • View Profile
Re: AllMovie Url in custom items
« Reply #6 on: June 15, 2010, 03:06:14 pm »
Final solution:
Code: [Select]
//Get URL
 EndPos := Pos('">Overview</a>', HTML);
 if EndPos > 0 then begin
  curPos := PrevPos('<a href="', HTML, EndPos);
  AddFieldValue(mfURL, Copy(HTML, curPos + 9, EndPos - curPos - 9));
 end else
  AddFieldValue(mfURL, MovieURL);

//Get URL
 EndPos := Pos('">Overview</a>', HTML);
 if EndPos > 0 then begin
  curPos := PrevPos('<a href="', HTML, EndPos);
    AddFieldValue(mfURL, Copy(HTML, curPos + 9, EndPos - curPos - 9));
 end else

  //AddFieldValue(mfURL, MovieURL); // Changed to:
AddCustomFieldValueByName('Url', '<link url="' + MovieURL + '">' + MovieURL + '</link>');

The first part of the code is changed back to original
Code: [Select]
AddFieldValue(mfURL, MovieURL); // Changed to:
AddCustomFieldValueByName('AMG Url', MovieURL);
changed to original
Code: [Select]
AddFieldValue(mfURL, MovieURL);
another piece of code is added to the new.
Code: [Select]
//Get URL
 EndPos := Pos('">Overview</a>', HTML);
 if EndPos > 0 then begin
  curPos := PrevPos('<a href="', HTML, EndPos);
    AddFieldValue(mfURL, Copy(HTML, curPos + 9, EndPos - curPos - 9));
 end else

  //AddFieldValue(mfURL, MovieURL); // Changed to:
AddCustomFieldValueByName('Url', '<link url="' + MovieURL + '">' + MovieURL + '</link>');

Quote
If you remove AddFieldValue(mfURL, MovieURL);, the URL will not be added to the URL field and the script will not be able to update the record without searching for it again.

Now, the record be updated without a new search.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2743
    • View Profile
Re: AllMovie Url in custom items
« Reply #7 on: June 06, 2012, 03:11:11 pm »
A better and simple solution:
The URL is added to the url field as well as the custom field.


Code: [Select]
//Get URL
 EndPos := Pos('">Overview</a>', HTML);
 if EndPos > 0 then begin
  curPos := PrevPos('<a href="', HTML, EndPos);
  AddFieldValue(mfURL, Copy(HTML, curPos + 9, EndPos - curPos - 9));
 end else
  AddFieldValue(mfURL, MovieURL);
 AddCustomFieldValueByName('Url', '<link url="' + MovieURL + '">' + MovieURL + '</link>');
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


 

anything