Jump to content

Tvheadend plugin for Emby - Beta 1


Tolotos

Recommended Posts

Hi all,

 

I wrote a Tvheadend plugin for Emby. 

 

Unzip the attached dll and put it into the Plugins folder of your server.

e.g.: C:\Users\<username>\AppData\Roaming\MediaBrowser-Server\Plugins

 

In the configurations dialog you must set at least the servername, user and password for your tvheadend server. 

If you changed the default ports adapt it to your values. 

 

I implemented the plugin with my "old" tvheadend server version 3.4.27. 

This version don't support series timers so all code for this is not tested.

 

Please report found issues here. 

 

Have fun

Tolotos

TVHeadEnd.zip

Edited by Tolotos
  • Like 8
Link to post
Share on other sites

Did you've implemented the HTSP protocol? Since it's more robust by using TCP it should be prefered over traditional Streaming protocols.

Link to post
Share on other sites

The communication between Emby and Tvheadend is HTSP streaming is over HTTP. 

Streaming over HTSP should be possible but needs much more knowledge and time.

  • Like 1
Link to post
Share on other sites
im85288

This works great, thanks for bringing it to us.

 

The only thing I noticed so far was that it did not allow blank username and password (yes I know it's bad) to be entered. I had to create a username and password on tvheadend to get around it. Other than that it really is great work, well done!

Link to post
Share on other sites

I'm trying to get this to work, but I guess the odds are against me as I'm running Emby in a docker container and tvheadend is version 3.9 (git)

 

I have the plugin setup and it's connected. It has downloaded channel icons but that's pretty much it.

 

If I try to click on guide or channels it's giving me

 

	Cannot cast from source type to destination type.

The log is spitting out quite a few errors:

 

Error - DtoUtils: ServiceBase<TRequest>::Service Exception
    *** Error Report ***
    Version: 3.0.5572.0
    Command line: /opt/mediabrowser/MediaBrowser.Server.Mono.exe -programdata /config
    Operating system: Unix 3.13.0.48
    Processor count: 4
    64-Bit OS: True
    64-Bit Process: True
    Program data path: /config
    Mono: 3.10.0 (tarball Wed Nov  5 12:50:04 UTC 2014)
    Application Path: /opt/mediabrowser/MediaBrowser.Server.Mono.exe
    Cannot cast from source type to destination type.
    System.InvalidCastException
      at TVHeadEnd.HTSP.HTSMessage.getBigInteger (System.String name) [0x00000] in <filename unknown>:0
      at TVHeadEnd.HTSP.HTSMessage.getInt (System.String name) [0x00000] in <filename unknown>:0
      at TVHeadEnd.DataHelper.DvrDataHelper+<>c__DisplayClassc.<buildPendingTimersInfos>b__b () [0x00000] in <filename unknown>:0
      at System.Threading.Tasks.TaskActionInvoker+FuncInvoke`1[System.Collections.Generic.IEnumerable`1[MediaBrowser.Controller.LiveTv.TimerInfo]].Invoke (System.Threading.Tasks.Task owner, System.Object state, System.Threading.Tasks.Task context) [0x00000] in <filename unknown>:0
      at System.Threading.Tasks.Task.InnerInvoke () [0x00000] in <filename unknown>:0
      at System.Threading.Tasks.Task.ThreadStart () [0x00000] in <filename unknown>:0
    --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
      at System.Runtime.CompilerServices.TaskAwaiter`1[System.Collections.Generic.IEnumerable`1[MediaBrowser.Controller.LiveTv.TimerInfo]].GetResult () [0x00000] in <filename unknown>:0
      at TVHeadEnd.LiveTvService+<GetTimersAsync>d__32.MoveNext () [0x00000] in <filename unknown>:0
    --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
      at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[System.Collections.Generic.IEnumerable`1[MediaBrowser.Controller.LiveTv.TimerInfo]].GetResult () [0x00000] in <filename unknown>:0
      at MediaBrowser.Server.Implementations.LiveTv.LiveTvManager+<AddRecordingInfo>c__asyncF.MoveNext () [0x00000] in <filename unknown>:0
    --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
      at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <filename unknown>:0
      at MediaBrowser.Server.Implementations.LiveTv.LiveTvManager+<GetRecommendedPrograms>c__asyncE.MoveNext () [0x00000] in <filename unknown>:0
    --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
      at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[MediaBrowser.Model.Querying.QueryResult`1[MediaBrowser.Model.LiveTv.ProgramInfoDto]].GetResult () [0x00000] in <filename unknown>:0
      at MediaBrowser.Api.LiveTv.LiveTvService+<Get>c__async5.MoveNext () [0x00000] in <filename unknown>:0
    
2015-04-08 17:10:22.0953 Error - DtoUtils: ServiceBase<TRequest>::Service Exception
    *** Error Report ***
    Version: 3.0.5572.0
    Command line: /opt/mediabrowser/MediaBrowser.Server.Mono.exe -programdata /config
    Operating system: Unix 3.13.0.48
    Processor count: 4
    64-Bit OS: True
    64-Bit Process: True
    Program data path: /config
    Mono: 3.10.0 (tarball Wed Nov  5 12:50:04 UTC 2014)
    Application Path: /opt/mediabrowser/MediaBrowser.Server.Mono.exe
    Cannot cast from source type to destination type.
    System.InvalidCastException
      at TVHeadEnd.HTSP.HTSMessage.getBigInteger (System.String name) [0x00000] in <filename unknown>:0
      at TVHeadEnd.HTSP.HTSMessage.getInt (System.String name) [0x00000] in <filename unknown>:0
      at TVHeadEnd.DataHelper.DvrDataHelper+<>c__DisplayClassc.<buildPendingTimersInfos>b__b () [0x00000] in <filename unknown>:0
      at System.Threading.Tasks.TaskActionInvoker+FuncInvoke`1[System.Collections.Generic.IEnumerable`1[MediaBrowser.Controller.LiveTv.TimerInfo]].Invoke (System.Threading.Tasks.Task owner, System.Object state, System.Threading.Tasks.Task context) [0x00000] in <filename unknown>:0
      at System.Threading.Tasks.Task.InnerInvoke () [0x00000] in <filename unknown>:0
      at System.Threading.Tasks.Task.ThreadStart () [0x00000] in <filename unknown>:0
    --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
      at System.Runtime.CompilerServices.TaskAwaiter`1[System.Collections.Generic.IEnumerable`1[MediaBrowser.Controller.LiveTv.TimerInfo]].GetResult () [0x00000] in <filename unknown>:0
      at TVHeadEnd.LiveTvService+<GetTimersAsync>d__32.MoveNext () [0x00000] in <filename unknown>:0
    --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
      at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[System.Collections.Generic.IEnumerable`1[MediaBrowser.Controller.LiveTv.TimerInfo]].GetResult () [0x00000] in <filename unknown>:0
      at MediaBrowser.Server.Implementations.LiveTv.LiveTvManager+<AddRecordingInfo>c__asyncF.MoveNext () [0x00000] in <filename unknown>:0
    --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
      at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <filename unknown>:0
      at MediaBrowser.Server.Implementations.LiveTv.LiveTvManager+<GetRecommendedPrograms>c__asyncE.MoveNext () [0x00000] in <filename unknown>:0
    --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
      at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[MediaBrowser.Model.Querying.QueryResult`1[MediaBrowser.Model.LiveTv.ProgramInfoDto]].GetResult () [0x00000] in <filename unknown>:0
      at MediaBrowser.Api.LiveTv.LiveTvService+<Get>c__async5.MoveNext () [0x00000] in <filename unknown>:0
    
2015-04-08 17:10:22.0953 Error - HttpServer: Error processing request for /LiveTv/Programs/Recommended?userId=2ec276a2642e54a19b612b9418a8bd3b&IsAiring=true&limit=16
    *** Error Report ***
    Version: 3.0.5572.0
    Command line: /opt/mediabrowser/MediaBrowser.Server.Mono.exe -programdata /config
    Operating system: Unix 3.13.0.48
    Processor count: 4
    64-Bit OS: True
    64-Bit Process: True
    Program data path: /config
    Mono: 3.10.0 (tarball Wed Nov  5 12:50:04 UTC 2014)
    Application Path: /opt/mediabrowser/MediaBrowser.Server.Mono.exe
    Cannot cast from source type to destination type.
    ServiceStack.HttpError
    No Stack Trace Available
    
2015-04-08 17:10:22.0953 Error - HttpServer: Error processing request for /LiveTv/Programs/Recommended?userId=2ec276a2642e54a19b612b9418a8bd3b&IsAiring=false&HasAired=false&limit=10&IsSports=true
    *** Error Report ***
    Version: 3.0.5572.0
    Command line: /opt/mediabrowser/MediaBrowser.Server.Mono.exe -programdata /config
    Operating system: Unix 3.13.0.48
    Processor count: 4
    64-Bit OS: True
    64-Bit Process: True
    Program data path: /config
    Mono: 3.10.0 (tarball Wed Nov  5 12:50:04 UTC 2014)
    Application Path: /opt/mediabrowser/MediaBrowser.Server.Mono.exe
    Cannot cast from source type to destination type.
    ServiceStack.HttpError
    No Stack Trace Available
    
2015-04-08 17:10:22.1096 Error - DtoUtils: ServiceBase<TRequest>::Service Exception
    *** Error Report ***
    Version: 3.0.5572.0
    Command line: /opt/mediabrowser/MediaBrowser.Server.Mono.exe -programdata /config
    Operating system: Unix 3.13.0.48
    Processor count: 4
    64-Bit OS: True
    64-Bit Process: True
    Program data path: /config
    Mono: 3.10.0 (tarball Wed Nov  5 12:50:04 UTC 2014)
    Application Path: /opt/mediabrowser/MediaBrowser.Server.Mono.exe
    Cannot cast from source type to destination type.
    System.InvalidCastException
      at TVHeadEnd.HTSP.HTSMessage.getBigInteger (System.String name) [0x00000] in <filename unknown>:0
      at TVHeadEnd.HTSP.HTSMessage.getInt (System.String name) [0x00000] in <filename unknown>:0
      at TVHeadEnd.DataHelper.DvrDataHelper+<>c__DisplayClassc.<buildPendingTimersInfos>b__b () [0x00000] in <filename unknown>:0
      at System.Threading.Tasks.TaskActionInvoker+FuncInvoke`1[System.Collections.Generic.IEnumerable`1[MediaBrowser.Controller.LiveTv.TimerInfo]].Invoke (System.Threading.Tasks.Task owner, System.Object state, System.Threading.Tasks.Task context) [0x00000] in <filename unknown>:0
      at System.Threading.Tasks.Task.InnerInvoke () [0x00000] in <filename unknown>:0
      at System.Threading.Tasks.Task.ThreadStart () [0x00000] in <filename unknown>:0
    --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
      at System.Runtime.CompilerServices.TaskAwaiter`1[System.Collections.Generic.IEnumerable`1[MediaBrowser.Controller.LiveTv.TimerInfo]].GetResult () [0x00000] in <filename unknown>:0
      at TVHeadEnd.LiveTvService+<GetTimersAsync>d__32.MoveNext () [0x00000] in <filename unknown>:0
    --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
      at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[System.Collections.Generic.IEnumerable`1[MediaBrowser.Controller.LiveTv.TimerInfo]].GetResult () [0x00000] in <filename unknown>:0
      at MediaBrowser.Server.Implementations.LiveTv.LiveTvManager+<AddRecordingInfo>c__asyncF.MoveNext () [0x00000] in <filename unknown>:0
    --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
      at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <filename unknown>:0
      at MediaBrowser.Server.Implementations.LiveTv.LiveTvManager+<GetRecommendedPrograms>c__asyncE.MoveNext () [0x00000] in <filename unknown>:0
    --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
      at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[MediaBrowser.Model.Querying.QueryResult`1[MediaBrowser.Model.LiveTv.ProgramInfoDto]].GetResult () [0x00000] in <filename unknown>:0
      at MediaBrowser.Api.LiveTv.LiveTvService+<Get>c__async5.MoveNext () [0x00000] in <filename unknown>:0
    
2015-04-08 17:10:22.1096 Error - HttpServer: Error processing request for /LiveTv/Programs/Recommended?userId=2ec276a2642e54a19b612b9418a8bd3b&IsAiring=false&HasAired=false&limit=10&IsMovie=true
    *** Error Report ***
    Version: 3.0.5572.0
    Command line: /opt/mediabrowser/MediaBrowser.Server.Mono.exe -programdata /config
    Operating system: Unix 3.13.0.48
    Processor count: 4
    64-Bit OS: True
    64-Bit Process: True
    Program data path: /config
    Mono: 3.10.0 (tarball Wed Nov  5 12:50:04 UTC 2014)
    Application Path: /opt/mediabrowser/MediaBrowser.Server.Mono.exe
    Cannot cast from source type to destination type.
    ServiceStack.HttpError
    No Stack Trace Available
    
2015-04-08 17:10:22.1916 Error - DtoUtils: ServiceBase<TRequest>::Service Exception
    *** Error Report ***
    Version: 3.0.5572.0
    Command line: /opt/mediabrowser/MediaBrowser.Server.Mono.exe -programdata /config
    Operating system: Unix 3.13.0.48
    Processor count: 4
    64-Bit OS: True
    64-Bit Process: True
    Program data path: /config
    Mono: 3.10.0 (tarball Wed Nov  5 12:50:04 UTC 2014)
    Application Path: /opt/mediabrowser/MediaBrowser.Server.Mono.exe
    Cannot cast from source type to destination type.
    System.InvalidCastException
      at TVHeadEnd.HTSP.HTSMessage.getBigInteger (System.String name) [0x00000] in <filename unknown>:0
      at TVHeadEnd.HTSP.HTSMessage.getInt (System.String name) [0x00000] in <filename unknown>:0
      at TVHeadEnd.DataHelper.DvrDataHelper+<>c__DisplayClassc.<buildPendingTimersInfos>b__b () [0x00000] in <filename unknown>:0
      at System.Threading.Tasks.TaskActionInvoker+FuncInvoke`1[System.Collections.Generic.IEnumerable`1[MediaBrowser.Controller.LiveTv.TimerInfo]].Invoke (System.Threading.Tasks.Task owner, System.Object state, System.Threading.Tasks.Task context) [0x00000] in <filename unknown>:0
      at System.Threading.Tasks.Task.InnerInvoke () [0x00000] in <filename unknown>:0
      at System.Threading.Tasks.Task.ThreadStart () [0x00000] in <filename unknown>:0
    --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
      at System.Runtime.CompilerServices.TaskAwaiter`1[System.Collections.Generic.IEnumerable`1[MediaBrowser.Controller.LiveTv.TimerInfo]].GetResult () [0x00000] in <filename unknown>:0
      at TVHeadEnd.LiveTvService+<GetTimersAsync>d__32.MoveNext () [0x00000] in <filename unknown>:0
    --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
      at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[System.Collections.Generic.IEnumerable`1[MediaBrowser.Controller.LiveTv.TimerInfo]].GetResult () [0x00000] in <filename unknown>:0
      at MediaBrowser.Server.Implementations.LiveTv.LiveTvManager+<AddRecordingInfo>c__asyncF.MoveNext () [0x00000] in <filename unknown>:0
    --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
      at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <filename unknown>:0
      at MediaBrowser.Server.Implementations.LiveTv.LiveTvManager+<GetRecommendedPrograms>c__asyncE.MoveNext () [0x00000] in <filename unknown>:0
    --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
      at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[MediaBrowser.Model.Querying.QueryResult`1[MediaBrowser.Model.LiveTv.ProgramInfoDto]].GetResult () [0x00000] in <filename unknown>:0
      at MediaBrowser.Api.LiveTv.LiveTvService+<Get>c__async5.MoveNext () [0x00000] in <filename unknown>:0
    
2015-04-08 17:10:22.1916 Error - HttpServer: Error processing request for /LiveTv/Programs/Recommended?userId=2ec276a2642e54a19b612b9418a8bd3b&IsAiring=false&HasAired=false&limit=10&IsMovie=false&IsSports=false
    *** Error Report ***
    Version: 3.0.5572.0
    Command line: /opt/mediabrowser/MediaBrowser.Server.Mono.exe -programdata /config
    Operating system: Unix 3.13.0.48
    Processor count: 4
    64-Bit OS: True
    64-Bit Process: True
    Program data path: /config
    Mono: 3.10.0 (tarball Wed Nov  5 12:50:04 UTC 2014)
    Application Path: /opt/mediabrowser/MediaBrowser.Server.Mono.exe
    Cannot cast from source type to destination type.
    ServiceStack.HttpError
    No Stack Trace Available
    
2015-04-08 17:10:37.5709 Error - DtoUtils: ServiceBase<TRequest>::Service Exception
    *** Error Report ***
    Version: 3.0.5572.0
    Command line: /opt/mediabrowser/MediaBrowser.Server.Mono.exe -programdata /config
    Operating system: Unix 3.13.0.48
    Processor count: 4
    64-Bit OS: True
    64-Bit Process: True
    Program data path: /config
    Mono: 3.10.0 (tarball Wed Nov  5 12:50:04 UTC 2014)
    Application Path: /opt/mediabrowser/MediaBrowser.Server.Mono.exe
    Cannot cast from source type to destination type.
    System.InvalidCastException
      at TVHeadEnd.HTSP.HTSMessage.getBigInteger (System.String name) [0x00000] in <filename unknown>:0
      at TVHeadEnd.HTSP.HTSMessage.getInt (System.String name) [0x00000] in <filename unknown>:0
      at TVHeadEnd.DataHelper.DvrDataHelper+<>c__DisplayClassc.<buildPendingTimersInfos>b__b () [0x00000] in <filename unknown>:0
      at System.Threading.Tasks.TaskActionInvoker+FuncInvoke`1[System.Collections.Generic.IEnumerable`1[MediaBrowser.Controller.LiveTv.TimerInfo]].Invoke (System.Threading.Tasks.Task owner, System.Object state, System.Threading.Tasks.Task context) [0x00000] in <filename unknown>:0
      at System.Threading.Tasks.Task.InnerInvoke () [0x00000] in <filename unknown>:0
      at System.Threading.Tasks.Task.ThreadStart () [0x00000] in <filename unknown>:0
    --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
      at System.Runtime.CompilerServices.TaskAwaiter`1[System.Collections.Generic.IEnumerable`1[MediaBrowser.Controller.LiveTv.TimerInfo]].GetResult () [0x00000] in <filename unknown>:0
      at TVHeadEnd.LiveTvService+<GetTimersAsync>d__32.MoveNext () [0x00000] in <filename unknown>:0
    --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
      at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[System.Collections.Generic.IEnumerable`1[MediaBrowser.Controller.LiveTv.TimerInfo]].GetResult () [0x00000] in <filename unknown>:0
      at MediaBrowser.Server.Implementations.LiveTv.LiveTvManager+<AddRecordingInfo>c__asyncF.MoveNext () [0x00000] in <filename unknown>:0
    --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
      at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <filename unknown>:0
      at MediaBrowser.Server.Implementations.LiveTv.LiveTvManager+<GetPrograms>c__asyncC.MoveNext () [0x00000] in <filename unknown>:0
    --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
      at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[MediaBrowser.Model.Querying.QueryResult`1[MediaBrowser.Model.LiveTv.ProgramInfoDto]].GetResult () [0x00000] in <filename unknown>:0
      at MediaBrowser.Api.LiveTv.LiveTvService+<Get>c__async4.MoveNext () [0x00000] in <filename unknown>:0
    
2015-04-08 17:10:37.5710 Error - HttpServer: Error processing request for /LiveTv/Programs?ChannelIds=6a660f1e9ad5aec9807216bca6997529&UserId=2ec276a2642e54a19b612b9418a8bd3b
    *** Error Report ***
    Version: 3.0.5572.0
    Command line: /opt/mediabrowser/MediaBrowser.Server.Mono.exe -programdata /config
    Operating system: Unix 3.13.0.48
    Processor count: 4
    64-Bit OS: True
    64-Bit Process: True
    Program data path: /config
    Mono: 3.10.0 (tarball Wed Nov  5 12:50:04 UTC 2014)
    Application Path: /opt/mediabrowser/MediaBrowser.Server.Mono.exe
    Cannot cast from source type to destination type.
    ServiceStack.HttpError
    No Stack Trace Available
Link to post
Share on other sites

Playback of channels do actually work, but I'm missing EPG and recordings/schedules. (and web gui is throwing errors)

 

I'm seeing about 15-20 sec wait to start a channel.

 

also, stream is not stopped when I close playback. FFMPEG is still transcoding and tvheadend is streaming.

 

looking at the log, it seems it was able to read EPG, because emby server log has a  lot of hits to http://api.themoviedb.org for epg items.

Edited by KRA
Link to post
Share on other sites
puithove

Just started to play with this now.  I'm seeing two issues.  My setup:  Emby server is running on linux - same machine as TVHeadend.  Emby version 3.0.5572.0 - TVHeadend version from git - 3.9.2525~g96898a6

 

When accessing any guide data in the webclient, I get an short error about not able to cast type (which I recognize as a .Net error).  In the server logs I see these:

2015-04-09 07:51:36.2292 Error - DtoUtils: ServiceBase<TRequest>::Service Exception
	*** Error Report ***
	Version: 3.0.5572.0
	Command line: /usr/lib/emby-server/MediaBrowser.Server.Mono.exe -programdata /var/lib/emby-server -ffmpeg /usr/bin/ffmpeg -ffprobe /usr/bin/ffprobe
	Operating system: Unix 3.19.2.1
	Processor count: 12
	64-Bit OS: True
	64-Bit Process: True
	Program data path: /var/lib/emby-server
	Mono: 3.12.1 (tarball Thu Mar 12 06:31:20 UTC 2015)
	Application Path: /usr/lib/emby-server/MediaBrowser.Server.Mono.exe
	Cannot cast from source type to destination type.
	System.InvalidCastException
	  at TVHeadEnd.HTSP.HTSMessage.getBigInteger (System.String name) [0x00000] in <filename unknown>:0 
	  at TVHeadEnd.HTSP.HTSMessage.getInt (System.String name) [0x00000] in <filename unknown>:0 
	  at TVHeadEnd.DataHelper.DvrDataHelper+<>c__DisplayClassc.<buildPendingTimersInfos>b__b () [0x00000] in <filename unknown>:0 
	  at System.Threading.Tasks.TaskActionInvoker+FuncInvoke`1[System.Collections.Generic.IEnumerable`1[MediaBrowser.Controller.LiveTv.TimerInfo]].Invoke (System.Threading.Tasks.Task owner, System.Object state, System.Threading.Tasks.Task context) [0x00000] in <filename unknown>:0 
	  at System.Threading.Tasks.Task.InnerInvoke () [0x00000] in <filename unknown>:0 
	  at System.Threading.Tasks.Task.ThreadStart () [0x00000] in <filename unknown>:0 
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter`1[System.Collections.Generic.IEnumerable`1[MediaBrowser.Controller.LiveTv.TimerInfo]].GetResult () [0x00000] in <filename unknown>:0 
	  at TVHeadEnd.LiveTvService+<GetTimersAsync>d__32.MoveNext () [0x00000] in <filename unknown>:0 
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 
	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[System.Collections.Generic.IEnumerable`1[MediaBrowser.Controller.LiveTv.TimerInfo]].GetResult () [0x00000] in <filename unknown>:0 
	  at MediaBrowser.Server.Implementations.LiveTv.LiveTvManager+<AddRecordingInfo>c__asyncF.MoveNext () [0x00000] in <filename unknown>:0 
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 
	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <filename unknown>:0 
	  at MediaBrowser.Server.Implementations.LiveTv.LiveTvManager+<GetPrograms>c__asyncC.MoveNext () [0x00000] in <filename unknown>:0 
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 
	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[MediaBrowser.Model.Querying.QueryResult`1[MediaBrowser.Model.LiveTv.ProgramInfoDto]].GetResult () [0x00000] in <filename unknown>:0 
	  at MediaBrowser.Api.LiveTv.LiveTvService+<Get>c__async4.MoveNext () [0x00000] in <filename unknown>:0 
	
2015-04-09 07:51:36.2292 Error - HttpServer: Error processing request for /mediabrowser/LiveTv/Programs?ChannelIds=d74029a77b6df06b7dbc56cf74fe741c&UserId=e4fafe12771947c5e7923375b97685f4
	*** Error Report ***
	Version: 3.0.5572.0
	Command line: /usr/lib/emby-server/MediaBrowser.Server.Mono.exe -programdata /var/lib/emby-server -ffmpeg /usr/bin/ffmpeg -ffprobe /usr/bin/ffprobe
	Operating system: Unix 3.19.2.1
	Processor count: 12
	64-Bit OS: True
	64-Bit Process: True
	Program data path: /var/lib/emby-server
	Mono: 3.12.1 (tarball Thu Mar 12 06:31:20 UTC 2015)
	Application Path: /usr/lib/emby-server/MediaBrowser.Server.Mono.exe
	Cannot cast from source type to destination type.
	ServiceStack.HttpError
	No Stack Trace Available

But I am actually able to get to the channels list, click on a channel (which also generates the above error as it's apparently trying to show me guid data for what's on the channel).  I'm able to start playback, and playback works.  When I stop playback normally though, I also see this in the server log which makes it look like the playback didn't exit cleanly:

2015-04-09 07:56:54.0669 Info - App: Killing ffmpeg process for /share/.tmp/ed34d5457ff4f074d2b9fadc87ac8c36.webm
2015-04-09 07:56:54.0959 Error - App: Error streaming media. The client has most likely disconnected or transcoding has failed.
	*** Error Report ***
	Version: 3.0.5572.0
	Command line: /usr/lib/emby-server/MediaBrowser.Server.Mono.exe -programdata /var/lib/emby-server -ffmpeg /usr/bin/ffmpeg -ffprobe /usr/bin/ffprobe
	Operating system: Unix 3.19.2.1
	Processor count: 12
	64-Bit OS: True
	64-Bit Process: True
	Program data path: /var/lib/emby-server
	Mono: 3.12.1 (tarball Thu Mar 12 06:31:20 UTC 2015)
	Application Path: /usr/lib/emby-server/MediaBrowser.Server.Mono.exe
	Write failure
	System.IO.IOException
	  at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0 
	  at SocketHttpListener.Net.ResponseStream.InternalWrite (System.Byte[] buffer, Int32 offset, Int32 count) [0x00000] in <filename unknown>:0 
	  at SocketHttpListener.Net.ResponseStream.Write (System.Byte[] buffer, Int32 offset, Int32 count) [0x00000] in <filename unknown>:0 
	  at MediaBrowser.Api.Playback.Progressive.ProgressiveFileCopier.CopyToInternal (System.IO.Stream source, System.IO.Stream destination, Int32 bufferSize) [0x00000] in <filename unknown>:0 
	  at MediaBrowser.Api.Playback.Progressive.ProgressiveFileCopier.StreamFile (System.String path, System.IO.Stream outputStream) [0x00000] in <filename unknown>:0 
	  at MediaBrowser.Api.Playback.Progressive.ProgressiveStreamWriter.WriteToInternal (System.IO.Stream responseStream) [0x00000] in <filename unknown>:0 
	InnerException: System.Net.Sockets.SocketException
	The socket has been shut down
	  at System.Net.Sockets.Socket.Send (System.Byte[] buf, Int32 offset, Int32 size, SocketFlags flags) [0x00000] in <filename unknown>:0 
	  at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0 
	
2015-04-09 07:56:54.0967 Error - HttpServer: Error in HttpListenerResponseWrapper: Write failure
	*** Error Report ***
	Version: 3.0.5572.0
	Command line: /usr/lib/emby-server/MediaBrowser.Server.Mono.exe -programdata /var/lib/emby-server -ffmpeg /usr/bin/ffmpeg -ffprobe /usr/bin/ffprobe
	Operating system: Unix 3.19.2.1
	Processor count: 12
	64-Bit OS: True
	64-Bit Process: True
	Program data path: /var/lib/emby-server
	Mono: 3.12.1 (tarball Thu Mar 12 06:31:20 UTC 2015)
	Application Path: /usr/lib/emby-server/MediaBrowser.Server.Mono.exe
	Write failure
	System.IO.IOException
	  at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0 
	  at SocketHttpListener.Net.ResponseStream.InternalWrite (System.Byte[] buffer, Int32 offset, Int32 count) [0x00000] in <filename unknown>:0 
	  at SocketHttpListener.Net.ResponseStream.Close () [0x00000] in <filename unknown>:0 
	  at MediaBrowser.Server.Implementations.HttpServer.SocketSharp.Extensions.CloseOutputStream (SocketHttpListener.Net.HttpListenerResponse response, ILogger logger) [0x00000] in <filename unknown>:0 
	InnerException: System.Net.Sockets.SocketException
	The socket has been shut down
	  at System.Net.Sockets.Socket.Send (System.Byte[] buf, Int32 offset, Int32 size, SocketFlags flags) [0x00000] in <filename unknown>:0 
	  at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0 
	
2015-04-09 07:56:54.0967 Error - HttpAsyncTaskHandler: Error occured while Processing Request: Write failure
	*** Error Report ***
	Version: 3.0.5572.0
	Command line: /usr/lib/emby-server/MediaBrowser.Server.Mono.exe -programdata /var/lib/emby-server -ffmpeg /usr/bin/ffmpeg -ffprobe /usr/bin/ffprobe
	Operating system: Unix 3.19.2.1
	Processor count: 12
	64-Bit OS: True
	64-Bit Process: True
	Program data path: /var/lib/emby-server
	Mono: 3.12.1 (tarball Thu Mar 12 06:31:20 UTC 2015)
	Application Path: /usr/lib/emby-server/MediaBrowser.Server.Mono.exe
	Write failure
	System.IO.IOException
	  at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0 
	  at SocketHttpListener.Net.ResponseStream.InternalWrite (System.Byte[] buffer, Int32 offset, Int32 count) [0x00000] in <filename unknown>:0 
	  at SocketHttpListener.Net.ResponseStream.Write (System.Byte[] buffer, Int32 offset, Int32 count) [0x00000] in <filename unknown>:0 
	  at ServiceStack.Formats.HtmlFormat.SerializeToStream (IRequest request, System.Object response, IResponse httpRes) [0x00000] in <filename unknown>:0 
	  at ServiceStack.HttpResponseExtensionsInternal.WriteErrorToResponse (IResponse httpRes, IRequest httpReq, System.String contentType, System.String operationName, System.String errorMessage, System.Exception ex, Int32 statusCode) [0x00000] in <filename unknown>:0 
	  at ServiceStack.ServiceStackHost.OnUncaughtException (IRequest httpReq, IResponse httpRes, System.String operationName, System.Exception ex) [0x00000] in <filename unknown>:0 
	  at ServiceStack.HostContext.RaiseUncaughtException (IRequest httpReq, IResponse httpRes, System.String operationName, System.Exception ex) [0x00000] in <filename unknown>:0 
	  at ServiceStack.HttpResponseExtensionsInternal.WriteToResponse (IResponse response, System.Object result, ServiceStack.Web.ResponseSerializerDelegate defaultAction, IRequest request, System.Byte[] bodyPrefix, System.Byte[] bodySuffix) [0x00000] in <filename unknown>:0 
	  at ServiceStack.HttpResponseExtensionsInternal.WriteToResponse (IResponse httpRes, IRequest httpReq, System.Object result, System.Byte[] bodyPrefix, System.Byte[] bodySuffix) [0x00000] in <filename unknown>:0 
	  at ServiceStack.HttpResponseExtensionsInternal.WriteToResponse (IResponse httpRes, IRequest httpReq, System.Object result) [0x00000] in <filename unknown>:0 
	  at ServiceStack.Host.RestHandler+<>c__DisplayClass5.<ProcessRequestAsync>b__0 (System.Object response) [0x00000] in <filename unknown>:0 
	  at ServiceStack.Host.Handlers.ServiceStackHandlerBase.HandleResponse (System.Object response, System.Func`2 callback, System.Func`2 errorCallback) [0x00000] in <filename unknown>:0 
	InnerException: System.Net.Sockets.SocketException
	The socket has been shut down
	  at System.Net.Sockets.Socket.Send (System.Byte[] buf, Int32 offset, Int32 size, SocketFlags flags) [0x00000] in <filename unknown>:0 
	  at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0 
	
2015-04-09 07:56:54.1181 Info - App: Deleting partial stream file(s) /share/.tmp/ed34d5457ff4f074d2b9fadc87ac8c36.webm
2015-04-09 07:56:54.1181 Info - App: FFMpeg exited with code 0
2015-04-09 07:56:54.1218 Info - App: Closing live stream from TVHclient, stream Id: 1
2015-04-09 07:56:54.1218 Info - App: [TVHclient] CloseLiveStream for subscriptionId = 1
2015-04-09 07:56:55.0960 Info - App: Deleting partial stream file(s) /share/.tmp/ed34d5457ff4f074d2b9fadc87ac8c36.webm
Link to post
Share on other sites

Hi,

 

KRA and puithove can you please check the attached version. 

I double check the tvheadend documentation and can't find an wrong cast.

The new version now catches the exception, logs the name of the wrong field and skip settings the value.  

 

The connection is unfortunately not close able. I give the URL to Emby and lost control. 

A close method is called than from Emby but tvheadend has no method to close this http stream.

 

Yours Tolotos

TVHeadEnd.zip

  • Like 1
Link to post
Share on other sites

@@Tolotos

 

Attached version gives epg

 

as for the stream not closing I guess there's a bug in emby then, not killing ffmpeg when I close playback, because tvheadend should kill stream when ffmpeg is dead.

 

It also reads my schedules now, but nothing is displayed when I click recordings.

 

I have a lot of these in my log:

Fatal - App: [TVHclient] Caught InvalidCastException for field name 'autorecId'. Expected  System.Numerics.BigInteger but got 'System.String'

And

 

Error - App: Error getting recordings
    *** Error Report ***
    Version: 3.0.5572.0
    Command line: /opt/mediabrowser/MediaBrowser.Server.Mono.exe -programdata /config
    Operating system: Unix 3.13.0.48
    Processor count: 4
    64-Bit OS: True
    64-Bit Process: True
    Program data path: /config
    Mono: 3.10.0 (tarball Wed Nov  5 12:50:04 UTC 2014)
    Application Path: /opt/mediabrowser/MediaBrowser.Server.Mono.exe
    Cannot cast from source type to destination type.
    System.InvalidCastException
      at TVHeadEnd.HTSP.HTSMessage.getBigInteger (System.String name) [0x00000] in <filename unknown>:0
    --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
      at System.Runtime.CompilerServices.TaskAwaiter`1[System.Collections.Generic.IEnumerable`1[MediaBrowser.Controller.LiveTv.RecordingInfo]].GetResult () [0x00000] in <filename unknown>:0
      at TVHeadEnd.LiveTvService+<GetRecordingsAsync>d__a.MoveNext () [0x00000] in <filename unknown>:0
    --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
      at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[System.Collections.Generic.IEnumerable`1[MediaBrowser.Controller.LiveTv.RecordingInfo]].GetResult () [0x00000] in <filename unknown>:0
      at MediaBrowser.Server.Implementations.LiveTv.LiveTvManager+<GetInternalRecordings>c__async16+<GetInternalRecordings>c__AnonStorey4A+<GetInternalRecordings>c__async49.MoveNext () [0x00000] in <filename unknown>:0
Edited by KRA
Link to post
Share on other sites

@@KRA I have no idea what the second stack trace causes. All accesses are surrounded by a try / catch block. Can you please check the attached version? 

Did you put both files from the zip into the plugin folder? The *.pdb should give more detailed information about the error location. 

 

I changed the access to the autorecId field to string.

 

Tolotos

 

TVHeadEnd.zip

  • Like 1
Link to post
Share on other sites

@@Tolotos

 

Great stuff, I'm now getting recordings listing and I also got a icon indicating series recording in the schedules that I don't think was there before.

 

playback of recordings work great but I do get a "session not found" error printed onscreen when it starts playback.

 

FFMPEG is killed when I close playback of recording and live-tv now  :)

 

Also live-tv is much faster to start playback, very nice.

 

I did copy both files and I still have some errors in log though:

 

 

2015-04-09 19:36:59.7013 Error - HttpServer: Error in SharpWebSocket: An exception has occurred while receiving a message.
2015-04-09 19:38:35.9182 Info - App: Opening recording stream from TVHclient, external recording Id: 1530796060
2015-04-09 19:38:35.9210 Info - App: Live stream info: {"Protocol":"Http","Id":"0","Path":"http://192.168.10.205:9981/dvrfile/1530796060?ticket=095CBD8F3B272FBC9BBCB4A16886B8C0D1070B0C","Type":"Default","ReadAtNativeFramerate":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"RequiresOpening":false,"RequiresClosing":true,"LiveStreamId":"41c95b6de5174f82acbc56fe82d0a2f8_0","MediaStreams":[{"IsInterlaced":false,"IsDefault":false,"IsForced":false,"Type":"Video","Index":-1,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false},{"IsInterlaced":false,"IsDefault":false,"IsForced":false,"Type":"Audio","Index":-1,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false}],"PlayableStreamFileNames":[],"Formats":[],"RequiredHttpHeaders":{}}
2015-04-09 19:38:36.0620 Info - App: /config/ffmpeg/20150331/ffmpeg -fflags +genpts -i "http://192.168.10.205:9981/dvrfile/1530796060?ticket=095CBD8F3B272FBC9BBCB4A16886B8C0D1070B0C" -sn -codec:v:0 libvpx -force_key_frames expr:gte(t,n_forced*5) -vf "scale=min(iw\,1920):trunc(ow/dar/2)*2" -pix_fmt yuv420p -speed 16 -quality good -profile:v 0 -slices 8 -crf 10 -qmin 0 -qmax 50 -maxrate:v 29872000 -bufsize:v (29872000*2) -b:v 29872000 -vsync vfr -map_metadata -1 -threads 3 -codec:a:0 libvorbis -ab 128000 -af "aresample=async=1" -y "/config/transcoding-temp/9e094abfdd63d6d098f7ec0867e3b37b.webm"
2015-04-09 19:38:37.4991 Info - Trakt: Playback Started
2015-04-09 19:38:37.6527 Error - HttpServer: Error in SharpWebSocket: An exception has occurred while receiving a message.
2015-04-09 19:38:38.9339 Error - DtoUtils: ServiceBase<TRequest>::Service Exception
    *** Error Report ***
    Version: 3.0.5572.0
    Command line: /opt/mediabrowser/MediaBrowser.Server.Mono.exe -programdata /config
    Operating system: Unix 3.13.0.48
    Processor count: 4
    64-Bit OS: True
    64-Bit Process: True
    Program data path: /config
    Mono: 3.10.0 (tarball Wed Nov  5 12:50:04 UTC 2014)
    Application Path: /opt/mediabrowser/MediaBrowser.Server.Mono.exe
    Session not found.
    System.ArgumentException
      at MediaBrowser.Api.BaseApiService+<GetSession>c__async0.MoveNext () [0x00000] in <filename unknown>:0
    
2015-04-09 19:38:38.9373 Error - HttpServer: Error processing request for /mediabrowser/Sessions/Playing/Progress
    *** Error Report ***
    Version: 3.0.5572.0
    Command line: /opt/mediabrowser/MediaBrowser.Server.Mono.exe -programdata /config
    Operating system: Unix 3.13.0.48
    Processor count: 4
    64-Bit OS: True
    64-Bit Process: True
    Program data path: /config
    Mono: 3.10.0 (tarball Wed Nov  5 12:50:04 UTC 2014)
    Application Path: /opt/mediabrowser/MediaBrowser.Server.Mono.exe
    Session not found.
    ServiceStack.HttpError
    No Stack Trace Available
    
2015-04-09 19:38:45.6989 Error - App: Error streaming media. The client has most likely disconnected or transcoding has failed.
    *** Error Report ***
    Version: 3.0.5572.0
    Command line: /opt/mediabrowser/MediaBrowser.Server.Mono.exe -programdata /config
    Operating system: Unix 3.13.0.48
    Processor count: 4
    64-Bit OS: True
    64-Bit Process: True
    Program data path: /config
    Mono: 3.10.0 (tarball Wed Nov  5 12:50:04 UTC 2014)
    Application Path: /opt/mediabrowser/MediaBrowser.Server.Mono.exe
    Write failure
    System.IO.IOException
      at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0
      at SocketHttpListener.Net.ResponseStream.InternalWrite (System.Byte[] buffer, Int32 offset, Int32 count) [0x00000] in <filename unknown>:0
      at SocketHttpListener.Net.ResponseStream.Write (System.Byte[] buffer, Int32 offset, Int32 count) [0x00000] in <filename unknown>:0
      at MediaBrowser.Api.Playback.Progressive.ProgressiveFileCopier.CopyToInternal (System.IO.Stream source, System.IO.Stream destination, Int32 bufferSize) [0x00000] in <filename unknown>:0
      at MediaBrowser.Api.Playback.Progressive.ProgressiveFileCopier.StreamFile (System.String path, System.IO.Stream outputStream) [0x00000] in <filename unknown>:0
      at MediaBrowser.Api.Playback.Progressive.ProgressiveStreamWriter.WriteToInternal (System.IO.Stream responseStream) [0x00000] in <filename unknown>:0
    InnerException: System.Net.Sockets.SocketException
    Connection reset by peer
      at System.Net.Sockets.Socket.Send (System.Byte[] buf, Int32 offset, Int32 size, SocketFlags flags) [0x00000] in <filename unknown>:0
      at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0
    
2015-04-09 19:38:45.7070 Error - HttpServer: Error in HttpListenerResponseWrapper: Write failure
    *** Error Report ***
    Version: 3.0.5572.0
    Command line: /opt/mediabrowser/MediaBrowser.Server.Mono.exe -programdata /config
    Operating system: Unix 3.13.0.48
    Processor count: 4
    64-Bit OS: True
    64-Bit Process: True
    Program data path: /config
    Mono: 3.10.0 (tarball Wed Nov  5 12:50:04 UTC 2014)
    Application Path: /opt/mediabrowser/MediaBrowser.Server.Mono.exe
    Write failure
    System.IO.IOException
      at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0
      at SocketHttpListener.Net.ResponseStream.InternalWrite (System.Byte[] buffer, Int32 offset, Int32 count) [0x00000] in <filename unknown>:0
      at SocketHttpListener.Net.ResponseStream.Close () [0x00000] in <filename unknown>:0
      at MediaBrowser.Server.Implementations.HttpServer.SocketSharp.Extensions.CloseOutputStream (SocketHttpListener.Net.HttpListenerResponse response, ILogger logger) [0x00000] in <filename unknown>:0
    InnerException: System.Net.Sockets.SocketException
    The socket has been shut down
      at System.Net.Sockets.Socket.Send (System.Byte[] buf, Int32 offset, Int32 size, SocketFlags flags) [0x00000] in <filename unknown>:0
      at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0
    
2015-04-09 19:38:45.7070 Error - HttpAsyncTaskHandler: Error occured while Processing Request: Write failure
    *** Error Report ***
    Version: 3.0.5572.0
    Command line: /opt/mediabrowser/MediaBrowser.Server.Mono.exe -programdata /config
    Operating system: Unix 3.13.0.48
    Processor count: 4
    64-Bit OS: True
    64-Bit Process: True
    Program data path: /config
    Mono: 3.10.0 (tarball Wed Nov  5 12:50:04 UTC 2014)
    Application Path: /opt/mediabrowser/MediaBrowser.Server.Mono.exe
    Write failure
    System.IO.IOException
      at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0
      at SocketHttpListener.Net.ResponseStream.InternalWrite (System.Byte[] buffer, Int32 offset, Int32 count) [0x00000] in <filename unknown>:0
      at SocketHttpListener.Net.ResponseStream.Write (System.Byte[] buffer, Int32 offset, Int32 count) [0x00000] in <filename unknown>:0
      at ServiceStack.Formats.HtmlFormat.SerializeToStream (IRequest request, System.Object response, IResponse httpRes) [0x00000] in <filename unknown>:0
      at ServiceStack.HttpResponseExtensionsInternal.WriteErrorToResponse (IResponse httpRes, IRequest httpReq, System.String contentType, System.String operationName, System.String errorMessage, System.Exception ex, Int32 statusCode) [0x00000] in <filename unknown>:0
      at ServiceStack.ServiceStackHost.OnUncaughtException (IRequest httpReq, IResponse httpRes, System.String operationName, System.Exception ex) [0x00000] in <filename unknown>:0
      at ServiceStack.HostContext.RaiseUncaughtException (IRequest httpReq, IResponse httpRes, System.String operationName, System.Exception ex) [0x00000] in <filename unknown>:0
      at ServiceStack.HttpResponseExtensionsInternal.WriteToResponse (IResponse response, System.Object result, ServiceStack.Web.ResponseSerializerDelegate defaultAction, IRequest request, System.Byte[] bodyPrefix, System.Byte[] bodySuffix) [0x00000] in <filename unknown>:0
      at ServiceStack.HttpResponseExtensionsInternal.WriteToResponse (IResponse httpRes, IRequest httpReq, System.Object result, System.Byte[] bodyPrefix, System.Byte[] bodySuffix) [0x00000] in <filename unknown>:0
      at ServiceStack.HttpResponseExtensionsInternal.WriteToResponse (IResponse httpRes, IRequest httpReq, System.Object result) [0x00000] in <filename unknown>:0
      at ServiceStack.Host.RestHandler+<>c__DisplayClass5.<ProcessRequestAsync>b__0 (System.Object response) [0x00000] in <filename unknown>:0
      at ServiceStack.Host.Handlers.ServiceStackHandlerBase.HandleResponse (System.Object response, System.Func`2 callback, System.Func`2 errorCallback) [0x00000] in <filename unknown>:0
    InnerException: System.Net.Sockets.SocketException
    The socket has been shut down
      at System.Net.Sockets.Socket.Send (System.Byte[] buf, Int32 offset, Int32 size, SocketFlags flags) [0x00000] in <filename unknown>:0
      at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0
    
2015-04-09 19:38:45.7191 Info - App: Closing live stream from TVHclient, stream Id: 0
2015-04-09 19:38:45.7248 Info - Trakt: Item is played. Scrobble
2015-04-09 19:38:46.7016 Info - App: Killing ffmpeg process for /config/transcoding-temp/9e094abfdd63d6d098f7ec0867e3b37b.webm
2015-04-09 19:38:46.7419 Info - App: Deleting partial stream file(s) /config/transcoding-temp/9e094abfdd63d6d098f7ec0867e3b37b.webm
2015-04-09 19:38:46.7447 Info - App: FFMpeg exited with code 0
2015-04-09 19:38:51.0850 Info - App: Opening recording stream from TVHclient, external recording Id: 1259080598
2015-04-09 19:38:51.0857 Info - App: Live stream info: {"Protocol":"Http","Id":"1","Path":"http://192.168.10.205:9981/dvrfile/1259080598?ticket=E1668ABDCB4B95969497E1F8167B7C43D6076C63","Type":"Default","ReadAtNativeFramerate":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"RequiresOpening":false,"RequiresClosing":true,"LiveStreamId":"41c95b6de5174f82acbc56fe82d0a2f8_1","MediaStreams":[{"IsInterlaced":false,"IsDefault":false,"IsForced":false,"Type":"Video","Index":-1,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false},{"IsInterlaced":false,"IsDefault":false,"IsForced":false,"Type":"Audio","Index":-1,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false}],"PlayableStreamFileNames":[],"Formats":[],"RequiredHttpHeaders":{}}
2015-04-09 19:38:51.1174 Info - App: /config/ffmpeg/20150331/ffmpeg -fflags +genpts -i "http://192.168.10.205:9981/dvrfile/1259080598?ticket=E1668ABDCB4B95969497E1F8167B7C43D6076C63" -sn -codec:v:0 libvpx -force_key_frames expr:gte(t,n_forced*5) -vf "scale=min(iw\,1920):trunc(ow/dar/2)*2" -pix_fmt yuv420p -speed 16 -quality good -profile:v 0 -slices 8 -crf 10 -qmin 0 -qmax 50 -maxrate:v 29872000 -bufsize:v (29872000*2) -b:v 29872000 -vsync vfr -map_metadata -1 -threads 3 -codec:a:0 libvorbis -ab 128000 -af "aresample=async=1" -y "/config/transcoding-temp/a04f76b6c06ff6a30dd65019835c19ea.webm"
2015-04-09 19:38:52.4907 Info - Trakt: Playback Started
2015-04-09 19:38:52.5966 Error - HttpServer: Error in SharpWebSocket: An exception has occurred while receiving a message.
2015-04-09 19:38:53.8537 Error - DtoUtils: ServiceBase<TRequest>::Service Exception
    *** Error Report ***
    Version: 3.0.5572.0
    Command line: /opt/mediabrowser/MediaBrowser.Server.Mono.exe -programdata /config
    Operating system: Unix 3.13.0.48
    Processor count: 4
    64-Bit OS: True
    64-Bit Process: True
    Program data path: /config
    Mono: 3.10.0 (tarball Wed Nov  5 12:50:04 UTC 2014)
    Application Path: /opt/mediabrowser/MediaBrowser.Server.Mono.exe
    Session not found.
    System.ArgumentException
      at MediaBrowser.Api.BaseApiService+<GetSession>c__async0.MoveNext () [0x00000] in <filename unknown>:0
    
2015-04-09 19:38:53.8537 Error - HttpServer: Error processing request for /mediabrowser/Sessions/Playing/Progress
    *** Error Report ***
    Version: 3.0.5572.0
    Command line: /opt/mediabrowser/MediaBrowser.Server.Mono.exe -programdata /config
    Operating system: Unix 3.13.0.48
    Processor count: 4
    64-Bit OS: True
    64-Bit Process: True
    Program data path: /config
    Mono: 3.10.0 (tarball Wed Nov  5 12:50:04 UTC 2014)
    Application Path: /opt/mediabrowser/MediaBrowser.Server.Mono.exe
    Session not found.
    ServiceStack.HttpError
    No Stack Trace Available
    
2015-04-09 19:39:08.3083 Error - App: Error streaming media. The client has most likely disconnected or transcoding has failed.
    *** Error Report ***
    Version: 3.0.5572.0
    Command line: /opt/mediabrowser/MediaBrowser.Server.Mono.exe -programdata /config
    Operating system: Unix 3.13.0.48
    Processor count: 4
    64-Bit OS: True
    64-Bit Process: True
    Program data path: /config
    Mono: 3.10.0 (tarball Wed Nov  5 12:50:04 UTC 2014)
    Application Path: /opt/mediabrowser/MediaBrowser.Server.Mono.exe
    Write failure
    System.IO.IOException
      at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0
      at SocketHttpListener.Net.ResponseStream.InternalWrite (System.Byte[] buffer, Int32 offset, Int32 count) [0x00000] in <filename unknown>:0
      at SocketHttpListener.Net.ResponseStream.Write (System.Byte[] buffer, Int32 offset, Int32 count) [0x00000] in <filename unknown>:0
      at MediaBrowser.Api.Playback.Progressive.ProgressiveFileCopier.CopyToInternal (System.IO.Stream source, System.IO.Stream destination, Int32 bufferSize) [0x00000] in <filename unknown>:0
      at MediaBrowser.Api.Playback.Progressive.ProgressiveFileCopier.StreamFile (System.String path, System.IO.Stream outputStream) [0x00000] in <filename unknown>:0
      at MediaBrowser.Api.Playback.Progressive.ProgressiveStreamWriter.WriteToInternal (System.IO.Stream responseStream) [0x00000] in <filename unknown>:0
    InnerException: System.Net.Sockets.SocketException
    Connection reset by peer
      at System.Net.Sockets.Socket.Send (System.Byte[] buf, Int32 offset, Int32 size, SocketFlags flags) [0x00000] in <filename unknown>:0
      at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0
    
2015-04-09 19:39:08.3092 Error - HttpServer: Error in HttpListenerResponseWrapper: Write failure
    *** Error Report ***
    Version: 3.0.5572.0
    Command line: /opt/mediabrowser/MediaBrowser.Server.Mono.exe -programdata /config
    Operating system: Unix 3.13.0.48
    Processor count: 4
    64-Bit OS: True
    64-Bit Process: True
    Program data path: /config
    Mono: 3.10.0 (tarball Wed Nov  5 12:50:04 UTC 2014)
    Application Path: /opt/mediabrowser/MediaBrowser.Server.Mono.exe
    Write failure
    System.IO.IOException
      at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0
      at SocketHttpListener.Net.ResponseStream.InternalWrite (System.Byte[] buffer, Int32 offset, Int32 count) [0x00000] in <filename unknown>:0
      at SocketHttpListener.Net.ResponseStream.Close () [0x00000] in <filename unknown>:0
      at MediaBrowser.Server.Implementations.HttpServer.SocketSharp.Extensions.CloseOutputStream (SocketHttpListener.Net.HttpListenerResponse response, ILogger logger) [0x00000] in <filename unknown>:0
    InnerException: System.Net.Sockets.SocketException
    The socket has been shut down
      at System.Net.Sockets.Socket.Send (System.Byte[] buf, Int32 offset, Int32 size, SocketFlags flags) [0x00000] in <filename unknown>:0
      at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0
    
2015-04-09 19:39:08.3092 Error - HttpAsyncTaskHandler: Error occured while Processing Request: Write failure
    *** Error Report ***
    Version: 3.0.5572.0
    Command line: /opt/mediabrowser/MediaBrowser.Server.Mono.exe -programdata /config
    Operating system: Unix 3.13.0.48
    Processor count: 4
    64-Bit OS: True
    64-Bit Process: True
    Program data path: /config
    Mono: 3.10.0 (tarball Wed Nov  5 12:50:04 UTC 2014)
    Application Path: /opt/mediabrowser/MediaBrowser.Server.Mono.exe
    Write failure
    System.IO.IOException
      at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0
      at SocketHttpListener.Net.ResponseStream.InternalWrite (System.Byte[] buffer, Int32 offset, Int32 count) [0x00000] in <filename unknown>:0
      at SocketHttpListener.Net.ResponseStream.Write (System.Byte[] buffer, Int32 offset, Int32 count) [0x00000] in <filename unknown>:0
      at ServiceStack.Formats.HtmlFormat.SerializeToStream (IRequest request, System.Object response, IResponse httpRes) [0x00000] in <filename unknown>:0
      at ServiceStack.HttpResponseExtensionsInternal.WriteErrorToResponse (IResponse httpRes, IRequest httpReq, System.String contentType, System.String operationName, System.String errorMessage, System.Exception ex, Int32 statusCode) [0x00000] in <filename unknown>:0
      at ServiceStack.ServiceStackHost.OnUncaughtException (IRequest httpReq, IResponse httpRes, System.String operationName, System.Exception ex) [0x00000] in <filename unknown>:0
      at ServiceStack.HostContext.RaiseUncaughtException (IRequest httpReq, IResponse httpRes, System.String operationName, System.Exception ex) [0x00000] in <filename unknown>:0
      at ServiceStack.HttpResponseExtensionsInternal.WriteToResponse (IResponse response, System.Object result, ServiceStack.Web.ResponseSerializerDelegate defaultAction, IRequest request, System.Byte[] bodyPrefix, System.Byte[] bodySuffix) [0x00000] in <filename unknown>:0
      at ServiceStack.HttpResponseExtensionsInternal.WriteToResponse (IResponse httpRes, IRequest httpReq, System.Object result, System.Byte[] bodyPrefix, System.Byte[] bodySuffix) [0x00000] in <filename unknown>:0
      at ServiceStack.HttpResponseExtensionsInternal.WriteToResponse (IResponse httpRes, IRequest httpReq, System.Object result) [0x00000] in <filename unknown>:0
      at ServiceStack.Host.RestHandler+<>c__DisplayClass5.<ProcessRequestAsync>b__0 (System.Object response) [0x00000] in <filename unknown>:0
      at ServiceStack.Host.Handlers.ServiceStackHandlerBase.HandleResponse (System.Object response, System.Func`2 callback, System.Func`2 errorCallback) [0x00000] in <filename unknown>:0
    InnerException: System.Net.Sockets.SocketException
    The socket has been shut down
      at System.Net.Sockets.Socket.Send (System.Byte[] buf, Int32 offset, Int32 size, SocketFlags flags) [0x00000] in <filename unknown>:0
      at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0
    
2015-04-09 19:39:08.3183 Info - App: Closing live stream from TVHclient, stream Id: 1
2015-04-09 19:39:08.3188 Info - Trakt: Item is played. Scrobble
2015-04-09 19:39:09.3084 Info - App: Killing ffmpeg process for /config/transcoding-temp/a04f76b6c06ff6a30dd65019835c19ea.webm
2015-04-09 19:39:09.3590 Info - App: Deleting partial stream file(s) /config/transcoding-temp/a04f76b6c06ff6a30dd65019835c19ea.webm
2015-04-09 19:39:09.3590 Info - App: FFMpeg exited with code 0
Link to post
Share on other sites

Also I've noticed when I set a recording it is added with default DVR profile, and it is given "important" as priority.  I guess that is ok as default values, but it would be great to have an option there. I don't know what the emby api gives you to work with in that regard. I hope you continue work on this plugin, I'm really impressed by how well it works in current state, I think it already should be included as a built in option in emby with it's current state.

 

And I hope someone gets time to revamp the epg view in emby web soon, I guess it's ok, but the missing items bug is a little nasty.

Link to post
Share on other sites

@@KRA The errors you send must be issues of tvheadend or Emby. The complete streaming is out of my code. I ask tvheadend for the http-ticket for a recording or a live stream build the URL for Emby. Which looks like

http://<serverName from your config>:<httpPort from your config><path gotten from tvheadend>?ticket=<ticket gotten from tvheadend>

==>

http://192.168.10.205:9981/dvrfile/1530796060?ticket=095CBD8F3B272FBC9BBCB4A16886B8C0D1070B0C

This URL is given to Emby and I have no further control.

 

 

The EPG bug blocks me one week searching in my code a reason for the missing entries.

Link to post
Share on other sites

Just wanted to let you know since you cannot test it.

 

Series timers does not work, it comes up empty (but normal schedule indicate difference between normal and series timers). Unfortunately there is nothing in the log

Link to post
Share on other sites
puithove

Very cool, using that most recent version posted, things are working.  Guide data is filled in, playback works fine.  I am seeing quite a few errors in the log, but it doesn't seem to be affecting functionality as far as I can tell.

2015-04-09 16:45:30.9796 Error - App: Error in Live TV Service Provider
	*** Error Report ***
	Version: 3.0.5572.0
	Command line: /usr/lib/emby-server/MediaBrowser.Server.Mono.exe -programdata /var/lib/emby-server -ffmpeg /usr/bin/ffmpeg -ffprobe /usr/bin/ffprobe
	Operating system: Unix 3.19.2.1
	Processor count: 12
	64-Bit OS: True
	64-Bit Process: True
	Program data path: /var/lib/emby-server
	Mono: 3.12.1 (tarball Thu Mar 12 06:31:20 UTC 2015)
	Application Path: /usr/lib/emby-server/MediaBrowser.Server.Mono.exe
	Invalid URI: The URI scheme is not valid.
	System.UriFormatException
	  at System.Uri.Parse (UriKind kind, System.String uriString) [0x00000] in <filename unknown>:0 
	  at System.Uri.ParseUri (UriKind kind) [0x00000] in <filename unknown>:0 
	  at System.Uri..ctor (System.String uriString, Boolean dontEscape) [0x00000] in <filename unknown>:0 
	  at System.Uri..ctor (System.String uriString) [0x00000] in <filename unknown>:0 
	  at System.Net.WebRequest.Create (System.String requestUriString) [0x00000] in <filename unknown>:0 
	  at MediaBrowser.Common.Implementations.HttpClientManager.HttpClientManager.GetRequest (MediaBrowser.Common.Net.HttpRequestOptions options, System.String method, Boolean enableHttpCompression) [0x00000] in <filename unknown>:0 
	  at MediaBrowser.Common.Implementations.HttpClientManager.HttpClientManager+<SendAsyncInternal>c__async4.MoveNext () [0x00000] in <filename unknown>:0 
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 
	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[MediaBrowser.Common.Net.HttpResponseInfo].GetResult () [0x00000] in <filename unknown>:0 
	  at MediaBrowser.Common.Implementations.HttpClientManager.HttpClientManager+<SendAsync>c__async1.MoveNext () [0x00000] in <filename unknown>:0 
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 
	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[MediaBrowser.Common.Net.HttpResponseInfo].GetResult () [0x00000] in <filename unknown>:0 
	  at MediaBrowser.Server.Implementations.LiveTv.ChannelImageProvider+<GetImage>c__async0.MoveNext () [0x00000] in <filename unknown>:0 
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 
	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[MediaBrowser.Controller.Providers.DynamicImageResponse].GetResult () [0x00000] in <filename unknown>:0 
	  at MediaBrowser.Providers.Manager.ItemImageProvider+<RefreshFromProvider>c__async1.MoveNext () [0x00000] in <filename unknown>:0 
	
2015-04-09 16:45:30.9871 Error - App: Error in Live TV Service Provider
	*** Error Report ***
	Version: 3.0.5572.0
	Command line: /usr/lib/emby-server/MediaBrowser.Server.Mono.exe -programdata /var/lib/emby-server -ffmpeg /usr/bin/ffmpeg -ffprobe /usr/bin/ffprobe
	Operating system: Unix 3.19.2.1
	Processor count: 12
	64-Bit OS: True
	64-Bit Process: True
	Program data path: /var/lib/emby-server
	Mono: 3.12.1 (tarball Thu Mar 12 06:31:20 UTC 2015)
	Application Path: /usr/lib/emby-server/MediaBrowser.Server.Mono.exe
	Invalid URI: The URI scheme is not valid.
	System.UriFormatException
	  at System.Uri.Parse (UriKind kind, System.String uriString) [0x00000] in <filename unknown>:0 
	  at System.Uri.ParseUri (UriKind kind) [0x00000] in <filename unknown>:0 
	  at System.Uri..ctor (System.String uriString, Boolean dontEscape) [0x00000] in <filename unknown>:0 
	  at System.Uri..ctor (System.String uriString) [0x00000] in <filename unknown>:0 
	  at System.Net.WebRequest.Create (System.String requestUriString) [0x00000] in <filename unknown>:0 
	  at MediaBrowser.Common.Implementations.HttpClientManager.HttpClientManager.GetRequest (MediaBrowser.Common.Net.HttpRequestOptions options, System.String method, Boolean enableHttpCompression) [0x00000] in <filename unknown>:0 
	  at MediaBrowser.Common.Implementations.HttpClientManager.HttpClientManager+<SendAsyncInternal>c__async4.MoveNext () [0x00000] in <filename unknown>:0 
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 
	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[MediaBrowser.Common.Net.HttpResponseInfo].GetResult () [0x00000] in <filename unknown>:0 
	  at MediaBrowser.Common.Implementations.HttpClientManager.HttpClientManager+<SendAsync>c__async1.MoveNext () [0x00000] in <filename unknown>:0 
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 
	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[MediaBrowser.Common.Net.HttpResponseInfo].GetResult () [0x00000] in <filename unknown>:0 
	  at MediaBrowser.Server.Implementations.LiveTv.ChannelImageProvider+<GetImage>c__async0.MoveNext () [0x00000] in <filename unknown>:0 
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 
	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[MediaBrowser.Controller.Providers.DynamicImageResponse].GetResult () [0x00000] in <filename unknown>:0 
	  at MediaBrowser.Providers.Manager.ItemImageProvider+<RefreshFromProvider>c__async1.MoveNext () [0x00000] in <filename unknown>:0 
	
2015-04-09 16:45:30.9884 Error - App: Error in Live TV Service Provider
	*** Error Report ***
	Version: 3.0.5572.0
	Command line: /usr/lib/emby-server/MediaBrowser.Server.Mono.exe -programdata /var/lib/emby-server -ffmpeg /usr/bin/ffmpeg -ffprobe /usr/bin/ffprobe
	Operating system: Unix 3.19.2.1
	Processor count: 12
	64-Bit OS: True
	64-Bit Process: True
	Program data path: /var/lib/emby-server
	Mono: 3.12.1 (tarball Thu Mar 12 06:31:20 UTC 2015)
	Application Path: /usr/lib/emby-server/MediaBrowser.Server.Mono.exe
	Invalid URI: The URI scheme is not valid.
	System.UriFormatException
	  at System.Uri.Parse (UriKind kind, System.String uriString) [0x00000] in <filename unknown>:0 
	  at System.Uri.ParseUri (UriKind kind) [0x00000] in <filename unknown>:0 
	  at System.Uri..ctor (System.String uriString, Boolean dontEscape) [0x00000] in <filename unknown>:0 
	  at System.Uri..ctor (System.String uriString) [0x00000] in <filename unknown>:0 
	  at System.Net.WebRequest.Create (System.String requestUriString) [0x00000] in <filename unknown>:0 
	  at MediaBrowser.Common.Implementations.HttpClientManager.HttpClientManager.GetRequest (MediaBrowser.Common.Net.HttpRequestOptions options, System.String method, Boolean enableHttpCompression) [0x00000] in <filename unknown>:0 
	  at MediaBrowser.Common.Implementations.HttpClientManager.HttpClientManager+<SendAsyncInternal>c__async4.MoveNext () [0x00000] in <filename unknown>:0 
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 
	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[MediaBrowser.Common.Net.HttpResponseInfo].GetResult () [0x00000] in <filename unknown>:0 
	  at MediaBrowser.Common.Implementations.HttpClientManager.HttpClientManager+<SendAsync>c__async1.MoveNext () [0x00000] in <filename unknown>:0 
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 
	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[MediaBrowser.Common.Net.HttpResponseInfo].GetResult () [0x00000] in <filename unknown>:0 
	  at MediaBrowser.Server.Implementations.LiveTv.ChannelImageProvider+<GetImage>c__async0.MoveNext () [0x00000] in <filename unknown>:0 
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 
	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[MediaBrowser.Controller.Providers.DynamicImageResponse].GetResult () [0x00000] in <filename unknown>:0 
	  at MediaBrowser.Providers.Manager.ItemImageProvider+<RefreshFromProvider>c__async1.MoveNext () [0x00000] in <filename unknown>:0 
	
2015-04-09 16:45:30.9897 Error - App: Error in Live TV Service Provider
	*** Error Report ***
	Version: 3.0.5572.0
	Command line: /usr/lib/emby-server/MediaBrowser.Server.Mono.exe -programdata /var/lib/emby-server -ffmpeg /usr/bin/ffmpeg -ffprobe /usr/bin/ffprobe
	Operating system: Unix 3.19.2.1
	Processor count: 12
	64-Bit OS: True
	64-Bit Process: True
	Program data path: /var/lib/emby-server
	Mono: 3.12.1 (tarball Thu Mar 12 06:31:20 UTC 2015)
	Application Path: /usr/lib/emby-server/MediaBrowser.Server.Mono.exe
	Invalid URI: The URI scheme is not valid.
	System.UriFormatException
	  at System.Uri.Parse (UriKind kind, System.String uriString) [0x00000] in <filename unknown>:0 
	  at System.Uri.ParseUri (UriKind kind) [0x00000] in <filename unknown>:0 
	  at System.Uri..ctor (System.String uriString, Boolean dontEscape) [0x00000] in <filename unknown>:0 
	  at System.Uri..ctor (System.String uriString) [0x00000] in <filename unknown>:0 
	  at System.Net.WebRequest.Create (System.String requestUriString) [0x00000] in <filename unknown>:0 
	  at MediaBrowser.Common.Implementations.HttpClientManager.HttpClientManager.GetRequest (MediaBrowser.Common.Net.HttpRequestOptions options, System.String method, Boolean enableHttpCompression) [0x00000] in <filename unknown>:0 
	  at MediaBrowser.Common.Implementations.HttpClientManager.HttpClientManager+<SendAsyncInternal>c__async4.MoveNext () [0x00000] in <filename unknown>:0 
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 
	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[MediaBrowser.Common.Net.HttpResponseInfo].GetResult () [0x00000] in <filename unknown>:0 
	  at MediaBrowser.Common.Implementations.HttpClientManager.HttpClientManager+<SendAsync>c__async1.MoveNext () [0x00000] in <filename unknown>:0 
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 
	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[MediaBrowser.Common.Net.HttpResponseInfo].GetResult () [0x00000] in <filename unknown>:0 
	  at MediaBrowser.Server.Implementations.LiveTv.ChannelImageProvider+<GetImage>c__async0.MoveNext () [0x00000] in <filename unknown>:0 
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 
	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[MediaBrowser.Controller.Providers.DynamicImageResponse].GetResult () [0x00000] in <filename unknown>:0 
	  at MediaBrowser.Providers.Manager.ItemImageProvider+<RefreshFromProvider>c__async1.MoveNext () [0x00000] in <filename unknown>:0 

Link to post
Share on other sites

New version:

 

- Priority of recordings can be set in configuration page (0 ... 4)

- Profile of recordings can be set in configuration page (Name of your profile created in tvheadend web interface)

 

Try to create a version with extensive logs for series timers tomorrow. 

 

TVHeadEnd.zip

Link to post
Share on other sites

Hi,

 

here is a version with logging and a previously empty method filled with live. 

Can you please check the series timer functions with this version?

 

Tolotos

TVHeadEnd.zip

Edited by Tolotos
Link to post
Share on other sites

@@Tolotos

 

Again great work!

 

ok, these are my findings

 

- Series timers are now displayed, but only those made by the user that the plugin login with. This might be working as intended

- however normal schedule displays all upcomming recordings from all users.

- I don't see a way to set a series timer, although deleting as a series timer or one by one in the schedule is working fine.

- I mostly use autorec/regex based timers, I guess emby doesn't really support those and series timers would be the closest thing. My regex timers are listed in the schedule, and I can delete them one by one, but not edit the regex rules.

 

I tried to edit a series timer, that did not go well :( I think it actually crashed emby server and deleted the schedule.

 

 

Fatal - App: [TVHclient] CreateSeriesTimerAsync: got SeriesTimerInfo:
<SeriesTimerInfo>
  Id:                    e5df014c5ff59f5fa6b3948fa35c94df
  Name:                  VG Sporten
  Overview:              
  Priority:              2
  ChannelId:             1926255894
  ProgramId:             
  Days:                  Sunday, Monday, Tuesday, Wednesday, Thursday, Friday,
  StartDate:             4/10/2015 4:28:34 PM
  EndDate:               4/10/2015 4:28:34 PM
  IsPrePaddingRequired:  True
  PrePaddingSeconds:     0
  IsPostPaddingRequired: True
  PostPaddingSeconds:    0
  RecordAnyChannel:      False
  RecordAnyTime:         False
  RecordNewOnly:         False
</SeriesTimerInfo>

2015-04-10 16:28:34.6005 Error - Main: UnhandledException
    *** Error Report ***
    Version: 3.0.5572.0
    Command line: /opt/mediabrowser/MediaBrowser.Server.Mono.exe -programdata /config
    Operating system: Unix 3.13.0.48
    Processor count: 4
    64-Bit OS: True
    64-Bit Process: True
    Program data path: /config
    Mono: 3.10.0 (tarball Wed Nov  5 12:50:04 UTC 2014)
    Application Path: /opt/mediabrowser/MediaBrowser.Server.Mono.exe
    The requested operation caused a stack overflow.
    System.StackOverflowException
      at System.Text.StringBuilder.InternalEnsureCapacity (Int32 size) [0x00000] in <filename unknown>:0
      at System.Text.StringBuilder.Append (System.String value) [0x00000] in <filename unknown>:0
      at TVHeadEnd.HTSP.HTSMessage.ToString () [0x00000] in <filename unknown>:0
      at System.String.Concat (System.Object arg0) [0x00000] in <filename unknown>:0
      at TVHeadEnd.HTSP.HTSMessage.getValueString (System.Object value, System.String pad) [0x00000] in <filename unknown>:0
      at TVHeadEnd.HTSP.HTSMessage.ToString () [0x00000] in <filename unknown>:0
      at System.String.Concat (System.Object arg0) [0x00000] in <filename unknown>:0
      at TVHeadEnd.HTSP.HTSMessage.getValueString (System.Object value, System.String pad) [0x00000] in <filename unknown>:0
      at TVHeadEnd.HTSP.HTSMessage.ToString () [0x00000] in <filename unknown>:0
      at System.String.Concat (System.Object arg0) [0x00000] in <filename unknown>:0
      at TVHeadEnd.HTSP.HTSMessage.getValueString (System.Object value, System.String pad) [0x00000] in <filename unknown>:0
>>> SNIPPED A LOT OF THE SAME LINES <<<
    --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
      at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <filename unknown>:0
      at TVHeadEnd.LiveTvService+<UpdateSeriesTimerAsync>d__4e.MoveNext () [0x00000] in <filename unknown>:0
      at (wrapper unbox) TVHeadEnd.LiveTvService/<UpdateSeriesTimerAsync>d__4e:MoveNext ()
      at System.Threading.Tasks.AwaiterActionContinuation.Execute () [0x00000] in <filename unknown>:0
      at System.Threading.Tasks.Task.ProcessCompleteDelegates () [0x00000] in <filename unknown>:0
      at System.Threading.Tasks.Task.HandleGenericException (System.AggregateException e) [0x00000] in <filename unknown>:0
      at System.Threading.Tasks.Task.TrySetException (System.AggregateException aggregate, Boolean cancellation, Boolean observed) [0x00000] in <filename unknown>:0
      at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.SetException (System.Exception exception) [0x00000] in <filename unknown>:0
      at TVHeadEnd.LiveTvService+<CreateSeriesTimerAsync>d__47.MoveNext () [0x00000] in <filename unknown>:0
      at (wrapper unbox) TVHeadEnd.LiveTvService/<CreateSeriesTimerAsync>d__47:MoveNext ()
      at System.Threading.Tasks.TaskActionInvoker+ActionInvoke.Invoke (System.Threading.Tasks.Task owner, System.Object state, System.Threading.Tasks.Task context) [0x00000] in <filename unknown>:0
      at System.Threading.Tasks.Task.InnerInvoke () [0x00000] in <filename unknown>:0
      at System.Threading.Tasks.Task.ThreadStart () [0x00000] in <filename unknown>:0
      at System.Threading.Tasks.Task.Execute () [0x00000] in <filename unknown>:0
      at System.Threading.Tasks.TpScheduler.TaskExecuterCallback (System.Object obj) [0x00000] in <filename unknown>:0
Link to post
Share on other sites

...

- Series timers are now displayed, but only those made by the user that the plugin login with. This might be working as intended

...

- I don't see a way to set a series timer, although deleting as a series timer or one by one in the schedule is working fine.

- I mostly use autorec/regex based timers, I guess emby doesn't really support those and series timers would be the closest thing. My regex timers are listed in the schedule, and I can delete them one by one, but not edit the regex rules.

...

 

@@KRA

 

- The series timers must be filtered by tvheadend. I don't have a possibility to request a filter or not.

- Setting a series timer should work with new dll. The endless recursion error blocks sending the data to tvheadend.

- The only possible values are in the dump of the Emby SeriesTimerInfo object. These values are given to me from Emby. I'm not sure what will happen with the timer you send in the post. Start- and end-date are the same !?

 

If we have the result from an additional test I can ask in the tvheadend forum for help with the translation of the values.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...