• 1
  • 87
  • 88
  • 89(current)
  • 90
  • 91
  • 176
WIP Ember Media Manager 1.4.8.0 ALPHA - Discussion Thread
(2017-05-09, 16:37)axlt2002 Wrote:
(2017-04-08, 13:48)DanCooper Wrote: Yes, the uniqueid table is a part of the Kodi DB. I've tested it with a new NFO that contains multiple <uniqueid> nodes:

Call:
Code:
http://localhost:8080/jsonrpc?request={"jsonrpc":"2.0","id":"1","method":"VideoLibrary.GetTVShowDetails", "params": {"properties": ["uniqueid"], "tvshowid":10}}

Result:
Code:
{"id":"1","jsonrpc":"2.0","result":{"tvshowdetails":{"label":"Game of Thrones","tvshowid":10,"uniqueid":{"imdb":"tt0944947","unknown":"121361"}}}}

As you can see, the API tells you all saved IDs.

EDIT: tested with Kodi 17.1.

Hi Dan,

I'm slowly progressing on the development of my add-on. I have actually a question related to how "extract" the IMDb id for a TV Show after having received the following JSON Response (the starting .nfo file use the id/uniqueid structure we discussed previously):

Code:
JSON Response: {"id":1,"jsonrpc":"2.0","result":{"limits":{"end":1,"start":0,"total":1},"tvshows":[{"label":"Stranger Things","mpaa":"TV-14","rating":9,"tvshowid":1,"uniqueid":{"imdb":"tt4574334","tmdb":"66732","tvdb":"305288"},"votes":"262868"}]}}

Basically, which is the code/syntax to save in a local variable (e.g. IMDb_id) the received tt4574334 value? I have tried the following code but the result in IMDb_id is None:

Code:
for item in jSonResponse['result']['tvshows']:
             IMDb_id = item.get('uniqueid[0]')

Thanks for any help...and sorry for the stupid question, but I'm just facing JSON and python for the first time! Rolleyes

Sorry, I've no skills in Python :-(
But I would just do it with a regex:

Code:
imdb":"(tt\d{6}\d*)

Link
(2017-05-09, 16:37)axlt2002 Wrote: Basically, which is the code/syntax to save in a local variable (e.g. IMDb_id) the received tt4574334 value? I have tried the following code but the result in IMDb_id is None:

Code:
for item in jSonResponse['result']['tvshows']:
             IMDb_id = item.get('uniqueid[0]')

Thanks for any help...and sorry for the stupid question, but I'm just facing JSON and python for the first time! Rolleyes
jSonResponse.result.tvshows["0"].uniqueid.imdb

or

jSonResponse.["result"]["tvshows"][0]["uniqueid"]["imdb"]
(2017-05-09, 19:30)DanCooper Wrote:
(2017-05-09, 16:37)axlt2002 Wrote:
(2017-04-08, 13:48)DanCooper Wrote: Yes, the uniqueid table is a part of the Kodi DB. I've tested it with a new NFO that contains multiple <uniqueid> nodes:

Call:
Code:
http://localhost:8080/jsonrpc?request={"jsonrpc":"2.0","id":"1","method":"VideoLibrary.GetTVShowDetails", "params": {"properties": ["uniqueid"], "tvshowid":10}}

Result:
Code:
{"id":"1","jsonrpc":"2.0","result":{"tvshowdetails":{"label":"Game of Thrones","tvshowid":10,"uniqueid":{"imdb":"tt0944947","unknown":"121361"}}}}

As you can see, the API tells you all saved IDs.

EDIT: tested with Kodi 17.1.

Hi Dan,

I'm slowly progressing on the development of my add-on. I have actually a question related to how "extract" the IMDb id for a TV Show after having received the following JSON Response (the starting .nfo file use the id/uniqueid structure we discussed previously):

Code:
JSON Response: {"id":1,"jsonrpc":"2.0","result":{"limits":{"end":1,"start":0,"total":1},"tvshows":[{"label":"Stranger Things","mpaa":"TV-14","rating":9,"tvshowid":1,"uniqueid":{"imdb":"tt4574334","tmdb":"66732","tvdb":"305288"},"votes":"262868"}]}}

Basically, which is the code/syntax to save in a local variable (e.g. IMDb_id) the received tt4574334 value? I have tried the following code but the result in IMDb_id is None:

Code:
for item in jSonResponse['result']['tvshows']:
             IMDb_id = item.get('uniqueid[0]')

Thanks for any help...and sorry for the stupid question, but I'm just facing JSON and python for the first time! Rolleyes

Sorry, I've no skills in Python :-(
But I would just do it with a regex:

Code:
imdb":"(tt\d{6}\d*)

Link

Thanks Dan, but your correct solution doesn't fit in my add-on that is written in python. I don't know how to include the regex command in it...
Light IMDb Ratings Update - Keep updated the IMDb ratings for your movies and TV shows.
In case you found useful my work, feel free to offer me a cappuccino!
(2017-05-09, 20:16)ralfonat Wrote:
(2017-05-09, 16:37)axlt2002 Wrote: Basically, which is the code/syntax to save in a local variable (e.g. IMDb_id) the received tt4574334 value? I have tried the following code but the result in IMDb_id is None:

Code:
for item in jSonResponse['result']['tvshows']:
             IMDb_id = item.get('uniqueid[0]')

Thanks for any help...and sorry for the stupid question, but I'm just facing JSON and python for the first time! Rolleyes
jSonResponse.result.tvshows["0"].uniqueid.imdb

or

jSonResponse.["result"]["tvshows"][0]["uniqueid"]["imdb"]

Thanks for your answer ralfonat.

I have tried both solutions you proposed but the first one doesn't provide any result while the second one gives a syntax error...I'm puzzled...and stuck! Confused
Light IMDb Ratings Update - Keep updated the IMDb ratings for your movies and TV shows.
In case you found useful my work, feel free to offer me a cappuccino!
(2017-05-10, 12:45)axlt2002 Wrote:
(2017-05-09, 20:16)ralfonat Wrote:
(2017-05-09, 16:37)axlt2002 Wrote: Basically, which is the code/syntax to save in a local variable (e.g. IMDb_id) the received tt4574334 value? I have tried the following code but the result in IMDb_id is None:

Code:
for item in jSonResponse['result']['tvshows']:
             IMDb_id = item.get('uniqueid[0]')

Thanks for any help...and sorry for the stupid question, but I'm just facing JSON and python for the first time! Rolleyes
jSonResponse.result.tvshows["0"].uniqueid.imdb

or

jSonResponse.["result"]["tvshows"][0]["uniqueid"]["imdb"]

Thanks for your answer ralfonat.

I have tried both solutions you proposed but the first one doesn't provide any result while the second one gives a syntax error...I'm puzzled...and stuck! Confused

Sorry, I hit reply earlier before noticing there was a list inside the dict.

ralfonat was close, try the following instead.

Code:
jSonResponse["result"]["tvshows"][0]["uniqueid"]["imdb"]

If you're looking to loop through it in the case that the json returns multiple shows, you can use the following code to do that.

Code:
for item in jSonResponse['result']['tvshows']:
    imdb_id = item['uniqueid']['imdb']
(2017-05-10, 19:07)FordPrefect138 Wrote:
(2017-05-10, 12:45)axlt2002 Wrote:
(2017-05-09, 20:16)ralfonat Wrote: jSonResponse.result.tvshows["0"].uniqueid.imdb

or

jSonResponse.["result"]["tvshows"][0]["uniqueid"]["imdb"]

Thanks for your answer ralfonat.

I have tried both solutions you proposed but the first one doesn't provide any result while the second one gives a syntax error...I'm puzzled...and stuck! Confused

Sorry, I hit reply earlier before noticing there was a list inside the dict.

ralfonat was close, try the following instead.

Code:
jSonResponse["result"]["tvshows"][0]["uniqueid"]["imdb"]

If you're looking to loop through it in the case that the json returns multiple shows, you can use the following code to do that.

Code:
for item in jSonResponse['result']['tvshows']:
    imdb_id = item['uniqueid']['imdb']

Thanks a lot ForPerfect138!

In the meanwhile I was playing with it and found an alternative solution:

Code:
for item in jSonResponse['result']['tvshows']:
             unique_id = item.get('uniqueid')
             imdb_id = unique_id.get('imdb')

Your is definitely more streamlined. I will go for that! Wink
Light IMDb Ratings Update - Keep updated the IMDb ratings for your movies and TV shows.
In case you found useful my work, feel free to offer me a cappuccino!
is there plan to incorporate Logos/Images for Dolby Atmos and DTS:X formats when its detected that the main sound track contains these?
(2017-05-11, 10:48)jeinnor Wrote: is there plan to incorporate Logos/Images for Dolby Atmos and DTS:X formats when its detected that the main sound track contains these?
Yes. I'm already working on new flags for video sources, resolutions, video and audio codecs. I try to make a new template for all these.

Gesendet von meinem Nexus 5 mit Tapatalk
(2017-05-11, 10:54)DanCooper Wrote:
(2017-05-11, 10:48)jeinnor Wrote: is there plan to incorporate Logos/Images for Dolby Atmos and DTS:X formats when its detected that the main sound track contains these?
Yes. I'm already working on new flags for video sources, resolutions, video and audio codecs. I try to make a new template for all these.

Gesendet von meinem Nexus 5 mit Tapatalk
Hi when do you expext to have a new version ready that will fix the bug with memory leak?
Using the latest master from github and getting this error
Image
https://pastebin.com/raw/UXZbaZ7D
Happens when i click on the tv shows sections i can see a blank entry at the top of it.
I also have an issue where settings don't seem to save, well they save but as soon as you open the settings dialog again they revert back. This is annoying as hell because if i don't check before saving and exiting it messes with settings i didn't intend to change

EDIT: the first issue was fixed by simply just updating library before clicking on tv shows >.< second issue still there
(2017-05-14, 21:55)komplex Wrote: Using the latest master from github and getting this error
Image
https://pastebin.com/raw/UXZbaZ7D
Happens when i click on the tv shows sections i can see a blank entry at the top of it.
I also have an issue where settings don't seem to save, well they save but as soon as you open the settings dialog again they revert back. This is annoying as hell because if i don't check before saving and exiting it messes with settings i didn't intend to change

EDIT: the first issue was fixed by simply just updating library before clicking on tv shows >.< second issue still there

Please re-upload the log for the first error. I've to fix bugs like this.

There also should be an error logged if the settings can't be saved. Please upload it as well.
(2017-05-15, 10:04)DanCooper Wrote: Please re-upload the log for the first error. I've to fix bugs like this.

There also should be an error logged if the settings can't be saved. Please upload it as well.

https://pastebin.com/raw/bNwyFuLj errors shows up 3 times in that before i just updated library and was fine. The issue with the settings doesn't show an error in the logs at all
(2017-05-14, 15:38)Bjur Wrote:
(2017-05-11, 10:54)DanCooper Wrote:
(2017-05-11, 10:48)jeinnor Wrote: is there plan to incorporate Logos/Images for Dolby Atmos and DTS:X formats when its detected that the main sound track contains these?
Yes. I'm already working on new flags for video sources, resolutions, video and audio codecs. I try to make a new template for all these.

Gesendet von meinem Nexus 5 mit Tapatalk
Hi when do you expext to have a new version ready that will fix the bug with memory leak?

Is the bugfix included in the next version or should I go back to beta.
(2017-05-17, 12:03)Bjur Wrote:
(2017-05-14, 15:38)Bjur Wrote:
(2017-05-11, 10:54)DanCooper Wrote: Yes. I'm already working on new flags for video sources, resolutions, video and audio codecs. I try to make a new template for all these.

Gesendet von meinem Nexus 5 mit Tapatalk
Hi when do you expext to have a new version ready that will fix the bug with memory leak?

Is the bugfix included in the next version or should I go back to beta.
Good question... I'm never was able to reproduce your memory error. So there are three options:
- simply test the next release
- install VisualStudio 2017 Community edition, download the source code and try to reproduce your issue (I can help you with this if you want/need)
- go back to a version that works for you

Gesendet von meinem Nexus 5 mit Tapatalk
Okay thanks I will consider what to do. But are the BETA working absolutely fine and still have many of the same things as the alpha?
  • 1
  • 87
  • 88
  • 89(current)
  • 90
  • 91
  • 176

Logout Mark Read Team Forum Stats Members Help
Ember Media Manager 1.4.8.0 ALPHA - Discussion Thread2