Permalink
Browse files

Initial support for 29

Now that the wsdl for 29 correct imports inital work has been done.  Version .28 offically skipped.
DVR service ported
  • Loading branch information...
jheizer committed Oct 11, 2017
1 parent 47ac10a commit 9cb01b5c6b3b8bfafcc8e26f3aa9faf112c1d4cb
Showing with 10,205 additions and 176 deletions.
  1. BIN .vs/MobileMyth/v14/.suo
  2. BIN .vs/MobileMyth/v15/.suo
  3. BIN .vs/MobileMyth/v15/sqlite3/storage.ide
  4. +17 −9 MobileMyth/App_Code/Common.vb
  5. +6 −7 MobileMyth/App_Code/CustomListItems.vb
  6. +1 −2 MobileMyth/App_Code/Gallery.vb
  7. +66 −15 MobileMyth/App_Code/MythService_25/MythDvr25.vb
  8. +45 −0 MobileMyth/App_Code/MythService_29/MythBackend29.vb
  9. +157 −0 MobileMyth/App_Code/MythService_29/MythDvr29.vb
  10. +6 −5 MobileMyth/App_Code/MythServicesBase/MythBackendBase.vb
  11. +147 −6 MobileMyth/App_Code/MythServicesBase/iMythDvr.vb
  12. +93 −0 MobileMyth/App_Data/logs/log.txt
  13. +1,781 −0 MobileMyth/App_Data/logs/mobilemyth.log
  14. +14 −0 MobileMyth/App_Data/logs/mobilemyth.log.2014-10-29
  15. +93 −0 MobileMyth/App_Data/logs/mobilemyth.log.2014-10-30
  16. +93 −0 MobileMyth/App_Data/logs/mobilemyth.log.2014-11-04
  17. +229 −0 MobileMyth/App_Data/logs/mobilemyth.log.2014-11-07
  18. +325 −0 MobileMyth/App_Data/logs/mobilemyth.log.2015-12-03
  19. +416 −0 MobileMyth/App_Data/logs/mobilemyth.log.2016-05-19
  20. +0 −36 MobileMyth/App_Data/settings.xml
  21. +1 −1 MobileMyth/App_Data/settings/settings.xml
  22. +36 −0 MobileMyth/App_WebReferences/MythDvr_28/DvrServices.discomap
  23. +1,406 −0 MobileMyth/App_WebReferences/MythDvr_28/DvrServices.wsdl
  24. +9 −0 MobileMyth/App_WebReferences/MythDvr_28/xsd.xsd
  25. +16 −0 MobileMyth/App_WebReferences/MythDvr_28/xsd0.xsd
  26. +16 −0 MobileMyth/App_WebReferences/MythDvr_28/xsd1.xsd
  27. +54 −0 MobileMyth/App_WebReferences/MythDvr_28/xsd10.xsd
  28. +10 −0 MobileMyth/App_WebReferences/MythDvr_28/xsd11.xsd
  29. +10 −0 MobileMyth/App_WebReferences/MythDvr_28/xsd12.xsd
  30. +10 −0 MobileMyth/App_WebReferences/MythDvr_28/xsd13.xsd
  31. +10 −0 MobileMyth/App_WebReferences/MythDvr_28/xsd14.xsd
  32. +10 −0 MobileMyth/App_WebReferences/MythDvr_28/xsd15.xsd
  33. +10 −0 MobileMyth/App_WebReferences/MythDvr_28/xsd16.xsd
  34. +10 −0 MobileMyth/App_WebReferences/MythDvr_28/xsd17.xsd
  35. +10 −0 MobileMyth/App_WebReferences/MythDvr_28/xsd18.xsd
  36. +10 −0 MobileMyth/App_WebReferences/MythDvr_28/xsd19.xsd
  37. +10 −0 MobileMyth/App_WebReferences/MythDvr_28/xsd2.xsd
  38. +10 −0 MobileMyth/App_WebReferences/MythDvr_28/xsd20.xsd
  39. +10 −0 MobileMyth/App_WebReferences/MythDvr_28/xsd21.xsd
  40. +12 −0 MobileMyth/App_WebReferences/MythDvr_28/xsd22.xsd
  41. +11 −0 MobileMyth/App_WebReferences/MythDvr_28/xsd23.xsd
  42. +40 −0 MobileMyth/App_WebReferences/MythDvr_28/xsd24.xsd
  43. +10 −0 MobileMyth/App_WebReferences/MythDvr_28/xsd25.xsd
  44. +10 −0 MobileMyth/App_WebReferences/MythDvr_28/xsd26.xsd
  45. +30 −0 MobileMyth/App_WebReferences/MythDvr_28/xsd27.xsd
  46. +28 −0 MobileMyth/App_WebReferences/MythDvr_28/xsd28.xsd
  47. +10 −0 MobileMyth/App_WebReferences/MythDvr_28/xsd3.xsd
  48. +10 −0 MobileMyth/App_WebReferences/MythDvr_28/xsd4.xsd
  49. +10 −0 MobileMyth/App_WebReferences/MythDvr_28/xsd5.xsd
  50. +16 −0 MobileMyth/App_WebReferences/MythDvr_28/xsd6.xsd
  51. +19 −0 MobileMyth/App_WebReferences/MythDvr_28/xsd7.xsd
  52. +17 −0 MobileMyth/App_WebReferences/MythDvr_28/xsd8.xsd
  53. +12 −0 MobileMyth/App_WebReferences/MythDvr_28/xsd9.xsd
  54. +1,617 −0 MobileMyth/App_WebReferences/MythDvr_29/DvrServices.wsdl
  55. +61 −0 MobileMyth/App_WebReferences/MythDvr_29/Reference.svcmap
  56. +10 −0 MobileMyth/App_WebReferences/MythDvr_29/configuration.svcinfo
  57. +201 −0 MobileMyth/App_WebReferences/MythDvr_29/configuration91.svcinfo
  58. +54 −0 MobileMyth/App_WebReferences/MythDvr_29/xsd.xsd
  59. +10 −0 MobileMyth/App_WebReferences/MythDvr_29/xsd1.xsd
  60. +40 −0 MobileMyth/App_WebReferences/MythDvr_29/xsd10.xsd
  61. +16 −0 MobileMyth/App_WebReferences/MythDvr_29/xsd11.xsd
  62. +10 −0 MobileMyth/App_WebReferences/MythDvr_29/xsd12.xsd
  63. +10 −0 MobileMyth/App_WebReferences/MythDvr_29/xsd13.xsd
  64. +10 −0 MobileMyth/App_WebReferences/MythDvr_29/xsd14.xsd
  65. +16 −0 MobileMyth/App_WebReferences/MythDvr_29/xsd15.xsd
  66. +10 −0 MobileMyth/App_WebReferences/MythDvr_29/xsd16.xsd
  67. +10 −0 MobileMyth/App_WebReferences/MythDvr_29/xsd17.xsd
  68. +216 −0 MobileMyth/App_WebReferences/MythDvr_29/xsd18.xsd
  69. +19 −0 MobileMyth/App_WebReferences/MythDvr_29/xsd19.xsd
  70. +10 −0 MobileMyth/App_WebReferences/MythDvr_29/xsd2.xsd
  71. +10 −0 MobileMyth/App_WebReferences/MythDvr_29/xsd20.xsd
  72. +12 −0 MobileMyth/App_WebReferences/MythDvr_29/xsd21.xsd
  73. +30 −0 MobileMyth/App_WebReferences/MythDvr_29/xsd22.xsd
  74. +10 −0 MobileMyth/App_WebReferences/MythDvr_29/xsd23.xsd
  75. +10 −0 MobileMyth/App_WebReferences/MythDvr_29/xsd24.xsd
  76. +10 −0 MobileMyth/App_WebReferences/MythDvr_29/xsd25.xsd
  77. +10 −0 MobileMyth/App_WebReferences/MythDvr_29/xsd26.xsd
  78. +11 −0 MobileMyth/App_WebReferences/MythDvr_29/xsd27.xsd
  79. +10 −0 MobileMyth/App_WebReferences/MythDvr_29/xsd28.xsd
  80. +12 −0 MobileMyth/App_WebReferences/MythDvr_29/xsd29.xsd
  81. +10 −0 MobileMyth/App_WebReferences/MythDvr_29/xsd3.xsd
  82. +16 −0 MobileMyth/App_WebReferences/MythDvr_29/xsd30.xsd
  83. +10 −0 MobileMyth/App_WebReferences/MythDvr_29/xsd4.xsd
  84. +28 −0 MobileMyth/App_WebReferences/MythDvr_29/xsd5.xsd
  85. +10 −0 MobileMyth/App_WebReferences/MythDvr_29/xsd6.xsd
  86. +9 −0 MobileMyth/App_WebReferences/MythDvr_29/xsd7.xsd
  87. +10 −0 MobileMyth/App_WebReferences/MythDvr_29/xsd8.xsd
  88. +17 −0 MobileMyth/App_WebReferences/MythDvr_29/xsd9.xsd
  89. +56 −0 MobileMyth/CastVideos-chrome-master/CONTRIBUTING.md
  90. +1,206 −0 MobileMyth/CastVideos-chrome-master/CastVideos.js
  91. +191 −0 MobileMyth/CastVideos-chrome-master/LICENSE
  92. +45 −0 MobileMyth/CastVideos-chrome-master/README.md
  93. +449 −0 MobileMyth/CastVideos-chrome-master/css/CastVideos.css
  94. +141 −0 MobileMyth/CastVideos-chrome-master/css/demo.css
  95. BIN MobileMyth/CastVideos-chrome-master/imagefiles/android-icon-512x512.png
  96. BIN MobileMyth/CastVideos-chrome-master/imagefiles/apple-touch-icon-114x114-precomposed.png
  97. BIN MobileMyth/CastVideos-chrome-master/imagefiles/apple-touch-icon-57x57-precomposed.png
  98. BIN MobileMyth/CastVideos-chrome-master/imagefiles/apple-touch-icon-72x72-precomposed.png
  99. BIN MobileMyth/CastVideos-chrome-master/imagefiles/audio_bg.png
  100. BIN MobileMyth/CastVideos-chrome-master/imagefiles/audio_bg_level.png
  101. BIN MobileMyth/CastVideos-chrome-master/imagefiles/audio_bg_track.png
  102. BIN MobileMyth/CastVideos-chrome-master/imagefiles/audio_indicator-hover.png
  103. BIN MobileMyth/CastVideos-chrome-master/imagefiles/audio_indicator.png
  104. BIN MobileMyth/CastVideos-chrome-master/imagefiles/audio_indicator_hover.png
  105. BIN MobileMyth/CastVideos-chrome-master/imagefiles/audio_off.png
  106. BIN MobileMyth/CastVideos-chrome-master/imagefiles/audio_on.png
  107. BIN MobileMyth/CastVideos-chrome-master/imagefiles/favicon-16x16.png
  108. BIN MobileMyth/CastVideos-chrome-master/imagefiles/favicon-32x32.png
  109. BIN MobileMyth/CastVideos-chrome-master/imagefiles/favicon-64x64.png
  110. BIN MobileMyth/CastVideos-chrome-master/imagefiles/favicon.ico
  111. BIN MobileMyth/CastVideos-chrome-master/imagefiles/footer_bg.png
  112. BIN MobileMyth/CastVideos-chrome-master/imagefiles/fullscreen.png
  113. BIN MobileMyth/CastVideos-chrome-master/imagefiles/fullscreen_collapse.png
  114. BIN MobileMyth/CastVideos-chrome-master/imagefiles/fullscreen_expand.png
  115. BIN MobileMyth/CastVideos-chrome-master/imagefiles/header_bg-bottom.png
  116. BIN MobileMyth/CastVideos-chrome-master/imagefiles/header_bg-top.png
  117. BIN MobileMyth/CastVideos-chrome-master/imagefiles/header_bg.png
  118. BIN MobileMyth/CastVideos-chrome-master/imagefiles/ic_media_route-hover.png
  119. BIN MobileMyth/CastVideos-chrome-master/imagefiles/ic_media_route-press.png
  120. BIN MobileMyth/CastVideos-chrome-master/imagefiles/ic_media_route_disabled_custom.png
  121. BIN MobileMyth/CastVideos-chrome-master/imagefiles/ic_media_route_hover.png
  122. BIN MobileMyth/CastVideos-chrome-master/imagefiles/ic_media_route_off_custom.png
  123. BIN MobileMyth/CastVideos-chrome-master/imagefiles/ic_media_route_on_0_custom.png
  124. BIN MobileMyth/CastVideos-chrome-master/imagefiles/ic_media_route_on_1_custom.png
  125. BIN MobileMyth/CastVideos-chrome-master/imagefiles/ic_media_route_on_2_custom.png
  126. BIN MobileMyth/CastVideos-chrome-master/imagefiles/ic_media_route_on_custom.png
  127. BIN MobileMyth/CastVideos-chrome-master/imagefiles/ic_media_route_press.png
  128. BIN MobileMyth/CastVideos-chrome-master/imagefiles/logo.png
  129. BIN MobileMyth/CastVideos-chrome-master/imagefiles/pause-hover.png
  130. BIN MobileMyth/CastVideos-chrome-master/imagefiles/pause-press.png
  131. BIN MobileMyth/CastVideos-chrome-master/imagefiles/pause.png
  132. BIN MobileMyth/CastVideos-chrome-master/imagefiles/pause_hover.png
  133. BIN MobileMyth/CastVideos-chrome-master/imagefiles/pause_press.png
  134. BIN MobileMyth/CastVideos-chrome-master/imagefiles/play-hover.png
  135. BIN MobileMyth/CastVideos-chrome-master/imagefiles/play-press.png
  136. BIN MobileMyth/CastVideos-chrome-master/imagefiles/play.png
  137. BIN MobileMyth/CastVideos-chrome-master/imagefiles/play_hover.png
  138. BIN MobileMyth/CastVideos-chrome-master/imagefiles/play_press.png
  139. BIN MobileMyth/CastVideos-chrome-master/imagefiles/tab_bg.png
  140. BIN MobileMyth/CastVideos-chrome-master/imagefiles/thumb_highlight.png
  141. BIN MobileMyth/CastVideos-chrome-master/imagefiles/thumb_hover.png
  142. BIN MobileMyth/CastVideos-chrome-master/imagefiles/timeline_bg_buffer.png
  143. BIN MobileMyth/CastVideos-chrome-master/imagefiles/timeline_bg_progress.png
  144. BIN MobileMyth/CastVideos-chrome-master/imagefiles/timeline_bg_track.png
  145. BIN MobileMyth/CastVideos-chrome-master/imagefiles/timeline_indicator-hover.png
  146. BIN MobileMyth/CastVideos-chrome-master/imagefiles/timeline_indicator.png
  147. BIN MobileMyth/CastVideos-chrome-master/imagefiles/timeline_indicator_hover.png
  148. BIN MobileMyth/CastVideos-chrome-master/imagefiles/video_info_bg.png
  149. BIN MobileMyth/CastVideos-chrome-master/imagefiles/video_overlay.png
  150. BIN MobileMyth/CastVideos-chrome-master/images/Tears.jpg
  151. BIN MobileMyth/CastVideos-chrome-master/images/bunny.jpg
  152. BIN MobileMyth/CastVideos-chrome-master/images/cast_icon_active.png
  153. BIN MobileMyth/CastVideos-chrome-master/images/cast_icon_error.png
  154. BIN MobileMyth/CastVideos-chrome-master/images/cast_icon_idle.png
  155. BIN MobileMyth/CastVideos-chrome-master/images/cast_icon_warning.png
  156. BIN MobileMyth/CastVideos-chrome-master/images/casticon.on.png
  157. BIN MobileMyth/CastVideos-chrome-master/images/ed.jpg
  158. BIN MobileMyth/CastVideos-chrome-master/images/fullscreen.png
  159. BIN MobileMyth/CastVideos-chrome-master/images/google-io-2011.jpg
  160. BIN MobileMyth/CastVideos-chrome-master/images/reel.jpg
  161. +84 −0 MobileMyth/CastVideos-chrome-master/index.html
  162. +4 −5 MobileMyth/phone/default.aspx.vb
  163. +3 −4 MobileMyth/phone/recording.aspx.vb
  164. +1 −2 MobileMyth/phone/recordings.aspx.vb
  165. +2 −3 MobileMyth/phone/shows.aspx.vb
  166. +3 −4 MobileMyth/phone/startstream.aspx.vb
  167. +3 −4 MobileMyth/phone/upcoming.aspx.vb
  168. +10 −11 MobileMyth/tablet/default.aspx.vb
  169. +4 −5 MobileMyth/tablet/episodes.aspx.vb
  170. +1 −2 MobileMyth/tablet/gallery.aspx.vb
  171. +1 −2 MobileMyth/tablet/gallery_slideshow.aspx.vb
  172. +1 −2 MobileMyth/tablet/music.aspx.vb
  173. +2 −3 MobileMyth/tablet/recording.aspx.vb
  174. +1 −2 MobileMyth/tablet/recordings.aspx.vb
  175. +2 −3 MobileMyth/tablet/startstream.aspx.vb
  176. +3 −4 MobileMyth/tablet/upcoming.aspx.vb
  177. +1 −2 MobileMyth/tablet/videos.aspx.vb
  178. +2 −3 MobileMyth/tablet/viewstream.aspx.vb
  179. +29 −29 MobileMyth/transcode.ashx
  180. +23 −5 MobileMyth/web.config
BIN +82 KB (140%) .vs/MobileMyth/v14/.suo
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -35,7 +35,8 @@ Public Class Common
MBE = New MythBackend25
Case Is = MythTvVersion.v27
MBE = New MythBackend27

Case Is = MythTvVersion.v29
MBE = New MythBackend29
End Select
End Sub

@@ -80,15 +81,21 @@ Public Class Common
Dim Nw As New ToType

For Each prop As Reflection.PropertyInfo In GetType(FromType).GetProperties
If Not prop.PropertyType.ToString.EndsWith("List") Then 'Skip sub collections
Dim propgetter As Reflection.MethodInfo = prop.GetGetMethod
Dim toprop As System.Reflection.PropertyInfo = GetType(ToType).GetProperty(prop.Name)
If Not toprop Is Nothing Then ' Make sure the destination class has the type
Dim propsetter As Reflection.MethodInfo = toprop.GetSetMethod
Dim value As Object = propgetter.Invoke(FromObj, Nothing)
propsetter.Invoke(Nw, New Object() {value})
Try
If prop.PropertyType.FullName.StartsWith("System") Then 'Skip sub collections and myth types
Dim propgetter As Reflection.MethodInfo = prop.GetGetMethod
Dim toprop As System.Reflection.PropertyInfo = GetType(ToType).GetProperty(prop.Name)
If Not toprop Is Nothing Then ' Make sure the destination class has the type
Dim propsetter As Reflection.MethodInfo = toprop.GetSetMethod
Dim value As Object = propgetter.Invoke(FromObj, Nothing)
propsetter.Invoke(Nw, New Object() {value})
End If
Else
Dim j As Integer = 0
End If
End If
Catch ex As Exception
Dim i As Integer = 0
End Try
Next

Return Nw
@@ -100,6 +107,7 @@ Public Enum MythTvVersion As Byte
v26 = 1
v27 = 2
v28 = 3
v29 = 4
End Enum


@@ -14,16 +14,15 @@
' You should have received a copy of the GNU General Public License
' along with MobileMyth. If not, see <http://www.gnu.org/licenses/>.

' Copyright 2012-2014 Jonathan Heizer jheizer@gmail.com
' Copyright 2012-2014,2017 Jonathan Heizer jheizer@gmail.com
#End Region

Imports Microsoft.VisualBasic
Imports MythDVR

Public Class RecordingListItem
Inherits HtmlListItem

Public Sub New(ByVal rec As Program)
Public Sub New(ByVal rec As iMythDvr.Program)

Dim Link As New HyperLink
Link.NavigateUrl = "recording.aspx?chan=" & rec.Channel.ChanId & "&time=" & rec.Recording.StartTs.Value.Ticks
@@ -33,8 +32,8 @@ Public Class RecordingListItem
If Not SiteSettings.FrontendSettingBool("NoImages") Then
Dim img As New Image
img.ImageUrl = "../images/loader.gif"
img.Attributes.Add("data-src", Common.ProxyURL("/Content/GetPreviewImage?ChanId=" & rec.Channel.ChanId & "&StartTime=" & _
rec.Recording.StartTs.Value.ToString("yyyy-MM-ddTHH:mm:ssZ") & _
img.Attributes.Add("data-src", Common.ProxyURL("/Content/GetPreviewImage?ChanId=" & rec.Channel.ChanId & "&StartTime=" &
rec.Recording.StartTs.Value.ToString("yyyy-MM-ddTHH:mm:ssZ") &
"&Height=80"))
Link.Controls.Add(img)
End If
@@ -64,11 +63,11 @@ End Class
Public Class UpcomingListItem
Inherits HtmlListItem

Public Sub New(ByVal Rec As Program)
Public Sub New(ByVal Rec As iMythDvr.Program)
Me.New(Rec, True)
End Sub

Public Sub New(ByVal Rec As Program, ShowDescription As Boolean)
Public Sub New(ByVal Rec As iMythDvr.Program, ShowDescription As Boolean)
Dim Builder As New Text.StringBuilder

Builder.Append("<h3>")
@@ -14,12 +14,11 @@
' You should have received a copy of the GNU General Public License
' along with MobileMyth. If not, see <http://www.gnu.org/licenses/>.

' Copyright 2013-2014 Jonathan Heizer jheizer@gmail.com
' Copyright 2013-2014,2017 Jonathan Heizer jheizer@gmail.com
#End Region


Imports MythService
Imports MythDVR
Imports Microsoft.VisualBasic

Public Class Gallery
@@ -18,7 +18,6 @@
#End Region

Imports Microsoft.VisualBasic
Imports MythDVR

Public Class MythDvr25
Implements iMythDvr
@@ -32,41 +31,49 @@ Public Class MythDvr25
Return True
End Function

Public Function GetConflictList(StartIndex As Integer, Count As Integer) As MythDVR.ProgramList Implements iMythDvr.GetConflictList
Return DVR.GetConflictList(StartIndex, Count)
Public Function GetConflictList(StartIndex As Integer, Count As Integer) As iMythDvr.ProgramList Implements iMythDvr.GetConflictList
Return ConvertProgramList(DVR.GetConflictList(StartIndex, Count))
End Function

Public Function GetEncoderList() As MythDVR.EncoderList Implements iMythDvr.GetEncoderList
Return DVR.GetEncoderList
Public Function GetEncoderList() As iMythDvr.EncoderList Implements iMythDvr.GetEncoderList
Dim EncList As New iMythDvr.EncoderList
Dim lst As New List(Of iMythDvr.Encoder)

For Each prog As MythDVR.Encoder In DVR.GetEncoderList.Encoders
lst.Add(ConvertEncoder(prog))
Next

EncList.Encoders = lst.ToArray
Return EncList
End Function

Public Function GetRecorded(ChanId As Integer, StartTime As Date) As MythDVR.Program Implements iMythDvr.GetRecorded
Return DVR.GetRecorded(ChanId, StartTime)
Public Function GetRecorded(ChanId As Integer, StartTime As Date) As iMythDvr.Program Implements iMythDvr.GetRecorded
Return ConvertProgram(DVR.GetRecorded(ChanId, StartTime))
End Function

Public Function GetUpcomingList(StartIndex As Integer, Count As Integer, ShowAll As Boolean) As MythDVR.ProgramList Implements iMythDvr.GetUpcomingList
Return DVR.GetUpcomingList(StartIndex, Count, ShowAll)
Public Function GetUpcomingList(StartIndex As Integer, Count As Integer, ShowAll As Boolean) As iMythDvr.ProgramList Implements iMythDvr.GetUpcomingList
Return ConvertProgramList(DVR.GetUpcomingList(StartIndex, Count, ShowAll))
End Function

Public Function RemoveRecorded(ChanId As Integer, StartTs As Date) As Boolean Implements iMythDvr.RemoveRecorded
Return DVR.RemoveRecorded(ChanId, StartTs)
End Function

Public Function GetRecordedList(Descending As Boolean, StartIndex As Integer, Count As Integer, Cache As Boolean) As MythDVR.ProgramList Implements iMythDvr.GetRecordedList
Dim Recordings As MythDVR.ProgramList = Nothing
Public Function GetRecordedList(Descending As Boolean, StartIndex As Integer, Count As Integer, Cache As Boolean) As iMythDvr.ProgramList Implements iMythDvr.GetRecordedList
Dim Recordings As iMythDvr.ProgramList = Nothing

Try
If Cache Then
Recordings = HttpContext.Current.Cache("GetRecordedList" & Count.ToString)

If Recordings Is Nothing Then
Recordings = DVR.GetRecordedList(Descending, StartIndex, Count)
Recordings = ConvertProgramList(DVR.GetRecordedList(Descending, StartIndex, Count))

'Cache the list so we don't have to reload it as often
HttpContext.Current.Cache.Add("GetRecordedList", Recordings, Nothing, Now.AddMinutes(1), Nothing, CacheItemPriority.Low, Nothing)
End If
Else
Recordings = DVR.GetRecordedList(Descending, StartIndex, Count)
Recordings = ConvertProgramList(DVR.GetRecordedList(Descending, StartIndex, Count))
End If
Catch ex As Exception
Logger.Error("Error loading recorded list", ex)
@@ -79,8 +86,8 @@ Public Class MythDvr25
Public Function GetTitles() As List(Of iMythDvr.RecordingTitle) Implements iMythDvr.GetTitles
Dim Titles As New List(Of iMythDvr.RecordingTitle)

Dim Recordings As ProgramList = Common.MBE.DvrAPI.GetRecordedList(True, 0, 100000, True)
Dim Programs() As Program = Array.FindAll(Recordings.Programs, Function(p) p.Recording.StorageGroup <> "Deleted" AndAlso p.Recording.StorageGroup <> "LiveTV")
Dim Recordings As iMythDvr.ProgramList = Common.MBE.DvrAPI.GetRecordedList(True, 0, 100000, True)
Dim Programs() As iMythDvr.Program = Array.FindAll(Recordings.Programs, Function(p) p.Recording.StorageGroup <> "Deleted" AndAlso p.Recording.StorageGroup <> "LiveTV")

Dim Lst = From n In Programs _
Group n By n.Title Into Count() _
@@ -103,4 +110,48 @@ Public Class MythDvr25
HttpContext.Current.Cache.Remove("GetRecordedList")
End Sub


Private Function ConvertProgramList(WSProgList As MythDVR.ProgramList) As iMythDvr.ProgramList
Dim ProgList As iMythDvr.ProgramList = Common.ConvertTypes(Of MythDVR.ProgramList, iMythDvr.ProgramList)(WSProgList)

Dim lst As New List(Of iMythDvr.Program)

For Each prog As MythDVR.Program In WSProgList.Programs
lst.Add(ConvertProgram(prog))
Next

ProgList.Programs = lst.ToArray
Return ProgList
End Function

Private Function ConvertProgram(WS As MythDVR.Program) As iMythDvr.Program
Dim iObj As iMythDvr.Program = Common.ConvertTypes(Of MythDVR.Program, iMythDvr.Program)(WS)

iObj.Artwork = ConvertArtworkInfoList(WS.Artwork)
iObj.Recording = Common.ConvertTypes(Of MythDVR.RecordingInfo, iMythDvr.RecordingInfo)(WS.Recording)
iObj.Channel = Common.ConvertTypes(Of MythDVR.ChannelInfo, iMythDvr.ChannelInfo)(WS.Channel)

Return iObj
End Function

Private Function ConvertArtworkInfoList(WS As MythDVR.ArtworkInfoList) As iMythDvr.ArtworkInfoList
Dim iObj As iMythDvr.ArtworkInfoList = Common.ConvertTypes(Of MythDVR.ArtworkInfoList, iMythDvr.ArtworkInfoList)(WS)

Dim lst As New List(Of iMythDvr.ArtworkInfo)

For Each prog As MythDVR.ArtworkInfo In WS.ArtworkInfos
lst.Add(Common.ConvertTypes(Of MythDVR.ArtworkInfo, iMythDvr.ArtworkInfo)(prog))
Next

iObj.ArtworkInfos = lst.ToArray
Return iObj
End Function

Private Function ConvertEncoder(WS As MythDVR.Encoder) As iMythDvr.Encoder
Dim iObj As iMythDvr.Encoder = Common.ConvertTypes(Of MythDVR.Encoder, iMythDvr.Encoder)(WS)
iObj.Recording = ConvertProgram(WS.Recording)

Return iObj
End Function

End Class
@@ -0,0 +1,45 @@
#Region "GPL"
' This file is part of MobileMyth.

' MobileMyth is free software: you can redistribute it and/or modify
' it under the terms of the GNU General Public License as published by
' the Free Software Foundation, either version 3 of the License, or
' (at your option) any later version.

' MobileMyth is distributed in the hope that it will be useful,
' but WITHOUT ANY WARRANTY; without even the implied warranty of
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
' GNU General Public License for more details.

' You should have received a copy of the GNU General Public License
' along with MobileMyth. If not, see <http://www.gnu.org/licenses/>.

' Copyright 2012-2017 Jonathan Heizer jheizer@gmail.com
#End Region

Imports Microsoft.VisualBasic

Public Class MythBackend29
Inherits MythBackendBase

Public Sub New()
MyBase.New()

ContentAPI = New MythContent27
ContentAPI.Init(Address, Port)

GuideAPI = New MythGuide25
GuideAPI.Init(Address, Port)

DvrAPI = New MythDvr29
DvrAPI.Init(Address, Port)

ServiceAPI = New MythService25
ServiceAPI.Init(Address, Port)

VideoAPI = New MythVideo27
VideoAPI.Init(Address, Port)

MyBase.Init()
End Sub
End Class
Oops, something went wrong.

0 comments on commit 9cb01b5

Please sign in to comment.