Kodi Community Forum

Full Version: Android TV Recommendations
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Are there any plans to work on integrating the recommendations android TV service in kodi?
Android TV has a shelf with recommendations, from where a user can directly play content.
Ideally kodi can push on that shelf latest movies and tv shows (like the widgets).

https://developer.android.com/training/t...tions.html
Will you give it a shot? (i know you are very familiar with our codebase already) Smile
I am not that familiar with Android though... so it will take longer than it should Big Grin

So, then there are no immediate plans for this feature?
I have a poc, but I'm not very convinced...
Problem is which 3 vids to put there?
Hello,

i created an app that does exactly that. It accesses the SQLite database from the kodi userdata folder on the storage device and displays the data in the search and recommendations. Currently it only takes movies into account but can be extended for tv series.

You can download the apk and source (a bit quirky) here:
https://github.com/redeye86/kodi-recomme...android-tv

You have to reboot once to initiate the recommendation processing.


For the recommendations it currently uses movies with high imdb rating, new movies and movies that were stopped during playback. In the readme i outlined some more ideas to refine this system, e.g. analyze previously watched or searched movies and look for other movies with the same actors, roles, directors, genres...

For the series it makes sense to show the respective next episode or a similar series when the last episode was reached.
(2015-10-27, 23:59)redeye86 Wrote: [ -> ]Hello,

i created an app that does exactly that. It accesses the SQLite database from the kodi userdata folder on the storage device and displays the data in the search and recommendations. Currently it only takes movies into account but can be extended for tv series.

You can download the apk and source (a bit quirky) here:
https://github.com/redeye86/kodi-recomme...android-tv

You have to reboot once to initiate the recommendation processing.


For the recommendations it currently uses movies with high imdb rating, new movies and movies that were stopped during playback. In the readme i outlined some more ideas to refine this system, e.g. analyze previously watched or searched movies and look for other movies with the same actors, roles, directors, genres...

For the series it makes sense to show the respective next episode or a similar series when the last episode was reached.

:/
I know this is the simpler way, but we need this in core. And third partys going through our database via direct access is also something, thats causing trouble.
Yeah.Then the problem comes that Kodi must be running to be able to access the DB in JSON-RPC, which is a bit against Android architecture, which would assume a running service providing this info.

We ideally need to be able to start headless, then switch to GUI. Not obvious...
(2015-10-28, 12:16)Razze Wrote: [ -> ]:/
I know this is the simpler way, but we need this in core. And third partys going through our database via direct access is also something, thats causing trouble.

Yes definitely, thats why i provided the source code. I was playing around with the global search and recommendations for another project anyway so i implemented this for kodi.


I also had a look at the kodi sources but i am completely unfamiliar with the NDK-stuff. But i guess we need some java components here anyway as at least an android content provider is needed. This could in turn use some JNI to access the database using the native database access code.


For now it shouldn't make big problems to access the sqlite files directly as it opens the database file in read only-mode and closes the database handle immediately after access. As far as i could see during a library scan, sqlite creates a journal file when another process accesses the file and merges the changes into the database after that.

The app only tries to write when it was unable to find a poster url for a movie in the database and has found one using a rest api. But this is basically just a caching to reduce load on the rest servers that could also go to another file.
@redeye86 Thanks for your efforts. Will surely be useful whatever the way to reach backend.
Hey @redeye86

Cool idea with the app.

I had a similar thought not long ago, about having recommendations for Kodi. My idea was to customize the parameters which drive recommendations, allowing the user to choose some basic variables for recommendations. For example, I could set some filters like imdb rating > 8.0, rotten tomatoes > 75%, release year = 2015, #of HD sources > 0 etc.

After maintaining my variables, I would trigger the search and it would use my existing kodi sources / repositories to show the results.

Do you think something like this can be built outside the kodi environment, in Android for example? See my post here with more details:
http://forums.tvaddons.ag/kodi-tweaks/36...post296480

Cheers,
JB
@djionut123:

Yes currently i use multiple sets of fixed criterias (new content, playback interrupted and also some settings that are similar to your criterias). The idea is to "learn" from the already watched shows. But it is possible to have some configuration activity to let the user specify the values and also some importance for the weighting. Especially for the beginning of the learning phase it would help.

You just have to keep in mind that the system/user initiates the search and you just deliver the results in a certain data format within a reasonable time.
(2015-08-21, 00:18)Koying Wrote: [ -> ]I have a poc, but I'm not very convinced...
Problem is which 3 vids to put there?

Is 3 vids the maximum number of recommendations?
(2015-11-05, 01:38)natethomas Wrote: [ -> ]Is 3 vids the maximum number of recommendations?

No, as far as i could see, all recommendations were shown, but if there are many recommendations by other apps, there could be a system-wide limit.
AFAIK the order depends on how often recommendations of an application were choosen in the past.
(2015-11-05, 01:38)natethomas Wrote: [ -> ]
(2015-08-21, 00:18)Koying Wrote: [ -> ]I have a poc, but I'm not very convinced...
Problem is which 3 vids to put there?

Is 3 vids the maximum number of recommendations?

Documentation recommends 3 per content type I think. Types are,
  • Continuation content recommendations for the next episode for users to resume watching a series.
  • New content recommendations, such as for a new first-run episode, if the user finished watching another series.
  • Related content recommendations based on the users historic viewing behavior.

https://developer.android.com/training/t...tions.html
(2015-10-27, 23:59)redeye86 Wrote: [ -> ]Hello,

i created an app that does exactly that. It accesses the SQLite database from the kodi userdata folder on the storage device and displays the data in the search and recommendations. Currently it only takes movies into account but can be extended for tv series.

You can download the apk and source (a bit quirky) here:
https://github.com/redeye86/kodi-recomme...android-tv

You have to reboot once to initiate the recommendation processing.


For the recommendations it currently uses movies with high imdb rating, new movies and movies that were stopped during playback. In the readme i outlined some more ideas to refine this system, e.g. analyze previously watched or searched movies and look for other movies with the same actors, roles, directors, genres...

For the series it makes sense to show the respective next episode or a similar series when the last episode was reached.

WOW thank you for your help that would be awesome.
I have Nvidia Shield TV KODI 16 Jarvis Alpha 4 Monthly snapshot (http://mirrors.kodi.tv/snapshots/android...bi-v7a.apk)

However when I boot my Nvidia Shield TV I do not see any KODI recommendations ;'(

Any idea what I can do to help you?

I have root access and would love to get this working
Pages: 1 2 3