Archive

Posts Tagged ‘Mac’

Fixing corrupt Plex thumbnails

March 14, 2012 6 comments

Plex is nothing short of fantastic!
It really brings TV and Movie collections to life and makes browsing and watching media so much better than any other system I have ever used.

I did however find a problem the other day, where the thumbnails for some movies were corrupt. For example, if you imagine the image is downloaded from the top down, only half the image is showing and the rest is just grey.

At the time of writing this article, there are no other fixes published online, other than deleting your entire Plex metadata! So if you  have this problem and want a reasonably quick fix, read on…..

This fix finds the location of the Plex metadata for the movie with the corrupt thumbnail, then simply removes it and forces Plex to download a new copy of the metadata. It is fairly straightforward, but a little tricky, so please read each step carefully and use copy and past on the provided commands to avoid typos.

This fix will also work for other content such as TV shows etc with a few very obvious tweeks.

1. Open up a terminal and run this command to change to the Plex DB directory (Notice the backslashes escaping the spaces in the directory names):

cd ~/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases

2. Connect to the Plex DB with sqlite by running this command in the terminal window:

sqlite3 com.plexapp.plugins.library.db

You will see something like this:
iMac:Databases nik$ sqlite3 com.plexapp.plugins.library.db
SQLite version 3.6.12Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite>

3. Type this SQL query into the terminal window to find the GUID of the movie, this will help us find the movie metadata location:

Obviously replace ‘your movie name here’ with the movie you want to fix.

select title, guid from metadata_items where title like '%your movie name here%';

For example:

sqlite> select title, guid from metadata_items where title like '%school of rock%';

You should see the movie name and the guid, separated by a pipe (|)

My result:

The School of Rock|com.plexapp.agents.imdb://tt0332379?lang=en

4. Find the location (folder and bundle name) of the movie metadata. Close down the previous terminal window and run this command in the new window:

Obviously replacing everything in between the quotes with the guid you go when you ran your SQL query.

echo -n "com.plexapp.agents.imdb://tt0332379?lang=en" | shasum

This command will return a big long string, like this:

d616f6685a11c774befb391dc13b7c0558908acf

Which actually contains a folder name (The first character) and the name of the bundle file (The remaining characters).

Your string will be different, but the format is the same as the following:

(d) (616f6685a11c774befb391dc13b7c0558908acf)

Foldername: d
Bundle Name: 616f6685a11c774befb391dc13b7c0558908acf

5. Find the directory holding the Plex movie metadata:

In finder browse to the following directory:

~/Library/Application Support/Plex Media Server/Metadata/Movies

You will notice lots of directories named 0,1,2,3a,b,c etc.

Take the directory name (1st letter of the sha checksum) from step 4 and open that directory.

In my case this was the directory named “d”. Then find the bundle name in the folder, in my case this was “616f6685a11c774befb391dc13b7c0558908acf.bundle”

6. Move the bundle file found in step 5 to a temporary location, your desktop for example

7. Now we need to tell Plex to overwrite the cached metadata:

a) Open Plex Media Manager (Click the Plex icon at the top of the screen, then click Media Manager)

b) Find the Movie with the partially downloaded artwork, right click and choose ‘Fix Incorrect Match’

c) All you need to do in this step is select a different movie, it doesn’t matter what it is , as long as it is different. Also, make sure you remember what the correct match was!

Plex will now download the metadata for the dummy match we have just given it. Watch in Plex Media Manager for this to update.

8. Tell Plex to download the correct metadata for the Movie:

a) Find the Movie with the partially downloaded artwork in Media Manager,  right click and choose ‘Fix Incorrect Match’ again

c) Now select the correct movie, Plex will now re-download the correct metadata, including a new copy of the artwork! Replacing your corrupt thumbnail 🙂

A huge thanks to SolarPlex on the Plex forums for this article, which helped me connect to the Plex DB and find the correct metadata folder for the movie.

Here’s a link to the SolarPlex article:

http://forums2.plexapp.com/index.php/topic/31636-howto-query-data-from-plex-on-a-mac/

Advertisements

Watching UK TV on your PS3 from outside the UK

January 25, 2011 21 comments



After living outside the UK for a while now, I have come to appreciate that UK TV is actually quite good and I miss it.

While some UK TV channels are available over the internet, if you are outside the UK, access to the sites is blocked.

This tutorial shows how to gain access to the UK TV sites from outside the UK using a PC/Mac. It also shows how to get the UK TV sites to work on a PS3.

Tutorial Steps
  1. Configuring the network
  2. Setting up a UK VPN
  3. Setting up the proxy server
  4. Configuring the PS3
Required
  • A PS3 (UK Version with the iPlayer, 4OD and ITV Player icons installed)
  • A PC/Mac
  • An Internet Connection
  • Some basic networking and PC/Mac skills

 

1. Configuring the Network

A static LAN IP Address is required on the PC/Mac, because if a DHCP server ever assigns a different IP Address to the PC/Mac you would need to change the PS3 configuration.
If you are certain the PC/Mac has a static IP Address already, get the IP Address and Subnet Mast and move onto the next section, if not complete the steps below.

  1. Configure a static LAN IP Address on your PC/Mac
  2. Ensure the Address you assign is excluded from the range of IP Addresses used by your DHCP server (Normally running on your router/modem
  3. Make a note of your IP Address and Subnet Mask

 

2. Setting up a UK VPN

First a quick lesson on how networks and more specifically the internet works.

Everything (Computer, Webserver, Games Console, Internet Enabled Toaster etc) has a unique IP Address on the internet just like your home network.

A central authority allocates all IP Addresses and registers the location of the IP Addresses as they are allocated.

UK TV websites determine your location by looking at your IP Address when connecting to it, if the IP Address connecting to the TV website is not registered in the UK, access is blocked.

A UK VPN service tricks the UK TV website into thinking you are in the UK by making the connection to the UK TV website on your behalf, then sending the TV channel stream back to your PC/Mac.

Implementation
  1. Subscribe to a UK VPN service. This will cost a small amount each month however it is 100% worth paying for as the free ones can be very unreliable. A great VPN service is http://www.Overplay.net however you can compare a number of UK VPN services using a site like http://www.vpnreviews.com
  2. Configure the VPN. Each VPN service supplies its own configuration, so simply follow the instructions provided by the website. This tutorial assumes overplay.net was chosen and the Overplay VPN client was installed, however if you use another provider simply follow any VPN configuration steps provided by VPN service
  3. Open the Overplay VPN client (Shown Below), Select one of the UK sites from the drop down list and click “Connect”, entering the correct username and password when prompted
  4. OK so step 1 is complete. You now have access to UK TV websites on your PC/Mac. To test simply open your web browser and browse to the site of your choice E.G BBC iPlayer/ITV Player

 

3. Setting up the Proxy Server

A VPN cannot be configured on a PS3, so instead we need to connect to the internet via the PC/Mac with the UK VPN connection.

This is done by installing proxy server software on your PC/Mac, the proxy software simply connects to internet services on your behalf and sends you back all data it receives.

You will need to determine the network address from the IP Address from the previous step. Assuming your subnet mask is 255.255.255.0 (/24) if your IP A

ddress is 192.168.0.x, your network address is 192.168.0.0/24. If you IP Address is 192.168.1.x, your network address is 192.168.1.0/24.

Implementation
  1. Download and install proxy server software onto your PC/Mac. The best one available for a Mac is “Squidman” (http://web.me.com/adg/squidman/index.html) which is simply a management utility for the great open source proxy “squid”. A good one for a PC is “ccproxy” (http://www.youngzsoft.net/ccproxy)
  2. Configure the Proxy.This tutorial will assume the use of Squidman on a Mac, however the configuration for ccproxy is almost the same. There are two configurations required, clients and port, leave everything else unless you really know what you are doing.
  3. Clients: (Shown Below) Open Squidman, install squid when prompted then open preferences. Click Clients, then enter the network address E.G. 192.168.0.0/24
  4. Ports: (Shown Below) In the Squidman preferences panel click general and make a note of the port number. The default is 3128
  5. Start Squid. To allow the proxy to start receiving connections from devices on your network, click “Start Squid”
  6. Ok so step 2 is complete. You can now configure your PS3 to connect to the internet via your PC/Mac

4.  Configuring the PS3

The PS3 now needs to be told to connect to the internet via the PC/Mac with the VPN connection and proxy software. This will trick the Uk TV sites into thinking the PS3 is connecting from the UK.

Implementation
If you are not familiar with the PS3 configuration, check out the manual first here: http://manuals.playstation.net/document/en/ps3/current/settings/connectadvance.html
  1. Open Settings->Network Settings ->Internet Connection Settings
  2. Click Yes when promoted to disconnect from the internet temporarily, then simply browse to the Proxy Server screen (Shown Below), click “Use” then enter the IP Address and port of your PC/Mac E.G:
    • Proxy Server: 192.168.1.2
    • Port 3128
  3. Save all configuration and exit the Settings menu system
  4. So now the PS3 should be able to stream from the UK TV sites. To test simply go to the iPlayer icon at the home screen and try stream your favourite TV show!

Important Notes
  • If the VPN is disconnected for whatever reason the proxy must be stopped, then restarted after the VPN connection is re-established.
  • You are required to purchase a UK TV license if you watch UK BBC channels