Author Topic: Additional rating and batch of PVD  (Read 28699 times)

0 Members and 3 Guests are viewing this topic.

Online Ivek23

  • Global Moderator
  • *****
  • Posts: 2710
    • View Profile
Additional rating and batch of PVD
« on: March 04, 2010, 04:43:47 pm »
Questions to be added or more additional rating and batch in PVD, namely an additional rating for MovieMeter (NL)and Zelluloid (DE) and batch plugin for IMDB AllMovie + MovieMeter + Zelluloid or batch plugin for IMDB + MovieMeter,IMDB + Zelluloid.

 Greetings,Ivek23
« Last Edit: March 04, 2010, 07:21:23 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 rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Additional rating and batch of PVD
« Reply #1 on: March 04, 2010, 08:20:46 pm »
There's already an Additional Rating field that you can configure to be used by one of those plugins. It's unlikely another one will be added. You could add a custom rating field, but plugins would not be able to use it. A custom rating field can be used by a script, however. So you can store the AllMovie rating in a custom field, and one of the other ones in Additional Rating.

Batch files are user-created. Those provided are only examples. Examine any .batch file in the Plugins directory, and create your own using the same format.

Online Ivek23

  • Global Moderator
  • *****
  • Posts: 2710
    • View Profile
Re: Additional rating and batch of PVD
« Reply #2 on: March 04, 2010, 09:06:28 pm »
Sorry but the additional rating box AllMovie already applied for or is already in use it would need at least one or two additional rating, one for MovieMeter and one for Zelluloid.

Basic rating but for IMDB Rating.

Greetings and thank you Rick.ca
Ivek23
« Last Edit: March 04, 2010, 09:17:33 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 rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Additional rating and batch of PVD
« Reply #3 on: March 04, 2010, 10:01:24 pm »
Quote
the additional rating box AllMovie already applied for or is already in use it

That was my point. The AllMovie script can be modified to use a custom rating field, freeing Additional Rating for use by one of the plugins.

This is from the AllMovie script:
Code: [Select]
//Rating
 curPos := PosFrom('<img src="/img/st_r', HTML, EndPos);
 if curPos > 0 then begin
  curPos := PosFrom('alt="', HTML, curPos) + 5;
  EndPos := PosFrom(' ', HTML, curPos);
 
  AddFieldValue(mfRating, FloatToStr(StrToFloat(Copy(HTML, curPos, EndPos - curPos)) * 2)); 
 
  LogMessage('Rating:' + Copy(HTML, curPos, EndPos - curPos));
 end else
  curPos := EndPos;

This is how the same section has been modified in my AllMovie+ script to use a custom rating field named "AllMovie rating":
Code: [Select]
//Rating
 AddCustomFieldValueByName('AllMovie rating', '0');
 curPos := PosFrom('<img src="/img/st_r', HTML, EndPos);
 if curPos > 0 then begin
  curPos := PosFrom('alt="', HTML, curPos) + 5;
  EndPos := PosFrom(' ', HTML, curPos);
 
  AddCustomFieldValueByName('AllMovie rating', FloatToStr(StrToFloat(Copy(HTML, curPos, EndPos - curPos)) * 2)); 
   
 end else
  curPos := EndPos;

Online Ivek23

  • Global Moderator
  • *****
  • Posts: 2710
    • View Profile
Re: Additional rating and batch of PVD
« Reply #4 on: March 05, 2010, 07:03:34 am »
Thanks to your help I Allmovie script processed and running, but I was wondering if there is a script Zelluloiud similarly processed.

Thanks
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: Additional rating and batch of PVD
« Reply #5 on: March 05, 2010, 07:32:48 am »
Sorry, I didn't notice Zelluloid is also a script. So, yes, you should be able to make a similar modification to it—to use a custom field instead of Rating.

Online Ivek23

  • Global Moderator
  • *****
  • Posts: 2710
    • View Profile
Re: Additional rating and batch of PVD
« Reply #6 on: March 05, 2010, 07:53:45 am »
Thank you and wherever it is possible to get and how you do this in script
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Online Ivek23

  • Global Moderator
  • *****
  • Posts: 2710
    • View Profile
Re: Additional rating and batch of PVD
« Reply #7 on: March 05, 2010, 02:33:30 pm »
Here is Allmovie script, which I arranged through rick.ca and named allmovie 1, that is not deleted in normal allmovie script.Copies plugins file where you installed your PVD.Custom field and make AllMovie Rating Rating box and add, that's it, that you have specifically Allmovie rating over line for the File Path and it will further rating still has empty.In this::Import on the toolbar will see the two items Get movie information from Allmovie.com where the men first Custom field box and the other for an additional rating, but I recommend testing only these.

Appendix: allmovie 1.psf
               screenshot.zip

Greetings
Ivek23

[attachment deleted by admin]
« Last Edit: March 05, 2010, 04:33:18 pm by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


buah

  • Guest
Re: Additional rating and batch of PVD
« Reply #8 on: March 05, 2010, 06:12:17 pm »
Thanks for this I'll try it, Ivek. As I can see in your screenshots you're using Serbian language dialogs?

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Additional rating and batch of PVD
« Reply #9 on: March 05, 2010, 07:33:36 pm »
Quote
you have specifically Allmovie rating over line for the File Path and it will further rating still has empty.

The skin can be customized to group the ratings together, and place them anywhere. The attached illustrates my use of the Additional Rating field for FilmAffinity and a custom field for AllMovie.

[attachment deleted by admin]

Online Ivek23

  • Global Moderator
  • *****
  • Posts: 2710
    • View Profile
Re: Additional rating and batch of PVD
« Reply #10 on: March 05, 2010, 08:35:41 pm »
Yes,I'm using Serbian language dialogs,but custom field I'm using Slovenian
language dialogs because I am Slovenian
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: Additional rating and batch of PVD
« Reply #11 on: March 05, 2010, 10:32:08 pm »
You can use your own translation file simply by naming it custom.lng. The program will load that on startup, instead of the designated language file.

Why don't you use the Slovenian language file you created?

Online Ivek23

  • Global Moderator
  • *****
  • Posts: 2710
    • View Profile
Re: Additional rating and batch of PVD
« Reply #12 on: March 05, 2010, 11:46:11 pm »
rick.ca, I am not a computer expert to create and write computer programs and all that goes with the advice sorry but I learn so I also sent Slovenian Lang file to another to be able to understand and edit, I was only to help others

I translated the lang file and renamed custom.lng and copied by the PVD folder, there was nothing, please tell me what to do
« Last Edit: March 06, 2010, 12:08:17 am by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


buah

  • Guest
Re: Additional rating and batch of PVD
« Reply #13 on: March 06, 2010, 12:23:55 am »
I totally understand Ivek. He has 3 choices:
1. To use Serbian language until next release.
2. To manually retype .lng.
3. To (learn how to) parse .lng and than to copy/paste from .rc

Ivek, it's not enough to rename .rc to .lng, if you edit both you'll see they're different. Here you can find "How-to".

Cheers
« Last Edit: March 06, 2010, 12:26:29 am by buah »

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Additional rating and batch of PVD
« Reply #14 on: March 06, 2010, 12:42:18 am »
Thanks for clarifying, buah. I'd forgotten there are minor differences in the files. Nevertheless, is converting a .rc to a .lng not still straightforward? Perhaps what I'm missing is the two are interchangeable only if the translation is based on english.rc—because custom.lng must use the same line numbers. :-\

buah

  • Guest
Re: Additional rating and batch of PVD
« Reply #15 on: March 06, 2010, 01:12:35 am »
You're welcome Rick.

Yes, the difference between non-english rc and lng  is in numbering lines.

Online Ivek23

  • Global Moderator
  • *****
  • Posts: 2710
    • View Profile
Re: Additional rating and batch of PVD
« Reply #16 on: March 06, 2010, 08:14:45 am »
I will remain as at present:

1. To use Serbian language until next release.
« Last Edit: March 06, 2010, 08:48:49 am by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Online Ivek23

  • Global Moderator
  • *****
  • Posts: 2710
    • View Profile
Re: Additional rating and batch of PVD
« Reply #17 on: March 06, 2010, 08:41:27 am »
In the movie skin pvd_classic_movie .xml I changed this
Code: [Select]
 <row>
  <column width="120" halign="right">
   <fieldlabel field="imdbrating" width="118" wordwrap="true" halign="right"/>
  </column>
  <column>
<imdbrating/>
  </column>
 </row>
 
 <row>
  <column width="120" halign="right">
   <orname width="118" wordwrap="true" halign="right">
         <font>
          <bold></bold>
          <size>8</size>
</font>
</orname>
  </column>
  <column>
<orating/>
  </column>
 </row>
 
        <row>
  <column width="120" halign="right">
   <fieldlabel field="orating"/>
  </column>
  <column>
            <rating/>
  </column>
 </row>  
 
 <row>
  <column width="120" halign="right">
   <fieldlabel field="orating"/>
  </column>
  <column>
<rating/>
  </column>
 </row>
    
 <row>
  <column width="120" halign="right">
   <fieldlabel field="rating"/>
  </column>
  <column>
<rating/>
  </column>
 </row>  

I got an additional rating, however I was wondering what to do instead of an additional rating drafted to Allmovie rating  or Moviemeter rating and instead of manual entry to do this automatically

Add image to Serbian and English lang

Cheers


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


Online Ivek23

  • Global Moderator
  • *****
  • Posts: 2710
    • View Profile
Re: Additional rating and batch of PVD
« Reply #18 on: March 06, 2010, 07:23:52 pm »
I'm interested in is to what to do in this
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: Additional rating and batch of PVD
« Reply #19 on: March 06, 2010, 10:54:35 pm »
Use orating only for one additional rating coming from a plugin. Create custom rating fields (at Preferences - Movies - Custom items) for any number of additional ratings from scripts. Edit the scripts to use the custom fields. Edit your skin to add the custom fields. To illustrate, this is the applicable section of my skin...

Code: [Select]
<row>
<column>
<label width="132" halign="right">
 <caption>...rating:</caption>
 </label>
 <spacer width="7"/>
 <imdbrating/>
 </column>
<column>
<label width="133" halign="right">
 <caption>Released:</caption>
 </label>
 <spacer width="7"/>
 <rdate/>
 </column>
 </row>
<row>
<column>
<label width="132" halign="right">
 <caption>FilmAffinity:</caption>
 </label>
 <spacer width="7"/>
 <orating/>
 </column>
<column>
<label width="133" halign="right">
 <caption>Added:</caption>
 </label>
 <spacer width="7"/>
 <dateadded width="115"/>
 </column>
 </row>
<row>
<column>
<label width="132" halign="right">
 <caption>AllMovie:</caption>
 </label>
 <spacer width="7"/>
 <custom field="AllMovie rating"/>
 </column>
<column>
<label width="133" halign="right">
 <caption>Modified:</caption>
 </label>
 <spacer width="7"/>
 <moddate width="115"/>
 </column>
 </row>
<row>
<column>
<label width="132" halign="right">
 <caption>rick.ca:</caption>
 </label>
 <spacer width="7"/>
 <rating/>
 </column>
<column>
<label width="133" halign="right">
 <caption>Viewed:</caption>
 </label>
 <spacer width="7"/>
<viewdate>
<font>
 <color>$800000</color>
 </font>
 </viewdate>
 </column>
 </row>

Try not to be confused by the fact this displays a second column of dates which is not relevant to your question (see screen shot). Also, I have given orating a caption of "FilmAffinity" instead using the standard Fieldlabel which should work fine (I probably didn't like the format). The relevant part is where my custom field AllMovie rating has been added.

[attachment deleted by admin]

 

anything