This SEEMS* to be the way to export all epg data to xml (However not in standard xmltv.xml format)
GET 127.0.0.1:32400/tv.plex.providers.epg.onconnect:23/all?X-Plex-Token=xxxxxxxxxxxxxxxxxx >> epgdata.xml
*Don’t try this in a browser only via terminal to file output
dane22
April 24, 2018, 10:12pm
22
Do remember to use paging when getting all endpoint!
Yeah lots of memory used when retrieving large amounts of data, i have a pretty good workstation im developing on 24GB ram.
I am starting to implement all of this livetv session GET info into PlexMediaContainerService.java so I can create a test livetv app and try livetv HLS sessions with gracenote epgdata. Next is to implement a grid view for livetv.
Need a bit of help piecing this together java wise. Does this look right for making java encoded GET calls.
public interface PlexMediaContainerService {
@GET("/tv.plex.providers.epg.onconnect")
Call<MediaContainer> retrieveRoot();
@GET("tv.plex.providers.epg.onconnect{key}")
Call<MediaContainer> retrieveLibraryTv(@Path("key") String key);
@GET("/{key}/sections")
Call<MediaContainer> retrieveSectionsTv();
@GET("/sections/{key}")
Call<MediaContainer> retrieveSectionsTv(@Path("key") String key);
@GET("/{key}/sections/{key}/{category}")
Call<MediaContainer> retrieveSectionsTv(@Path("key") String key,
@Path(value = "category", encoded = true) String category);
@GET("/{key}/sections/{key}/{category}/{secondaryCategory}")
Call<MediaContainer> retrieveSectionsTv(@Path("key") String key,
@Path(value = "category", encoded = true) String category,
@Path(value = "secondaryCategory", encoded = true) String secondaryCategory);
@GET("{urlPath}")
Call<MediaContainer> retrieveItemByUrlPath(@Path(value = "urlPath", encoded = true) String key);
@GET("/{key}/sections/{key}/search?type=1")
Call<MediaContainer> movieSearchTv(@Path("key") String key,
@Query("query") String query);
@GET("/{key}/sections/{key}/search?type=2")
Call<MediaContainer> tvShowsSearchTv(@Path("key") String key,
@Query("query") String query);
@GET("/{key}/sections/{key}/search?type=4")
Call<MediaContainer> episodeSearchTv(@Path("key") String key,
@Query("query") String query);
}
GET 127.0.0.1:32400/tv.plex.providers.epg.onconnect?X-Plex-Token=xxxxxxxxxxxxxxx returns device “key” with “:” unique id
<MediaContainer size="2" content="plugins">
<Directory key="hubs" title="hubs"/>
<Directory key="tv%2Eplex%2Eproviders%2Eepg%2Eonconnect%3A23" title="tv.plex.providers.epg.onconnect:23" content="1"/>
</MediaContainer>
Having some URL encoding issues with the colon “:” if i use the colon i get this error but if i use URL encoding “tv.plex.providers.epg.onconnect%3A23” I get a blank livetv library
Malformed URL. Base: http://192.168.1.50:32400/, Relative: tv.plex.providers.epg.onconnect:23/sections
public interface PlexMediaContainerService {
@GET("/")
Call<MediaContainer> retrieveRoot();
@GET("tv.plex.providers.epg.onconnect%3A23")
Call<MediaContainer> retrieveLibrary();
@GET("tv.plex.providers.epg.onconnect%3A23/sections")
Call<MediaContainer> retrieveSections();
@GET("tv.plex.providers.epg.onconnect%3A23/sections/{key}")
Call<MediaContainer> retrieveSections(@Path("key") String key);
@GET("tv.plex.providers.epg.onconnect%3A23/sections/{key}/{category}")
Call<MediaContainer> retrieveSections(@Path("key") String key,
@Path(value = "category", encoded = true) String category);
@GET("tv.plex.providers.epg.onconnect%3A23/sections/{key}/{category}/{secondaryCategory}")
Call<MediaContainer> retrieveSections(@Path("key") String key,
@Path(value = "category", encoded = true) String category,
@Path(value = "secondaryCategory", encoded = true) String secondaryCategory);
@GET("{urlPath}")
Call<MediaContainer> retrieveItemByUrlPath(@Path(value = "urlPath", encoded = true) String key);
@GET("tv.plex.providers.epg.onconnect%3A23/sections/{key}/search?type=1")
Call<MediaContainer> movieSearch(@Path("key") String key,
@Query("query") String query);
@GET("tv.plex.providers.epg.onconnect%3A23/sections/{key}/search?type=2")
Call<MediaContainer> tvShowsSearch(@Path("key") String key,
@Query("query") String query);
@GET("tv.plex.providers.epg.onconnect%3A23/sections/{key}/search?type=4")
Call<MediaContainer> episodeSearch(@Path("key") String key,
@Query("query") String query);
}
Okay every PMS has a Dvr key=“number” so I am going to have to implement this string
Also figured out the actual json playlist comes directly from the source (HDHomerun) and is NOT stored directly in the plex database.
Apr 26, 2018 21:42:38.033 [0x7f5f3a45b700] DEBUG - DVR:Grabber: Starting operation for 'Live TV - Session'.
Apr 26, 2018 21:42:38.034 [0x7f5f3a45b700] DEBUG - Activity: registered new activity 9e40dd4b-e6d2-4627-85af-f3acba2af499 - Recording
Apr 26, 2018 21:42:38.034 [0x7f5f3a45b700] DEBUG - DVR:Grabber: HDHomerun starting a media grab on device device://tv.plex.grabbers.hdhomerun/13222E3C (Silicondust HDHomeRun PRIME, supported) tuner 0.
Apr 26, 2018 21:42:38.034 [0x7f5f3a45b700] DEBUG - DVR:Grabber: Creating custom segmented recorder for grab for channel 600
Apr 26, 2018 21:42:38.034 [0x7f5f3a45b700] DEBUG - HTTP requesting GET http://192.168.1.218:80/lineup.json
Apr 26, 2018 21:42:38.060 [0x7f5f3a45b700] DEBUG - HTTP 200 response from GET http://192.168.1.218:80/lineup.json
Apr 26, 2018 21:42:38.065 [0x7f5f3a45b700] DEBUG - DVR:Segmenter: Creating a new recorder for http://192.168.1.218:5004/auto/v600.
Apr 26, 2018 21:42:38.066 [0x7f5f3a45b700] DEBUG - DVR:Grabber: Setting timer to stop grab of 'Live TV - Session' in 299 seconds.
@“matt.gorski” any updates on this mate? I’ve been considering looking into building something too but stumbled upon this.