Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Javascript evaluation:ReferenceError: rating is not defined #3327

Open
ProtagNeptune opened this issue Nov 22, 2024 · 2 comments
Open
Assignees
Labels
Milestone

Comments

@ProtagNeptune
Copy link

It just stops writing the metadata to my .xmp. 😕

[04:42:43.728][Info] Loading image from `https://realbooru.com/images/fd/05/fd05385fa4f31d522b8ec4fed0396088.webm` 1
[04:42:43.730][Info] Not enough information to directly load the image (from blacklist: 0 / from file url: 0 / from filename tags: 1/2)
[04:42:43.730][Info] Loading image details from `https://realbooru.com/index.php?page=post&s=view&id=821545`
[04:42:44.090][Info] Loading and saving image from `https://realbooru.com/images/fd/05/fd05385fa4f31d522b8ec4fed0396088.webm` in `C:\Users\jelly\Grabber\#Monitors\JackTheRipper\vid\fd05385fa4f31d522b8ec4fed0396088.webm`
[04:42:45.299][Info] Error in Javascript evaluation:ReferenceError: rating is not defined
@ProtagNeptune
Copy link
Author

ProtagNeptune commented Nov 22, 2024

image
Grabber_3FJQFBTbtX

XMP:TagsList

javascript:
'artist/'+artist.replace(/([,;])+/g,'_').replace(/([_]{2,})+/g,'_').replace(/(@#&)+/g,';artist/').toLowerCase()+';'+
'copyright/'+copyright.replace(/([,;])+/g,'_').replace(/([_]{2,})+/g,'_').replace(/(@#&)+/g,';copyright/').toLowerCase()+';'+
'character/'+character.replace(/([,;])+/g,'_').replace(/([_]{2,})+/g,'_').replace(/(@#&)+/g,';character/').toLowerCase()+';'+
'meta/'+meta.replace(/([,;])+/g,'_').replace(/([_]{2,})+/g,'_').replace(/(@#&)+/g,';meta/').toLowerCase()+';'+
'model/'+model.replace(/([,;])+/g,'_').replace(/([_]{2,})+/g,'_').replace(/(@#&)+/g,';model/').toLowerCase()+';'+
'general/'+general.replace(/([,;])+/g,'_').replace(/([_]{2,})+/g,'_').replace(/(@#&)+/g,';general/').toLowerCase()+';'+
'orientation/'+((width>height)?'landscape':(width==height)?'square':(width<height)?'portrait':'nothing')+';'+
'rating/'+((rating=='safe')?'general':rating)+';'+
'time/'+date.getFullYear().toString()+'/'+(date.getMonth()+1).toString().padStart(2,'0')+'/'+date.getDate().toString().padStart(2,'0')+';'+
'tool/'+'imgbrd-grabber/'+'nightly/'+'73f6cc0'+';'+
'type/'+ext+';'+'website/'+website

@ProtagNeptune
Copy link
Author

ProtagNeptune commented Nov 22, 2024

I tried changing it:

javascript:
'artist/'+artist.replace(/([,;])+/g,'_').replace(/([_]{2,})+/g,'_').replace(/(@#&)+/g,';artist/').toLowerCase()+';'+
'copyright/'+copyright.replace(/([,;])+/g,'_').replace(/([_]{2,})+/g,'_').replace(/(@#&)+/g,';copyright/').toLowerCase()+';'+
'character/'+character.replace(/([,;])+/g,'_').replace(/([_]{2,})+/g,'_').replace(/(@#&)+/g,';character/').toLowerCase()+';'+
'meta/'+meta.replace(/([,;])+/g,'_').replace(/([_]{2,})+/g,'_').replace(/(@#&)+/g,';meta/').toLowerCase()+';'+
'model/'+model.replace(/([,;])+/g,'_').replace(/([_]{2,})+/g,'_').replace(/(@#&)+/g,';model/').toLowerCase()+';'+
'general/'+general.replace(/([,;])+/g,'_').replace(/([_]{2,})+/g,'_').replace(/(@#&)+/g,';general/').toLowerCase()+';'+
'orientation/'+((width>height)?'landscape':(width==height)?'square':(width<height)?'portrait':'nothing')+';'+
'rating/'+((rating=='safe'|rating=='general')?'general':(rating=='questionable')?'questionable':(rating=='explicit')?'explicit':'unknown')+';'+
'time/'+date.getFullYear().toString()+'/'+(date.getMonth()+1).toString().padStart(2,'0')+'/'+date.getDate().toString().padStart(2,'0')+';'+
'tool/'+'imgbrd-grabber/'+'nightly/'+'73f6cc0'+';'+
'type/'+ext+';'+'website/'+website

But I got the same error:

[21:23:53.532][Info] Loading image from https://realbooru.com/images/fd/05/fd05385fa4f31d522b8ec4fed0396088.webm 1
[21:23:53.558][Info] Not enough information to directly load the image (from blacklist: 0 / from file url: 0 / from filename tags: 1/2)
[21:23:53.559][Info] Loading image details from https://realbooru.com/index.php?page=post&s=view&id=821545
[21:23:53.756][Info] Loading and saving image from https://realbooru.com/images/fd/05/fd05385fa4f31d522b8ec4fed0396088.webm in C:\Users\jelly\Grabber\#Monitors\JackTheRipper\vid\fd05385fa4f31d522b8ec4fed0396088.webm
[21:23:53.796][Info] Error in Javascript evaluation:<br/>ReferenceError: rating is not defined

@Bionus Bionus added this to the 7.13.0 milestone Nov 24, 2024
@Bionus Bionus self-assigned this Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants