# Plex Web Export

**URL:** <https://forums.plex.tv/t/plex-web-export/5807>\
**Category:** Dev/API Corner\
**Tags:** other-dev\
**Created:** [October 6, 2010, 11:36am UTC](https://forums.plex.tv/t/plex-web-export/5807 "2010-10-06T11:36:18Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![mkh](https://avatars.discourse-cdn.com/v4/letter/m/4af34b/32.png) [@mkh](https://forums.plex.tv/u/mkh)\
**Post date:** [October 11, 2010, 4:17pm UTC](https://forums.plex.tv/t/plex-web-export/5807/21 "2010-10-11T16:17:18Z")

</div>

> [@](#):
>
> @mkh okay, do you know if the directory is writeable? (I'm assuming you're on OS X, Get Info should be able to tell you).

  
  
  
Yes on OS X and the dir looks to be writeable

---

<div class="post-metadata">

**Author:** ![Dachande663](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dachande663/32/403_2.png) [@Dachande663](https://forums.plex.tv/u/Dachande663)\
**Post date:** [October 11, 2010, 4:26pm UTC](https://forums.plex.tv/t/plex-web-export/5807/22 "2010-10-11T16:26:38Z")

</div>

> [@](#):
>
> Yes on OS X and the dir looks to be writeable

  
  
Ah, I think I know what's happening. You have to run cli.php from the directory it's in i.e.  
cd /Users/mini/Desktop/plexexport  
php cli.php  
  
Otherwise the document root isn't plexexport and as such it'll try and save the files to another location. Hopefully that'll work now.

---

<div class="post-metadata">

**Author:** ![mkh](https://avatars.discourse-cdn.com/v4/letter/m/4af34b/32.png) [@mkh](https://forums.plex.tv/u/mkh)\
**Post date:** [October 11, 2010, 4:28pm UTC](https://forums.plex.tv/t/plex-web-export/5807/23 "2010-10-11T16:28:19Z")

</div>

> [@](#):
>
> Ah, I think I know what's happening. You have to run cli.php from the directory it's in i.e.  
> cd /Users/mini/Desktop/plexexport  
> php cli.php  
>   
> Otherwise the document root isn't plexexport and as such it'll try and save the files to another location. Hopefully that'll work now.

  
  
  
Tada, that made it work, thanks alot :)  
  
  
/mkh

---

<div class="post-metadata">

**Author:** ![Dachande663](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dachande663/32/403_2.png) [@Dachande663](https://forums.plex.tv/u/Dachande663)\
**Post date:** [October 11, 2010, 8:10pm UTC](https://forums.plex.tv/t/plex-web-export/5807/24 "2010-10-11T20:10:36Z")

</div>

Just to let everyone know, I’ve released a new version today with some changes. From now on, the latest version can be found in the first post on the first page to save people trawling through out of date information.  
  
  
  
ADDED additional media information (size, bitrate, codecs)  
  
FIXED error handling on unusual file set-ups and data as reported by Plex  
  
  
  
Also, to answer MrAcid’s question, as long as Plex Export is run on the same local network as Plex Media Server it will not require authentication even if authentication is enabled on the PMS. I may eventually look into adding auth support but at the moment there aren’t any API docs to even begin looking at 😕  
  
  
  
As usual, any bugs you spot let me know 🙂

---

<div class="post-metadata">

**Author:** ![xiocc](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/xiocc/32/1475_2.png) [@xiocc](https://forums.plex.tv/u/xiocc)\
**Post date:** [October 12, 2010, 12:51pm UTC](https://forums.plex.tv/t/plex-web-export/5807/25 "2010-10-12T12:51:26Z")

</div>

Works like a charm on my library - thanks a lot 🙂   
  
Just one thing - when I update/change the poster on the media server, it won’t download the new one when I run cli.php again. Would be great if the script would detect a changed poster…

---

<div class="post-metadata">

**Author:** ![Dachande663](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dachande663/32/403_2.png) [@Dachande663](https://forums.plex.tv/u/Dachande663)\
**Post date:** [October 12, 2010, 12:53pm UTC](https://forums.plex.tv/t/plex-web-export/5807/26 "2010-10-12T12:53:51Z")

</div>

@xiocc yep, the only way to check for updated thumbs at the moment would be to re-download the images all over again. I’m looking into a better fix but in the meantime you can delete the image in plex-data and re-run the cli script.

---

<div class="post-metadata">

**Author:** ![sandman4sure](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/sandman4sure/32/40_2.png) [@sandman4sure](https://forums.plex.tv/u/sandman4sure)\
**Post date:** [October 13, 2010, 9:30am UTC](https://forums.plex.tv/t/plex-web-export/5807/27 "2010-10-13T09:30:46Z")

</div>

Wow, this looks great, thanks for making it!  
  
  
  
Little thing I noticed: aspect ratio is after Audio:, not Video:  
  
  
  
Is it possible to make the starring names clickable and see all the movies with that actor/actress?

---

<div class="post-metadata">

**Author:** ![Dachande663](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dachande663/32/403_2.png) [@Dachande663](https://forums.plex.tv/u/Dachande663)\
**Post date:** [October 13, 2010, 9:34am UTC](https://forums.plex.tv/t/plex-web-export/5807/28 "2010-10-13T09:34:18Z")

</div>

> [@](#):
>
> Wow, this looks great, thanks for making it!  
>   
> Little thing I noticed: aspect ratio is after Audio:, not Video:  
>   
> Is it possible to make the starring names clickable and see all the movies with that actor/actress?

  
  
Ah good catch! I'll have to tweak all of that section, at the moment it's literally a dump from Plex :/  
  
I'm looking into letting you see by actor etc but at the moment it would mean a lot of reworking. V2 maybe.

---

<div class="post-metadata">

**Author:** ![sandman4sure](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/sandman4sure/32/40_2.png) [@sandman4sure](https://forums.plex.tv/u/sandman4sure)\
**Post date:** [October 13, 2010, 10:32am UTC](https://forums.plex.tv/t/plex-web-export/5807/29 "2010-10-13T10:32:27Z")

</div>

It seems like the rating doesn’t work in Firefox?  
  
In Safari it looks right.

---

<div class="post-metadata">

**Author:** ![MrAcid](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/mracid/32/278_2.png) [@MrAcid](https://forums.plex.tv/u/MrAcid)\
**Post date:** [October 13, 2010, 8:37pm UTC](https://forums.plex.tv/t/plex-web-export/5807/30 "2010-10-13T20:37:14Z")

</div>

Seems like it’s not working in Google Chrome…? Safari is working fine but Chrome is stuck on “loading…” when I open the index.html…

---

<div class="post-metadata">

**Author:** ![Dachande663](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dachande663/32/403_2.png) [@Dachande663](https://forums.plex.tv/u/Dachande663)\
**Post date:** [October 13, 2010, 8:38pm UTC](https://forums.plex.tv/t/plex-web-export/5807/31 "2010-10-13T20:38:23Z")

</div>

Thanks for the browser issue reports, I’ll release a fix as soon as I’m home.

---

<div class="post-metadata">

**Author:** ![Dachande663](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dachande663/32/403_2.png) [@Dachande663](https://forums.plex.tv/u/Dachande663)\
**Post date:** [October 13, 2010, 10:24pm UTC](https://forums.plex.tv/t/plex-web-export/5807/32 "2010-10-13T22:24:03Z")

</div>

> [@](#):
>
> Seems like it's not working in Google Chrome..? Safari is working fine but Chrome is stuck on "loading.." when I open the index.html..

  
  
It seems to be working correctly on my local machine in Chrome. If you go to plex-data/data.js can you confirm the file is there? If so, try deleting it and re-running the cli script, it may have exported a bad record which is causing Chrome to choke (I believe Chrome uses a different JS engine, hence why Safari is still working).

---

<div class="post-metadata">

**Author:** ![hrcolb0](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/hrcolb0/32/380_2.png) [@hrcolb0](https://forums.plex.tv/u/hrcolb0)\
**Post date:** [October 14, 2010, 10:46am UTC](https://forums.plex.tv/t/plex-web-export/5807/33 "2010-10-14T10:46:38Z")

</div>

Wow. I really hope this is adapted into the web front end for plex. I remember that there was some work on that before nine came out.

---

<div class="post-metadata">

**Author:** ![Dachande663](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dachande663/32/403_2.png) [@Dachande663](https://forums.plex.tv/u/Dachande663)\
**Post date:** [October 14, 2010, 1:54pm UTC](https://forums.plex.tv/t/plex-web-export/5807/34 "2010-10-14T13:54:39Z")

</div>

Uploaded a new version that fixes some issues in various browsers, ratings should now show up and aspect ratio is in the correct place. As usual, any problems drop me a line 🙂  
  
  
  
@Harley Hooligan that would be cool! I’m looking for the best way to get the script to automatically update as and when Plex does, the API’s a bit of a blind alley at the moment though.

---

<div class="post-metadata">

**Author:** ![PlexLars](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/plexlars/32/1004_2.png) [@PlexLars](https://forums.plex.tv/u/PlexLars)\
**Post date:** [October 15, 2010, 12:26pm UTC](https://forums.plex.tv/t/plex-web-export/5807/35 "2010-10-15T12:26:29Z")

</div>

This is Kool!  
  
  
  
An auto-update solution would make it perfect.

---

<div class="post-metadata">

**Author:** ![mkh](https://avatars.discourse-cdn.com/v4/letter/m/4af34b/32.png) [@mkh](https://forums.plex.tv/u/mkh)\
**Post date:** [October 15, 2010, 8:34pm UTC](https://forums.plex.tv/t/plex-web-export/5807/36 "2010-10-15T20:34:13Z")

</div>

Dachande663 : I’ve got a problem, added a section for movies but they all have the same File: size which is set to 2GB…  
  
  
  
It only happens for movies, TV shows work fine…  
  
  
  
/mkh

---

<div class="post-metadata">

**Author:** ![Dachande663](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dachande663/32/403_2.png) [@Dachande663](https://forums.plex.tv/u/Dachande663)\
**Post date:** [October 15, 2010, 8:57pm UTC](https://forums.plex.tv/t/plex-web-export/5807/37 "2010-10-15T20:57:28Z")

</div>

> [@](#):
>
> Dachande663 : I've got a problem, added a section for movies but they all have the same File: size which is set to 2GB..  
>   
> It only happens for movies, TV shows work fine...  
>   
> /mkh

  
  
It seems the Plex API sometimes reports incorrect file sizes (some of my HD films are apparently 55Mb). I don't know why it would say they're all the same size, are they roughly equal in size in Finder?

---

<div class="post-metadata">

**Author:** ![mkh](https://avatars.discourse-cdn.com/v4/letter/m/4af34b/32.png) [@mkh](https://forums.plex.tv/u/mkh)\
**Post date:** [October 15, 2010, 9:00pm UTC](https://forums.plex.tv/t/plex-web-export/5807/38 "2010-10-15T21:00:37Z")

</div>

> [@](#):
>
> It seems the Plex API sometimes reports incorrect file sizes (some of my HD films are apparently 55Mb). I don't know why it would say they're all the same size, are they roughly equal in size in Finder?

  
  
  
Nope, some files that are 12+ GB in size are still listed as 2GB, and we are talking ALL movies, but only in one cat... thats the weird part.

---

<div class="post-metadata">

**Author:** ![AOZ801](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@AOZ801](https://forums.plex.tv/u/AOZ801)\
**Post date:** [October 16, 2010, 2:37am UTC](https://forums.plex.tv/t/plex-web-export/5807/39 "2010-10-16T02:37:14Z")

</div>

I’m a total beginner but when I run the command line in terminal I get -bash: /Applications/plexexport/cli.php: Permission denied. What am I doing wrong?  
  
  
  
Thanks in advance for the help.

---

<div class="post-metadata">

**Author:** ![achterberg](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@achterberg](https://forums.plex.tv/u/achterberg)\
**Post date:** [October 16, 2010, 3:10am UTC](https://forums.plex.tv/t/plex-web-export/5807/40 "2010-10-16T03:10:04Z")

</div>

I get the following result when I run a command from Terminal on my laptop to the server (htpc). It almost wants to work, is this the wrong way to go about this? It runs fine when I run it on the server.  
  
  
  
Powerbook:plexexport daa$ php cli.php -plex-url=http://htpc.local:32400  
  
22:05:33 Welcome to the Plex Exporter v1  
  
22:05:33 Searching for sections in the Plex library at [http://htpc.local:32400/](http://htpc.local:32400/)  
  
22:05:33 Found 6 sections in this Plex library  
  
22:05:33 Scanning section: EyeTV  
  
22:05:33 Error: No items were found in this section, skipping  
  
22:05:33 Error: No items were added for EyeTV, skipping  
  
22:05:33 Scanning section: Movies  
  
22:05:33 Found 14 movies in Movies  
  
22:05:33 Scanning movie: Ambush  
  
  
  
Fatal error: Call to undefined function imagecreatefromstring() in /Volumes/server/Documents/Plex/plexexport/cli.php on line 379

[Previous page](https://forums.plex.tv/t/plex-web-export/5807.md?page=1)

[Next page](https://forums.plex.tv/t/plex-web-export/5807.md?page=3)
