filter json results into image path

我怕爱的太早我们不能终老 提交于 2020-01-03 04:26:05

问题


Hello i am using MIT App Inventor 2 to make an app that runs on an old (spare) android phone to display the folder.jpg of currently playing movie (later on I also want to do that with music).

I can't filter the path to use, for example this is the result of the json:

{"id":"VideoGetItem","jsonrpc":"2.0","result":{"item":{"id":1,"label":"2012","thumbnail":"image://F%3a%5cMovies%5c2012%5cfolder.jpg/","type":"movie"}}}

I want to keep: image://F%3a%5cMovies%5c2012%5cfolder.jpg which is the dvd cover (and maybe the label: 2012 which is the title of the movie).

I tried various options like making a list but then I still get text with lot of params between '()'
Can someone help me with this?
Thanks


回答1:


Use the JSON decode block together with the lookup in pairs block. As you can see, it helps to use Do it...




回答2:


I have something that is doing it for me for starters.

I see a flaw but that's in Kodi(.tv) itself (I am not a fan of the library system in kodi, so I put a folder.jpg in every drawer of a movie, but sometimes kodi doesn't display it and presents me with a video preview of the movie, I have to sort that out with kodi developers)

For now I am glad I have it working,

solution picture



来源:https://stackoverflow.com/questions/33125326/filter-json-results-into-image-path

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!