Saturday, January 30, 2016

SGH database update for MBV files

Guest post from PB.

After the local server hdd crash in Nov 2015
​,​
 we had lost the sghtelugu file_id records. On re-importing the files into the database, I missed out the info that the mbv files had a different download filename
.

Due to this sghtelugu database and sgh database had different download filenames causing end
​-user download issues.

Did the following.
​...​


1. Tried to create a soft link in dl.radiosai.org expecting that http download link would automatically get redirected to the  softlink. But this did not work. It downloaded the file without the modification.

2. The only way is to update the records 
​both sghtelugu and the schedule page database (radiosai)

a. Created a SQL query that would give me the update SQL statements :

psql -d internal_db -A -F ',' -t  -c "SELECT 'UPDATE our_primary_key SET download_filename = \'' || download_filename || '\' WHERE filename = \'' || filename ||'\';' FROM our_primary_key WHERE filename <> download_filename AND filename ILIKE '%mbv%' " -o /home/sgh/update.sql

​This sql statement searches for all the MBV files where the filename is not matching the download filename in our internal database and forms a update sql list. 


UPDATE file_id SET download_filename = 'MBV_2003_08_MODIFIED.mp3' WHERE filename = 'MBV_2003_08_UNMODIFIED.mp3';
UPDATE file_id SET download_filename = .... etc 

about 1358 records

b. Executed this set of update queries on sghtelugu database. This step cleans up the local sghtelugu database

c.​
​ Then modified the update.sql file by using find-replace the database table name and column names like

UPDATE web_db_table_name SET dfileName = 'MBV_04_MODIFIED.mp3' WHERE fileName = 'MBV_04_UNMODIFIED.mp3';
etc

d. Logged into our website Plesk and then to phpMyAdmin database and executed the modified update queries.

Friday, January 15, 2016

Shoutstats update

After our internal server upgrade, Shoutstats stopped working. P did some digging and found that not only were rrdtool and php5-rrd not installed, but with the later versions of PHP, the short tags

Monday, January 11, 2016

quick review of Netflix India

A very quick review of Netflix's India offering, comparing it with the choices for Netflix streaming in the USA.

  1. The selections are very different, of course. For example, the Indian selection does not have "Who framed Roger Rabbit", many of the genres in http://ogres-crypt.com/public/NetFlix-Streaming-Genres.html are just missing in the Indian version. (link removed when Blogger unpublished this post)
  2. There are around fifty Indian movies (only) - youtube's selection is much wider for Hindi movies.
  3. Ditto for documentaries, eg. BBC documentaries. 
  4. If you want to switch countries using a VPN like PureVPN, you can't use Firefox's Private Mode - Netflix doesn't work well with Private Mode. (link to quora page removed when Blogger unpublished this post - https://www.quora.com/Why-doesnt-Netflix-allow-you-to-watch-movies-with-Chromes-incognito-mode ) You have to clear the website preferences using History -> Clear Recent History -> Time Range to Clear -> Everything -> Details -> Cookies, Cache and Site preferences (for Firefox). 
Edit: 15 Jan.
As of now, if you connect to a US VPN, you can access all the US titles even if your Netflix account is from India. 

This page (link removed when Blogger unpublished this post - http://www.finder.com/in/netflix-india-vs-netflix-us-titles-list ) has a comparison of titles available in India vs US - two and a half pages of titles available in India, eighteen pages of titles available in USA with maybe a page or so available in India but not available in the USA. 

Edit: 7th Nov 2022 - Blogger unpublished this post saying it violates community guidelines. Removing links and asking for a review. In what way does this violate community guidelines, I wonder.  

Wednesday, January 06, 2016

Chrome not loading https pages

Related to my earlier post, I found that Chrome on XP was not loading the https pages. Apparently this is related to XP reaching end of life and not supporting the latest ECC in https, as mentioned in the last post at the page
https://code.google.com/p/chromium/issues/detail?id=451311

So, for loading the https pages with this issue on Windows XP, the workaround is to use the latest Firefox.

CSS loading issue

A Tomcat page, loading from port 8443 using https, had the issue that the first time it loads, all formatting was lost - CSS was not loaded. A page refresh would load the CSS.

My diagnosis was that the relative url to the CSS was being interpreted by the browser as a call to http and not https:8443, and was failing the first time. This turned out to be correct, since giving the full path to the CSS file, like
href=https://servername.com:8443/path/to/file.css
instead of
href=../file.css
(with quotes for the links, of course) solved the problem.