YAMJ / yamj-v3

Main Project for YAMJ v3
11 stars 7 forks source link

add rating in API/index/video results #203

Closed jluc2808 closed 9 years ago

jluc2808 commented 9 years ago

add the rating value in the results return by api/index/video

either as a common value either as a dataitems option

Omertron commented 9 years ago

Already exists, use dataitems=rating

jluc2808 commented 9 years ago

i don't thing so , dataitems isn't implemented with api/index/video

tested with dataitems=rating and no rating results is returned

Omertron commented 9 years ago

Are you sure there are ratings for that movie?

SELECT * FROM videodata_ratings WHERE videodata_id=???
jluc2808 commented 9 years ago

SELECT * FROM videodata_ratings WHERE videodata_id=98 have rating=65

i'm using api/index/video.json?type=movie,series&sortby=title&sortdir=ASC&artwork=poster&watched=all&dataitems=rating

and there is no rating returned for any video in the list and i'm sure that all video have rating

modmax commented 9 years ago

For the video index there are no other dataitems, than that in the objects. Reason: The index could contain video,series,seaso and all together in a mix. With a single query you can also return all vides at once.

The "additional" dataitems, which are not contains in the video table (like that is the fact for plot or outline), nithing is retrieved. This is teh same for genres, studios, certifications and even ratings.

You can retrieve the ratings for each single video, bit not within a complete index.

jluc2808 commented 9 years ago

yes for a single movie, but what i want to do is to display the rating of each video on the movie wall itself (like in yamjv2) , so if i follow your response i will have to generate for each video on the wall a single request to fetch rating i don't think this method is fair

modmax commented 9 years ago

Following data items can now also be loaded with the index:

But be aware, that loading of this data which a hugh amount of videos in the index will take a while; cause for every video in the index the values must be reloaded from the database.

jluc2808 commented 9 years ago

yes for a single movie, but what i want to do is to display the rating of each video on the movie wall itself (like in yamjv2) , so if i follow your response i will have to generate for each video on the wall a single request to fetch rating i don't think this method is fair

jluc2808 commented 9 years ago

tested with rating ==> OK warning the correct syntax is &dataitems=rating (not ratings)

modmax commented 9 years ago

My fault ... little misspelling ... :-)

tested with rating ==> OK warning the correct syntax is &dataitems=rating (not ratings)

— Reply to this email directly or view it on GitHub https://github.com/YAMJ/yamj-v3/issues/203#issuecomment-122131189.