2023-01-26, 19:49
I'm trying to create a plugin that combines movies and music videos filtering both by director.
The json call VideoLibrary.GetMovies brings an expected response, but I have an error in the formulation of my json call for VideoLibrary.GetMusicVideos that I don't understand. Can anyone see what I've done wrong? Thanks!
Music video call and response:
And this is the structure I used for movies that seems to be working ok:
The json call VideoLibrary.GetMovies brings an expected response, but I have an error in the formulation of my json call for VideoLibrary.GetMusicVideos that I don't understand. Can anyone see what I've done wrong? Thanks!
Music video call and response:
json:
2023-01-26 17:42:05.635 T:18292 info <general>: script.copacetic.helper --> --> JSON CALL: {
"id": 1,
"jsonrpc": "2.0",
"method": "VideoLibrary.GetMusicVideos",
"params": {
"filter": {
"and": [
{
"field": "director",
"operator": "is",
"value": "Spike Jonze"
}
]
},
"properties": [
"title",
"artist",
"album",
"premiered",
"genre",
"dateadded",
"director",
"plot",
"fanart",
"thumbnail",
"runtime",
"file",
"dateadded"
],
"sort": {
"method": "year",
"order": "descending"
}
}
}
2023-01-26 17:42:05.635 T:18292 info <general>: script.copacetic.helper --> --> JSON RESULT: {
"error": {
"code": -32602,
"data": {
"method": "VideoLibrary.GetMusicVideos",
"stack": {
"message": "value does not match extended type Item.Fields.Base",
"name": "Item.Fields.Base",
"property": {
"type": "string"
},
"type": "array"
}
},
"message": "Invalid params."
},
"id": 1,
"jsonrpc": "2.0"
}
And this is the structure I used for movies that seems to be working ok:
json:
"id": 1,
"jsonrpc": "2.0",
"method": "VideoLibrary.GetMovies",
"params": {
"filter": {
"and": [
{
"field": "director",
"operator": "is",
"value": "Spike Jonze"
}
]
},
"properties": [
"title",
"originaltitle",
"sorttitle",
"votes",
"playcount",
"year",
"genre",
"studio",
"country",
"tagline",
"tag",
"plot",
"runtime",
"file",
"plotoutline",
"lastplayed",
"trailer",
"rating",
"ratings",
"userrating",
"resume",
"art",
"streamdetails",
"mpaa",
"director",
"premiered",
"writer",
"cast",
"dateadded",
"imdbnumber",
"set",
"setid",
"top250"
],
"sort": {
"method": "year",
"order": "descending"
}
}
}
2023-01-26 17:42:05.631 T:18292 info <general>: script.copacetic.helper --> --> JSON RESULT: {
"id": 1,
"jsonrpc": "2.0",
"result": {
"limits": {
"end": 1,
"start": 0,
"total": 1
},
"movies": [
{
"art": {
"clearlogo": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2feuFg9ZE59r6tWTq2vtjENupUdk7.svg/",
"fanart": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2fsPPsR9f4K0movWVQ99u4uMqFzEL.jpg/",
"icon": "image://DefaultVideo.png/",
"poster": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2fyk4J4aewWYNiBhD49WD7UaBBn37.jpg/"
},
"cast": [
{
"name": "Joaquin Phoenix",
"order": 0,
"role": "Theodore Twombly",
"thumbnail": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2f1UzIGSKFH0A9ouwnMwQQWUiqV2s.jpg/"
},
{
"name": "Scarlett Johansson",
"order": 1,
"role": "Samantha (voice)",
"thumbnail": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2f6bBCPmc55gzP7TR9Th4WbykrYd0.jpg/"
},
{
"name": "Amy Adams",
"order": 2,
"role": "Amy",
"thumbnail": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2fbp7PLjL2fHVuLRFsw6ccpGrGjrA.jpg/"
},
{
"name": "Rooney Mara",
"order": 3,
"role": "Catherine Klausen",
"thumbnail": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2fixcGTDGHtwaQnNLpLS1S7V01DUJ.jpg/"
},
{
"name": "Chris Pratt",
"order": 4,
"role": "Paul",
"thumbnail": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2f83o3koL82jt30EJ0rz4Bnzrt2dd.jpg/"
},
{
"name": "Olivia Wilde",
"order": 5,
"role": "Blind Date",
"thumbnail": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2f3C7ogDK7ZrpQezMxG8ILO2ILY9a.jpg/"
},
{
"name": "Matt Letscher",
"order": 6,
"role": "Charles",
"thumbnail": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2f4tFddqIAqUnPAl64sM335GhYPdM.jpg/"
},
{
"name": "Portia Doubleday",
"order": 7,
"role": "Surrogate Date Isabella",
"thumbnail": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2faCbp5EX9vC7K1N426qOfUuIByOa.jpg/"
},
{
"name": "Spike Jonze",
"order": 8,
"role": "Alien Child (voice)",
"thumbnail": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2fx2QeqEXvi3QjgTybvZ4mmqUf4qO.jpg/"
},
{
"name": "Bill Hader",
"order": 9,
"role": "Chat Room Friend #2 (voice)",
"thumbnail": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2f4VVHfaLr1InJfvlOvhbNeHJXWop.jpg/"
},
{
"name": "Kristen Wiig",
"order": 10,
"role": "SexyKitten (voice)",
"thumbnail": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2fN517EQh7j4mNl3BStMmjMN6hId.jpg/"
},
{
"name": "Artt Butler",
"order": 11,
"role": "Text Voice (voice)",
"thumbnail": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2f3s8x2L87RM1GxJCzruD0X959VFa.jpg/"
},
{
"name": "SoKo",
"order": 12,
"role": "Isabella (voice)",
"thumbnail": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2ffCG0PijoA0C7c0QoRhaJdKzp2FB.jpg/"
},
{
"name": "Brian Cox",
"order": 13,
"role": "Alan Watts (voice)",
"thumbnail": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2fyvoAgJTOvuNSPSKegcIcD62ySY9.jpg/"
},
{
"name": "Luka Jones",
"order": 14,
"role": "Mark Lewman",
"thumbnail": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2fx2C6I1GJDwI7NV43XySiKgL4JaO.jpg/"
},
{
"name": "Sam Jaeger",
"order": 15,
"role": "Dr. Johnson",
"thumbnail": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2f8t4wSekn6vUyEmg9etTnvTaGJEV.jpg/"
},
{
"name": "Pramod Kumar",
"order": 16,
"role": "Pizza Vendor",
"thumbnail": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2fwYqiXv6N5bySCwS1w7WzZo8ecRr.jpg/"
},
{
"name": "Evelyn Edwards",
"order": 17,
"role": "Mother Who Dated Pricks",
"thumbnail": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2fa50nHuroyNDNcG5scvpo3Jw91ai.jpg/"
},
{
"name": "Lil Buck",
"order": 18,
"role": "Busker / Dancer",
"thumbnail": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2fuFiVAu4qxUlxBKxXjLaC3Vg09dr.jpg/"
},
{
"name": "Lynn Adrianna",
"order": 19,
"role": "Letter Writer #1",
"thumbnail": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2fbcdoLlSCP5qfTGDSpnyvDPO7sQL.jpg/"
},
{
"name": "Lisa Renee Pitts",
"order": 20,
"role": "Letter Writer #2",
"thumbnail": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2f9b0yReVIaTkZpYetW4XIQyYfnl6.jpg/"
},
{
"name": "Gabe Gomez",
"order": 21,
"role": "Letter Writer #3"
},
{
"name": "May Lindstrom",
"order": 22,
"role": "Sexy Pregnant TV Star",
"thumbnail": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2fcVulvqw88fDwYTmt02MIiWwWtuH.jpg/"
},
{
"name": "David Azar",
"order": 23,
"role": "Theodore's Divorce Attorney",
"thumbnail": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2fpVLOqVHgEuyp3zVjK6ANkPTyDPi.jpg/"
},
{
"name": "Guy Lewis",
"order": 24,
"role": "Marriage Counselor",
"thumbnail": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2fn2xbgGENWpfYe7zgeGj4n2vi7Ty.jpg/"
},
{
"name": "Melanie Seacat",
"order": 25,
"role": "Nice Lady",
"thumbnail": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2fyfHu2TlwmHNxJRUg8sW2sKURnGg.jpg/"
},
{
"name": "Steve Zissis",
"order": 26,
"role": "New Sweet Boyfriend of Mother Who Dated Pricks",
"thumbnail": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2fhiaDKTWD9dziiMjSDbCDh7bltDU.jpg/"
},
{
"name": "Dane White",
"order": 27,
"role": "Son",
"thumbnail": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2fyIsqm2E8kz4esM69aGYBjL2vTMd.jpg/"
},
{
"name": "Nicole Grother",
"order": 28,
"role": "Daughter"
},
{
"name": "James Ozasky",
"order": 29,
"role": "Catherine's Dad",
"thumbnail": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2fsUurrHZRhKSbeEWiETWwSPZrskQ.jpg/"
},
{
"name": "Samantha Sarakanti",
"order": 30,
"role": "Mother of Newborn",
"thumbnail": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2fbAwbURnW6rxA3suBaMoqoXNeJdm.jpg/"
},
{
"name": "Gracie Prewitt",
"order": 31,
"role": "Jocelyn",
"thumbnail": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2fgNA1Qt3D2uUjQ5sDMAUl2E611UZ.jpg/"
},
{
"name": "Claudia Choi",
"order": 32,
"role": "Uncomfortable Waitress",
"thumbnail": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2fhZ4PNRl93uBoWqgXtEQtDTguYhM.jpg/"
},
{
"name": "Laura Kai Chen",
"order": 33,
"role": "Tatiana",
"thumbnail": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2fsv97fH0iXlkxt7ulV0K9wt4xFtg.jpg/"
},
{
"name": "Wendy Leon",
"order": 34,
"role": "Grocery Shopper",
"thumbnail": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2fewJzpB17FvevNVSUFzRJQ76MrGN.jpg/"
},
{
"name": "Alia Janine",
"order": 35,
"role": "Commuter",
"thumbnail": "image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2fkl2rgTYR0hjjJRXtt056W6Z30mZ.jpg/"
}
],
"country": [
"United States of America"
],
"dateadded": "2016-01-03 16:36:31",
"director": [
"Spike Jonze"
],
"file": "smb://192.168.86.62/Videos/Movies/Her (2013)/Her.2013.1080p.BluRay.disc",
"genre": [
"Romance",
"Science Fiction",
"Drama"
],
"imdbnumber": "152601",
"label": "Her",
"lastplayed": "",
"movieid": 312,
"mpaa": "15",
"originaltitle": "Her",
"playcount": 0,
"plot": "In the not so distant future, Theodore, a lonely writer, purchases a newly developed operating system designed to meet the user's every need. To Theodore's surprise, a romantic relationship develops between him and his operating system. This unconventional love story blends science fiction and romance in a sweet tale that explores the nature of love and the ways that technology isolates and connects us all.",
"plotoutline": "",
"premiered": "2013-12-18",
"rating": 7.863999843597412,
"ratings": {
"themoviedb": {
"default": true,
"rating": 7.863999843597412,
"votes": 12762
}
},
"resume": {
"position": 0.0,
"total": 0.0
},
"runtime": 7560,
"set": "",
"setid": 0,
"sorttitle": "",
"streamdetails": {
"audio": [],
"subtitle": [],
"video": []
},
"studio": [
"Warner Bros. Pictures"
],
"tag": [
"future",
"artificial intelligence",
"computer",
"loneliness",
"love",
"transhumanism",
"heartbreak",
"singularity"
],
"tagline": "A Spike Jonze Love Story",
"title": "Her",
"top250": 0,
"trailer": "plugin://plugin.video.youtube/?action=play_video&videoid=ne6p6MfLBxc",
"userrating": 0,
"votes": "12762",
"writer": [
"Spike Jonze"
],
"year": 2013
}
]
}
}