Personal Video Database
English => Development => Scripts and Templates => Topic started by: VVV_Easy_Programing on January 28, 2017, 08:10:45 pm
-
Hello,
there are sometimes that the script is not a good tool for arrange PVD. Happily we have the possibility of use SQL scripts.
First you must start PVD in Debug Mode (viddb.exe -debug) and then you have in Menu->Help->SQL where you can run a SQL Script (tick the box if the script have several lines).
I publish two examples easy to understand:
1) Now I have problems with IMDB[EN] and the original title (give me a false string 'var ....'). I can solve easily the problem running:
update MOVIES set "origtitle"="title" where "origtitle"='var ue_t0=window.ue_t0||+new Date();';
or
update MOVIES set "origtitle"="title" where SUBSTR("origtitle",1,3) = 'var';
2) Some strange chars appears in the people IMDB url. I use:
update PEOPLE set "url"=replace("url",'?ref_=tt_ov_dr', '/');
update PEOPLE set "url"=replace("url",'?ref_=tt_ov_wr', '/');
I anime to all to publish here their own SQL scripts for PVD.
-
Use this SQL script if you are missing this part in the imdb url: www.
update MOVIES set "url"=replace("url",'http://imdb', 'http://www.imdb');
Instructions on how to use the SQL script are in the first post.
Here you have some more similar SQL scripts.
update MOVIES set "url"=replace("url",'http://httpbin.org/response-headers?key=http://www.imdb', 'http://www.imdb');
update MOVIES set "url"=replace("url",'http://httpbin.org/response-headers?key=https://', 'http://');
update MOVIES set "url"=replace("url",'http://httpbin.org/response-headers?key=', '');
-
I have this problem with some urls from the times IMDb script wasn't updated for a long time before _2b:
http://www.imdb.comhttps://www.imdb.com
So I guess this should help?
update MOVIES set "url"=replace("url",'http://www.imdb.comhttps://www.imdb.com', 'https://www.imdb.com');
-
Related to http://www.videodb.info/forum_en/index.php/topic,4134.msg21969.html#msg21969 (http://www.videodb.info/forum_en/index.php/topic,4134.msg21969.html#msg21969)
The query has to be
update PEOPLE set "url"=replace("url",'http://imdb', 'http://www.imdb');
-
Related to http://www.videodb.info/forum_en/index.php/topic,4134.msg21969.html#msg21969 (http://www.videodb.info/forum_en/index.php/topic,4134.msg21969.html#msg21969)
The query has to be
update PEOPLE set "url"=replace("url",'http://imdb', 'http://www.imdb');
Of course, I just gave the movies as an example, but you can decide for yourself what you need it for.