Jump to content

Tvheadend plugin for Emby - Beta 1


Tolotos

Recommended Posts

Gerrit507

Ok, I see...

 

For example for my setup this is always false because none of my channel items has a series tag, most of the actual series have a movie tag :(

Link to comment
Share on other sites

well you can always set the flag in emby to make the button show up, the command will get passed to tvh and then you can see how tvh copes with it.

Link to comment
Share on other sites

vaise

If I want to keep my recordings I move them to my emby library and then I have pictures :D

 

Btw, I looked into the code and it seems like the whole series recordings needs a complete rework. Some stuff has been removed completely other things are just not working any more.

 

I had a play with another solution.  In emby, ini the DVR section, add the location for recordings to the same place that TVHeadend stores them (on my testing system, this is an unraid share called 'Recordings'.

Then in the emby interface, remove all stuff related to TVHeadend from the user profile.

You then get a nice 'recordings' in the emby library list.

Unfortunately, emby is getting a load of the metadata wrong so that is a bit of a work in progress on my side....... 

Link to comment
Share on other sites

@@vaise, if you're going to do that, you could have also just setup a new emby library. same end result i guess though.

Link to comment
Share on other sites

vaise

@@vaise, if you're going to do that, you could have also just setup a new emby library. same end result i guess though.

 

Oh yes - seems like I have come a full circle, as i used to do that on my live nextpvr, but now I moved to the plugin for it (as someone in the house asked for a bit of liveTV).

 

So am I correct that there are ONLY pictures/images for the plugins if they are produced by the backend PVR (i.e nextPVR has them, so they are there i the emby plugin). 

Link to comment
Share on other sites

vaise

Why does TVH rename the file on the filesystem with all the TV info :

 

5b2b15060a5e9_Capture.jpg

Link to comment
Share on other sites

So am I correct that there are ONLY pictures/images for the plugins if they are produced by the backend PVR (i.e nextPVR has them, so they are there i the emby plugin). 

 

Correct.

Link to comment
Share on other sites

vaise

I am very sorry if this is a bit forward, I am not a developer and bow down to all your expertise.........

 

But is it difficult to do some sort of screen grab and use that, then maybe it can get the same treatment as other files in emby, i.e like this shown below for an unknown TV show with a grab.  At least there is something to look at then rather than coloured boxes on the html web and the green rectangles on the roku :

 

5b2b355365691_Capture.jpg

Link to comment
Share on other sites

Gerrit507

Why does TVH rename the file on the filesystem with all the TV info :

 

5b2b15060a5e9_Capture.jpg

 

You can configure how the recordings are named.

 

 

I am very sorry if this is a bit forward, I am not a developer and bow down to all your expertise.........

 

But is it difficult to do some sort of screen grab and use that, then maybe it can get the same treatment as other files in emby, i.e like this shown below for an unknown TV show with a grab.  At least there is something to look at then rather than coloured boxes on the html web and the green rectangles on the roku :

 

5b2b355365691_Capture.jpg

Well, you can achieve this by adding the recordings as a library like Luke suggested.

Link to comment
Share on other sites

  • 2 weeks later...
matty87a

Hi,

 

Come back to TVH after not using it for a while, in the past it worked with emby fine, however it doesnt seem to be pulling anyhting in at the minute.

 

I see the emby client authenticate against TVH fine.

 

In the emby logs the connections show but the guide says refresh completed in 3 seconds and no data comes in.

 

All channels and guides are blank.

 

Has anybody experienced this?

 

Debug logs below:

2018-07-03 16:57:06.998 Info TaskManager: Executing Refresh Guide
2018-07-03 16:57:06.998 Info HttpServer: HTTP Response 204 to 195.102.251.7. Time: 2ms. http://domain.biz:8096/emby/ScheduledTasks/Running/3145e441d9ba27fc391e7ee15face581 
2018-07-03 16:57:07.042 Info HttpServer: HTTP GET http://domain.biz:8096/emby/ScheduledTasks?IsEnabled=true. UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36
2018-07-03 16:57:07.042 Info HttpServer: HTTP Response 200 to 195.102.251.7. Time: 1ms. http://domain.biz:8096/emby/ScheduledTasks?IsEnabled=true 
2018-07-03 16:57:10.024 Debug App: Refreshing guide from TVHclient LiveTvService
2018-07-03 16:57:10.039 Info App: [TVHclient] HTSConnectionHandler.ensureConnection() : create new HTS-Connection
2018-07-03 16:57:10.040 Info App: [TVHclient] HTSConnectionHandler.ensureConnection: Used connection parameters: TVH Server = '127.0.0.1'; HTTP Port = '9981'; HTSP Port = '9982'; Web-Root = '/tv'; User = 'matt'; Password set = 'True'
2018-07-03 16:57:10.041 Info App: [TVHclient] HTSConnectionAsync.open: IPEndPoint = '127.0.0.1:9982'; AddressFamily = 'InterNetwork'
2018-07-03 16:57:10.041 Info App: [TVHclient] HTSConnectionAsync.open: socket connected.
2018-07-03 16:57:10.049 Info App: [TVHclient] HTSConnectionAsync.authenticate: start
2018-07-03 16:57:10.061 Info App: [TVHclient] HTSConnectionAsync.authenticate: authenticated = True
2018-07-03 16:57:10.061 Info App: [TVHclient] HTSConnectionHandler.ensureConnection: connection established True
2018-07-03 16:57:10.744 Debug XmlSerializer: Deserializing file /var/lib/emby-server/plugins/configurations/Emby.Kodi.SyncQueue.xml
2018-07-03 16:57:10.755 Debug App: Emby.Kodi.SyncQueue:  Ingoring Type UserView
2018-07-03 16:57:10.758 Info App: Refreshing guide with 1 days of guide data
2018-07-03 16:57:10.758 Debug App: Refreshing guide from Emby
2018-07-03 16:57:10.767 Debug App: Emby.Kodi.SyncQueue:  Ingoring Type UserView
2018-07-03 16:57:10.768 Info App: Refreshing guide with 1 days of guide data
2018-07-03 16:57:10.774 Info App: Loading live tv data from /var/lib/emby-server/data/livetv/seriestimers
2018-07-03 16:57:10.778 Info TaskManager: Refresh Guide Completed after 0 minute(s) and 3 seconds
2018-07-03 16:57:10.778 Info ServerManager: Sending web socket message ScheduledTaskEnded
2018-07-03 16:57:10.782 Info TaskManager: ExecuteQueuedTasks

Link to comment
Share on other sites

vaise

not sure if this helps, but mine is working fine.  I am on the emby beta stream if that matters.  I am using TVH in parallel with NextPVR while in a testing phase, but looks like I will be rolling this out next weekend so bye bye windows.

Link to comment
Share on other sites

zapras

not sure if this helps, but mine is working fine. I am on the emby beta stream if that matters. I am using TVH in parallel with NextPVR while in a testing phase, but looks like I will be rolling this out next weekend so bye bye windows.

What is nextpvr like for playing currently recording videos in Emby? I'm finding Tvheadend+Emby pretty bad for it. Seeking is impossible, even when it's direct stream with Emby Theater in Windows.

 

Also, unlike NextPVR, Tvheadend doesn't create thumbnails for it's recorded videos and given Embys interface it looks pretty bad.

Link to comment
Share on other sites

vaise

Have you tried creating an emby library over your TVH recordings ?  That will allow emby to download some metadata - or at the very least do a screen grab so it looks better.  I already posted here that I dont like the plugin interface (having a group called others, and no better thumnails that the green rectangles on my roku).  But seeing as I have to move to something linuxy and leave nextPVR, the backend has been bulletproof (never missed anything).

My TVHeadend does allow chase play to some extent - was just doing it earlier.

Link to comment
Share on other sites

zapras

Have you tried creating an emby library over your TVH recordings ? That will allow emby to download some metadata - or at the very least do a screen grab so it looks better.

How do you create a library over your Emby recordings? Does that get rid of that Tvheadend Recordings folder? And wouldn't that only pick up videos once the recording is finished?

Link to comment
Share on other sites

vaise

How do you create a library over your Emby recordings? Does that get rid of that Tvheadend Recordings folder? And wouldn't that only pick up videos once the recording is finished?

 

I would suggest you dont change or replace anything you currently have until you like how this is, just create an emby library in addition to the plugin you already have.  Point it at the folder/directory where your current recordings are.  For the library type, you can choose TV shows and the metadata will try and be matched, or if you just want screengrabs and no metadata, choose 'Home Videos and Photo's'.   

Link to comment
Share on other sites

Gerrit507

 

Hi,

 

Come back to TVH after not using it for a while, in the past it worked with emby fine, however it doesnt seem to be pulling anyhting in at the minute.

 

I see the emby client authenticate against TVH fine.

 

In the emby logs the connections show but the guide says refresh completed in 3 seconds and no data comes in.

 

All channels and guides are blank.

 

Has anybody experienced this?

 

Debug logs below:

2018-07-03 16:57:06.998 Info TaskManager: Executing Refresh Guide
2018-07-03 16:57:06.998 Info HttpServer: HTTP Response 204 to 195.102.251.7. Time: 2ms. http://domain.biz:8096/emby/ScheduledTasks/Running/3145e441d9ba27fc391e7ee15face581 
2018-07-03 16:57:07.042 Info HttpServer: HTTP GET http://domain.biz:8096/emby/ScheduledTasks?IsEnabled=true. UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36
2018-07-03 16:57:07.042 Info HttpServer: HTTP Response 200 to 195.102.251.7. Time: 1ms. http://domain.biz:8096/emby/ScheduledTasks?IsEnabled=true 
2018-07-03 16:57:10.024 Debug App: Refreshing guide from TVHclient LiveTvService
2018-07-03 16:57:10.039 Info App: [TVHclient] HTSConnectionHandler.ensureConnection() : create new HTS-Connection
2018-07-03 16:57:10.040 Info App: [TVHclient] HTSConnectionHandler.ensureConnection: Used connection parameters: TVH Server = '127.0.0.1'; HTTP Port = '9981'; HTSP Port = '9982'; Web-Root = '/tv'; User = 'matt'; Password set = 'True'
2018-07-03 16:57:10.041 Info App: [TVHclient] HTSConnectionAsync.open: IPEndPoint = '127.0.0.1:9982'; AddressFamily = 'InterNetwork'
2018-07-03 16:57:10.041 Info App: [TVHclient] HTSConnectionAsync.open: socket connected.
2018-07-03 16:57:10.049 Info App: [TVHclient] HTSConnectionAsync.authenticate: start
2018-07-03 16:57:10.061 Info App: [TVHclient] HTSConnectionAsync.authenticate: authenticated = True
2018-07-03 16:57:10.061 Info App: [TVHclient] HTSConnectionHandler.ensureConnection: connection established True
2018-07-03 16:57:10.744 Debug XmlSerializer: Deserializing file /var/lib/emby-server/plugins/configurations/Emby.Kodi.SyncQueue.xml
2018-07-03 16:57:10.755 Debug App: Emby.Kodi.SyncQueue:  Ingoring Type UserView
2018-07-03 16:57:10.758 Info App: Refreshing guide with 1 days of guide data
2018-07-03 16:57:10.758 Debug App: Refreshing guide from Emby
2018-07-03 16:57:10.767 Debug App: Emby.Kodi.SyncQueue:  Ingoring Type UserView
2018-07-03 16:57:10.768 Info App: Refreshing guide with 1 days of guide data
2018-07-03 16:57:10.774 Info App: Loading live tv data from /var/lib/emby-server/data/livetv/seriestimers
2018-07-03 16:57:10.778 Info TaskManager: Refresh Guide Completed after 0 minute(s) and 3 seconds
2018-07-03 16:57:10.778 Info ServerManager: Sending web socket message ScheduledTaskEnded
2018-07-03 16:57:10.782 Info TaskManager: ExecuteQueuedTasks

 

Check that your authentication type is set to "plain" or "both plain and digest". Also make sure that the user you have configured for the tvheadend plugin has htsp access for the guide, channels and recordings.

Link to comment
Share on other sites

matty87a

Check that your authentication type is set to "plain" or "both plain and digest". Also make sure that the user you have configured for the tvheadend plugin has htsp access for the guide, channels and recordings.

 

Thanks for the suggestions.

 

Auth was set to digest - have switched to to plain and digest but no change.

 

The user has full access - I have also tried using the main admin user.

 

Since the above change here are the tvh logs:


2018-07-04 11:43:18.157 htsp: Got connection from 127.0.0.1
2018-07-04 11:43:18.157 htsp: 127.0.0.1: Identified as user 'emby' (unverified)
2018-07-04 11:43:18.157 htsp: 127.0.0.1 [ emby ]: Welcomed client software: TVHclient4Emby-3.4.1.0 (HTSPv20)
2018-07-04 11:43:18.162 htsp: 127.0.0.1 [ emby | TVHclient4Emby-3.4.1.0 ]: Identified as user 'emby'
2018-07-04 11:43:18.162 htsp: 127.0.0.1 [ emby | TVHclient4Emby-3.4.1.0 ]: Privileges updated

and here are the emby logs:

2018-07-04 11:43:15.056 Info TaskManager: Executing Refresh Guide
2018-07-04 11:43:18.115 Info App: [TVHclient] HTSConnectionHandler.ensureConnection() : create new HTS-Connection
2018-07-04 11:43:18.116 Info App: [TVHclient] HTSConnectionHandler.ensureConnection: Used connection parameters: TVH Server = '127.0.0.1'; HTTP Port = '9981'; HTSP Port = '9982'; Web-Root = '/tv'; User = 'emby'; Password set = 'True'
2018-07-04 11:43:18.118 Info App: [TVHclient] HTSConnectionAsync.open: IPEndPoint = '127.0.0.1:9982'; AddressFamily = 'InterNetwork'
2018-07-04 11:43:18.118 Info App: [TVHclient] HTSConnectionAsync.open: socket connected.
2018-07-04 11:43:18.122 Info App: [TVHclient] HTSConnectionAsync.authenticate: start
2018-07-04 11:43:18.162 Info App: [TVHclient] HTSConnectionAsync.authenticate: authenticated = True
2018-07-04 11:43:18.162 Info App: [TVHclient] HTSConnectionHandler.ensureConnection: connection established True
2018-07-04 11:43:18.868 Info App: Refreshing guide with 1 days of guide data
2018-07-04 11:43:18.878 Info App: Refreshing guide with 1 days of guide data
2018-07-04 11:43:18.884 Info App: Loading live tv data from /var/lib/emby-server/data/livetv/seriestimers
2018-07-04 11:43:18.888 Info TaskManager: Refresh Guide Completed after 0 minute(s) and 3 seconds
2018-07-04 11:43:18.889 Info ServerManager: Sending web socket message ScheduledTaskEnded
2018-07-04 11:43:18.893 Info TaskManager: ExecuteQueuedTasks

Seeing an open session for Emby in TVH but still no data in Emby:

 

5b3ca8acb35fc_emby.png

Link to comment
Share on other sites

matty87a

I have just  tested a recording and this shows in Emby fine under the TVHeadend Recordings section

Link to comment
Share on other sites

Gerrit507

The only odd thing I could see is that plugin only wants to update one day. Usually it should update one week...

 

Are your channels numbered? Unnumbered channels can cause issues.

  • Like 1
Link to comment
Share on other sites

matty87a

The only odd thing I could see is that plugin only wants to update one day. Usually it should update one week...

 

Are your channels numbered? Unnumbered channels can cause issues.

 

I had set it to 1 day for testing, channel numbers was what got it!

 

Thanks for the help!

Link to comment
Share on other sites

  • 3 weeks later...
vaise

I just has a scenario that I dont know if it is possible - after confirmation as to whether I should look into tvh or emby for the cause.

 

A TV Show - 'The Project' was recording - started at 18:30.  It runs till 19:30, plus padding.

 

At 19:18, I accidentally clicked on it to watch it from the plugin list, but emby came up with an 'ignored' error.

 

I waited till after 8PM to watch it - same 'ignorred ' message on the roku.

 

I looked at TVH, the in progress recording was gone.  Its not in the file system, not in filed recordings.

It does however still shows in the emby TVH plugin, with a green tick thinking it is played.

 

I have attached the emby log.

 

 

embyserver.txt

Link to comment
Share on other sites

Gerrit507

The recording has just been ignored which means it has never started recording. A reason could be that there was no free tuner available.

Link to comment
Share on other sites

vaise

The recording has just been ignored which means it has never started recording. A reason could be that there was no free tuner available.

 

Hi,

Thanks for the reply - was that evident in the logs I attached ? 

There are 6 network tuners, nothing else recording at that time.  The emby plugin still thinks there is something there, yet nothing shown in tvh at all.  Where is the emby plugin 'reading' to see this ?

Im new to TVH, was running nextpvr and it in parallel while moving to it (nextpvr for years).

Link to comment
Share on other sites

fneves
2018-08-01 10:47:00.644 Info HttpServer: HTTP GET http://emby-server:8096/Items/2872b39b7573c040ea9626ee178c1914/Images/Primary?maxWidth=214&tag=82c36d98b857776461a3aa6cb563532a&quality=90. UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36
2018-08-01 10:47:00.645 Info HttpClient: Found userInfo in url: USER:PASS ... url: http://USER:PASS@tvheadend-server:9981/imagecache/203
2018-08-01 10:47:00.645 Info HttpClient: GET http://USER:PASS@tvheadend-server:9981/imagecache/203
2018-08-01 10:47:00.652 Error HttpServer: Error processing request
	*** Error Report ***
	Version: 3.5.2.0
	Command line: /system/EmbyServer.dll -programdata /config -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3
	Operating system: Unix 4.15.0.29
	64-Bit OS: True
	64-Bit Process: True
	User Interactive: True
	Processor count: 8
	Program data path: /config
	Application directory: /system
	MediaBrowser.Model.Net.HttpException: Unauthorized
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsyncInternal(HttpRequestOptions options, String httpMethod)
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsync(HttpRequestOptions options, String httpMethod)
	   at MediaBrowser.Providers.Manager.ProviderManager.SaveImage(BaseItem item, String url, ImageType type, Nullable`1 imageIndex, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.Library.LibraryManager.ConvertImageToLocal(BaseItem item, ItemImageInfo image, Int32 imageIndex)
	   at Emby.Drawing.ImageProcessor.ProcessImage(ImageProcessingOptions options)
	   at MediaBrowser.Api.Images.ImageService.GetImageResult(BaseItem item, Guid itemId, ImageRequest request, ItemImageInfo image, Boolean cropwhitespace, ImageFormat[] supportedFormats, IImageEnhancer[] enhancers, Nullable`1 cacheDuration, IDictionary`2 headers, Boolean isHeadRequest)
	   at Emby.Server.Implementations.Services.ServiceExecGeneral.GetTaskResult(Task task)
	   at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, ILogger logger, String operationName, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IHttpRequest httpReq, String urlString, String host, String localPath, CancellationToken cancellationToken)
	MediaBrowser.Model.Net.HttpException
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsyncInternal(HttpRequestOptions options, String httpMethod)
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsync(HttpRequestOptions options, String httpMethod)
	   at MediaBrowser.Providers.Manager.ProviderManager.SaveImage(BaseItem item, String url, ImageType type, Nullable`1 imageIndex, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.Library.LibraryManager.ConvertImageToLocal(BaseItem item, ItemImageInfo image, Int32 imageIndex)
	   at Emby.Drawing.ImageProcessor.ProcessImage(ImageProcessingOptions options)
	   at MediaBrowser.Api.Images.ImageService.GetImageResult(BaseItem item, Guid itemId, ImageRequest request, ItemImageInfo image, Boolean cropwhitespace, ImageFormat[] supportedFormats, IImageEnhancer[] enhancers, Nullable`1 cacheDuration, IDictionary`2 headers, Boolean isHeadRequest)
	   at Emby.Server.Implementations.Services.ServiceExecGeneral.GetTaskResult(Task task)
	   at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, ILogger logger, String operationName, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IHttpRequest httpReq, String urlString, String host, String localPath, CancellationToken cancellationToken) 

picons are not working for me in version 1.3.7.0 and Emby Server 3.5.2.0.

It tries to get the picon using http (user/pass) format URL from TVHeadEnd but returns unauthorized, if I access http://USER:PASS@tvheadend-server:9981/imagecache/203 it works just fine. Any clue?

Edited by fneves
Link to comment
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...