# Checking media availability?

**URL:** <https://forums.plex.tv/t/checking-media-availability/143422>\
**Category:** Dev/API Corner\
**Tags:** other-dev\
**Created:** [April 26, 2016, 11:13pm UTC](https://forums.plex.tv/t/checking-media-availability/143422 "2016-04-26T23:13:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![wtopace](https://avatars.discourse-cdn.com/v4/letter/w/6bbea6/32.png) [@wtopace](https://forums.plex.tv/u/wtopace)\
**Post date:** [April 26, 2016, 11:13pm UTC](https://forums.plex.tv/t/checking-media-availability/143422/1 "2016-04-26T23:13:16Z")

</div>

Hello, I am interested in checking the availability of media (whether or not the media directory is properly mounted). This shows up in the web UI with a warning label that the backing media is not available, however, I haven’t been able to find the same when poking at the REST API.

I plan to tie this together with a script to flag VMware vCenter Application-Level HA to reboot the Plex VM if there are file mount issues.

Thanks!

---

<div class="post-metadata">

**Author:** ![dane22](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dane22/32/4389_2.png) [@dane22](https://forums.plex.tv/u/dane22)\
**Post date:** [April 26, 2016, 11:16pm UTC](https://forums.plex.tv/t/checking-media-availability/143422/2 "2016-04-26T23:16:20Z")

</div>

Check the sourcecode for Plex2CSV, since that export it.  
Check my signature

/T

---

<div class="post-metadata">

**Author:** ![wtopace](https://avatars.discourse-cdn.com/v4/letter/w/6bbea6/32.png) [@wtopace](https://forums.plex.tv/u/wtopace)\
**Post date:** [April 27, 2016, 2:47pm UTC](https://forums.plex.tv/t/checking-media-availability/143422/3 "2016-04-27T14:47:54Z")

</div>

> @dane22 said:  
> Check the sourcecode for Plex2CSV, since that export it.  
> Check my signature
> 
> /T

I looked through your Plex2CSV this morning and was able to find the checkFiles=1 argument for the metadata query, however, I am not able to see any differences with or without the flag in the resulting XML. I have tried curl’ing the address with and without the flags (with the NFS mounted and unmounted) and diffing the files - they seem to be identical.

Any specific usage help or examples on it?

I tried with and without checkFiles and includeExtras (just in case this triggered something)  
http://:32400/library/metadata/3255?checkFiles=1&includeExtras=1

The above returns a with 1 child.

Thanks!!

---

<div class="post-metadata">

**Author:** ![dane22](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dane22/32/4389_2.png) [@dane22](https://forums.plex.tv/u/dane22)\
**Post date:** [April 27, 2016, 6:31pm UTC](https://forums.plex.tv/t/checking-media-availability/143422/4 "2016-04-27T18:31:11Z")

</div>

`Part accessible="1" exists="1"`

^^ is what to look for

/T

---

<div class="post-metadata">

**Author:** ![wtopace](https://avatars.discourse-cdn.com/v4/letter/w/6bbea6/32.png) [@wtopace](https://forums.plex.tv/u/wtopace)\
**Post date:** [April 27, 2016, 8:54pm UTC](https://forums.plex.tv/t/checking-media-availability/143422/5 "2016-04-27T20:54:06Z")

</div>

Thanks again for the quick reply!!

It turns out I was testing against a URL for a TV Show instead of a Movie and TV Shows don’t support the Part XML child elements.

Once I switched the ID to a movie - everything showed up exactly as expected.

The script worked great and can be had by anyone interested (on my github) - [https://github.com/wesparish/PlexVMwareHAWatcher](https://github.com/wesparish/PlexVMwareHAWatcher)

root@plexserver:~# ./vmwareHAWatcher.sh  
Wed Apr 27 15:31:01 CDT 2016 Checking Plex status  
Wed Apr 27 15:31:02 CDT 2016 Plex status shows UP for movie ID: 4744  
Wed Apr 27 15:31:02 CDT 2016 Sending up status  
Wed Apr 27 15:31:17 CDT 2016 Checking Plex status  
Wed Apr 27 15:31:17 CDT 2016 Plex status shows UP for movie ID: 4744  
Wed Apr 27 15:31:17 CDT 2016 Sending up status  
Wed Apr 27 15:31:32 CDT 2016 Checking Plex status  
Wed Apr 27 15:31:32 CDT 2016 Plex status shows DOWN for movie ID: 4744  
Wed Apr 27 15:31:37 CDT 2016 Checking Plex status  
Wed Apr 27 15:31:37 CDT 2016 Plex status shows DOWN for movie ID: 4744  
Wed Apr 27 15:31:42 CDT 2016 Checking Plex status  
Wed Apr 27 15:31:42 CDT 2016 Plex status shows DOWN for movie ID: 4744  
Wed Apr 27 15:31:47 CDT 2016 Checking Plex status  
Wed Apr 27 15:31:47 CDT 2016 Plex status shows UP for movie ID: 4744  
Wed Apr 27 15:31:47 CDT 2016 Sending up status

Thanks again for all of the help!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [January 8, 2020, 7:57pm UTC](https://forums.plex.tv/t/checking-media-availability/143422/6 "2020-01-08T19:57:09Z")

</div>


