themoviedb kinopoisk replacement

617 views
Skip to first unread message

malakudi

unread,
Sep 20, 2014, 4:07:24 AM9/20/14
to stalker-m...@googlegroups.com
Hello,

I have made a kinopoisk.class.php replacement that fetches data from themoviedb API (and ofdbapi.com for IMDB ratings). I want to make it available for everyone but in order to be included in future stalker releases it has to be done as an additional module and not replacement. I could rename the class as "TMDB" instead of "Kinopoisk", but what other steps are needed to really make it configurable for the portal admin to use whichever he wants? System should be configurable to add other modules as well.

Aleksey Zhurbitsky

unread,
Sep 22, 2014, 8:32:47 AM9/22/14
to stalker-m...@googlegroups.com
This can be done via the option in the configuration file of the portal.

malakudi

unread,
Sep 22, 2014, 11:36:10 AM9/22/14
to stalker-m...@googlegroups.com
Of course, there will be an option there. But how can I make a "dynamic" selection of class? In /var/www/stalker_portal/server/administrator/get.php , we have those functions:
        if ($_GET['get'] == 'kinopoisk_info'){
            $response['result'] = Kinopoisk::getInfoByName($_GET['oname']);
        }else if ($_GET['get'] == 'kinopoisk_rating'){
            $response['result'] = Kinopoisk::getRatingByName($_GET['oname']);
        }else if ($_GET['get'] == 'kinopoisk_info_by_id'){
            $response['result'] = Kinopoisk::getInfoById($_GET['kinopoisk_id']);

Is it possible to select different class name based on configuration file? 

Aleksey Zhurbitsky

unread,
Sep 23, 2014, 8:19:48 AM9/23/14
to stalker-m...@googlegroups.com
Add to the config something like this
movie_data_parser_class = Kinopoisk

and use this method

Kinopoisk::getInfoByName($_GET['oname']);
will be
call_user_func(Config::get('movie_data_parser_class') . '::getInfoByName', $_GET['oname']);

C. Katt.

unread,
Nov 18, 2014, 5:25:50 PM11/18/14
to stalker-m...@googlegroups.com
Any chance you could share the parser of themoviedb?

malakudi

unread,
Nov 19, 2014, 10:00:54 AM11/19/14
to stalker-m...@googlegroups.com
Yes, it is not completely modular 100% but it can be done by stalker coders easily. Here it is:

tmdb.class.php offers the TMDB module. get.php.diff has the patch that is needed in server/administrator/get.php to enable modular movie parser. You need to have in your custom.ini, inside vclub block, the option: movie_data_parser_class = TMDB (or Kinopoisk if you want to use the Kinopoisk parser class). You also need to set your tmdb_api_key in the same section, like: tmdb_api_key = 'abcdef1234556' . You can get your tmdb_api_key by registering to themoviedb.org site.

patches in get_img.php and add_video.php are not yet modular. Original versions have hardcoded the url for kinopoisk. New versions have hardcoded the urls for tmdb. It needs to be done modular.

server/tools/update_kinopoisk_rating.php also needs updating to use tmdb, so better disable automatic rating updates.

I hope that with little help of stalker developers, it can be integrated in future releases.
tmdb.class.php
add_video.php.diff
get_img.php.diff
get.php.diff

Aleksey Zhurbitsky

unread,
Nov 20, 2014, 8:17:17 AM11/20/14
to stalker-m...@googlegroups.com
Thanks. We'll try to add this in further releases.

C. Katt.

unread,
Nov 22, 2014, 6:27:50 AM11/22/14
to stalker-m...@googlegroups.com
Thanks a lot much appreciated

will try it today:)

malakudi

unread,
Dec 11, 2014, 4:06:55 AM12/11/14
to stalker-m...@googlegroups.com
Has anyone used it? Does it work for you? Do you have any suggestions for improvements?

C. Katt.

unread,
Dec 16, 2014, 7:23:45 AM12/16/14
to stalker-m...@googlegroups.com

I've tested it with the files provided and working just fine

the only problem is with the TV Series

Nikos GaLaTaS

unread,
May 18, 2017, 2:59:01 PM5/18/17
to Stalker Middleware
Can you please provide a step-by-step instructions manual to install and work your files. Thanks


On Wednesday, 19 November 2014 17:00:54 UTC+2, malakudi wrote:

web developer

unread,
Jul 24, 2021, 12:36:04 PMJul 24
to Ministra TV platform (formerly Stalker Middleware)
are there any instructions available step by step ?
Reply all
Reply to author
Forward
0 new messages