# Reloading a menu

**URL:** <https://forums.plex.tv/t/reloading-a-menu/3418>\
**Category:** Dev/API Corner\
**Tags:** plugin-dev\
**Created:** [January 15, 2010, 5:16pm UTC](https://forums.plex.tv/t/reloading-a-menu/3418 "2010-01-15T17:16:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![n8o](https://avatars.discourse-cdn.com/v4/letter/n/ac8455/32.png) [@n8o](https://forums.plex.tv/u/n8o)\
**Post date:** [January 15, 2010, 5:16pm UTC](https://forums.plex.tv/t/reloading-a-menu/3418/1 "2010-01-15T17:16:51Z")

</div>

Is there a way to reload a menu? I don’t want to restart the plug-in.  
  
  
  
Scenario:   
  
I want to add a new source. After i add the source i want that source to show up in the menu.  
  
  
  
Currently the only way i can get it to show up is if i press ESC and go back a menu and then go forward to where i was.  
  
  
  
any ideas ?

---

<div class="post-metadata">

**Author:** ![jwray](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/jwray/32/99832_2.png) [@jwray](https://forums.plex.tv/u/jwray)\
**Post date:** [January 15, 2010, 6:40pm UTC](https://forums.plex.tv/t/reloading-a-menu/3418/2 "2010-01-15T18:40:50Z")

</div>

Hi,  
  
  
  
try adding a noCache=True option to the MediaContainer you need to be reloaded.

```auto

<br />
dir = MediaContainer(viewGroup='Details', title2=sender.itemTitle, noCache=True)<br />

```

  
  
this should work if there is an action that adds the source resulting in the container being redrawn. There is also a way to refresh the container periodically if you want to reload but not based on user action.  
  

```auto

<br />
dir = MediaContainer(mediaType='video', autoRefresh=REFRESH_RATE ) <br />

```

  
  
where REFRESH\_RATE is in seconds.  
  
Jonny

---

<div class="post-metadata">

**Author:** ![n8o](https://avatars.discourse-cdn.com/v4/letter/n/ac8455/32.png) [@n8o](https://forums.plex.tv/u/n8o)\
**Post date:** [January 15, 2010, 6:43pm UTC](https://forums.plex.tv/t/reloading-a-menu/3418/3 "2010-01-15T18:43:22Z")

</div>

> [@](#):
>
> Hi,  
>   
> try adding a noCache=True option to the MediaContainer you need to be reloaded.  
>   
> 
> ```auto
> 
> <br />
> dir = MediaContainer(viewGroup='Details', title2=sender.itemTitle, noCache=True)<br />
> 
> ```
> 
>   
>   
> this should work if there is an action that adds the source resulting in the container being redrawn. There is also a way to refresh the container periodically if you want to reload but not based on user action.  
>   
> 
> ```auto
> 
> <br />
> dir = MediaContainer(mediaType='video', autoRefresh=REFRESH_RATE ) <br />
> 
> ```
> 
>   
>   
> where REFRESH\_RATE is in seconds.  
>   
> Jonny

  
  
  
Ahhhh.. That worked great. Thanks!

---

<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:** [December 20, 2019, 8:35pm UTC](https://forums.plex.tv/t/reloading-a-menu/3418/4 "2019-12-20T20:35:30Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
