Recorded shows won't play without Kodi restart
#16
Till I figure out my SMB issues I have added this quick homeassistant script that can be reused to restart just the pvr.wmc addon instead of the whole kodi client and then I get access to the new recordings.  

restart_pvrwmc_media_room:
  alias: Restart Kodi pvr.wmc Media Room
  sequence:
    - service: kodi.call_method
      data:
        entity_id: media_player.media_room_kodi
        method: Addons.SetAddonEnabled
        addonid: pvr.wmc
        enabled: false
    - delay:
        seconds: 1
    - service: kodi.call_method
      data:
        entity_id: media_player.media_room_kodi
        method: Addons.SetAddonEnabled
        addonid: pvr.wmc
        enabled: true
Reply
#17
Thanks for the script I'll have to look up home assistant to find out how to use it if I need it.

For me after I added the lines back into my password.XML file, things were good until I rebooted Kodi and then new recordings didn't work again, I had the ops original problem where after trying to play One recording all the recordings disappear.

So I went into SWMC and unchecked the checkbox to use credentials In the folders tab. And ever since then it's been working good again just like it used to. so currently I have no problems whatsoever but it's only been a few days now.
Reply
#18
hey I updated to the latest preview build 1259 and everything is working the way it should.
Reply
#19
I have narrowed it down to how i broke it and how i fix it.

It all started when i got an Android TV box. In order to get WMC PVR working in kodi 18 on the android TV box i had to change the ServerWMC settings on the folders tab.
Since android don't know about windows shares, i had to check the ServerWMC, folder tab Use Credentials box and enter username and password. Then the Android TV box would work with WMC PVR and SWMC.

Little did i know that the next time i restarted my windows Kodi clients, new recording would no longer work. At this point if you uncheck the ServerWMC, folder tab the Use Credentials box and click save, the Kodi windows Clients will play the new recording without a restart and it all still works after a kodi restart, but the android TV box no longer work.

I have done this a few times now. It is repeatable.

So it seems in kodi the new recordings that are added to the list of recordings since last kodi start are Some how treated different if the SWMC folder tab Use Credentials box is checked.

Now a long time ago i followed the WIKI page about setting up the shares, it stated if not using home groups to share with Everyone full control. section 2.3
https://kodi.wiki/view/SMB/Windows
Maybe that has something to do with what i am seeing.
Reply
#20
Interesting.  With credentials turned on, does the android box have the same new recording problem as the windows clients?
Windows Media Center PVR addon (pvr.wmc) and server backend (ServerWMC)
http://bit.ly/serverwmc
Reply
#21
I was wrong, not working again.  It only worked if remux of all was checked.  So now I'm thinking it has something to do with the path and after the active recording completes the path changed and kodi doesn't update the path
Reply
#22
edit and its off topic but Krusty I found that with the latest preview build, the channel display format settings always return to defaults when serverwmc is restarted
Reply
#23
(2020-01-01, 20:49)krustyreturns Wrote: Interesting.  With credentials turned on, does the android box have the same new recording problem as the windows clients?

I will have to try that, as I do not normally use that box to watch recordings. But to get the guide to fill in and the list of recordings I have to have credentials turned on. At least when first powered on and Kodi first started, once connection is made I could turn off credentials in SWMC and the Android box will still work but that might be when a new recordings stop working on Android but start working on Windows clients. I will test it and let you know.
Reply
#24
kodi thinks the finished recording is in a different path   CVideoPlayer::OpenInputStream - error opening [pvr://recordings/tv/active/Forensic Files 

this is from a completed recording without a restart.  I'm thinking that after a recording is stopped, the pvr addon isn't refreshing to update the path.
Reply
#25
(2020-01-01, 20:49)krustyreturns Wrote: Interesting.  With credentials turned on, does the android box have the same new recording problem as the windows clients?
Ok Yes the android box has the same problem, with the credentials setting but just the opposite.

I need to clear up a few things before i continue. I found that i left out some key info in my post back on 1-1-2020.
When i could not get the WMC PRV guide to work in my android box without the credentials turned on, that was with a fresh install of Kodi without and local librarys or windows shares setup yet.
So the first thing i was setting up was WMC PRV, at this point i had to have Credentials turned on in SWMC for the PRV to work and the guide data to show up.
a few hours later
It was at that point i noticed new recordings in my Windows clients no longer would play so with the list of recordings shown on the windows client and the new recording not play i went to the SWMC PC and unchecked the use cerdentials check box, went back to the windows client and played the new recording with out any problems, it played fine now.
At this point
I added Windows shares to the Android box for media folders and for Recorded TV folder.
After doing this i noticed that the WMC PRV worked fine with or without the credentials turned on in SWMC, but new recordings would not play on android TV box if credentials was turned off in SWMC. That is just the opposite of the windows clients.
During all this time i never restarted or rebooted any PC's , boxes, or the SWMC software.


I may try this all again with a clean install of Kodi and get some clean logs for you. But in all the logs i have looked at all that is shown is the very same path that don't work one time works just fine the next time. and it just give a common error about not able to play stream.
Reply
#26
I spent some time on this problem today and found I could reproduce it on my development machine (windows).  
1) I found I could start a recording and - watch it while it was recording - with no problem. 
2) I then stopped it from recording, and then tried to play the stopped recording and it failed. 
3) If you restart kodi, the same file plays fine.

I checked the serverwmc and kodi logs and there is no difference between the path returned to kodi before and after it is restarted, i.e.
  Worked:
  DEBUG: AddOnLog: PVR WMC Client: OpenRecordedStream> opening stream: smb://MORBO/Recorded TV/Joanne Weir's Plates and Places_KQED_2020_01_04_13_26_30.wtv
  Failed:
  DEBUG: AddOnLog: PVR WMC Client: OpenRecordedStream> opening stream: smb://MORBO/Recorded TV/Joanne Weir's Plates and Places_KQED_2020_01_04_13_26_30.wtv

In pvr.wmc, what is failing is a call to the kodi method OpenFile, i.e.
XBMC->OpenFile( ...
This call is supposed to open a file for streaming, but it is returning NULL which means kodi fails to open it for some reason.  No more info than that is given, unfortunately.

If I turn on the remux of all recordings on playback, the problem seems to go away.  Which is really weird.  I can't see what the difference between the two is other than one is opening a ts file and the other is opening a wtv file.  

The only way I can see to make further progress on this is to debug kodi itself to see why it is refusing to open the file, but I currently am not set up to do this.  If anybody reading this can please let me know.
Windows Media Center PVR addon (pvr.wmc) and server backend (ServerWMC)
http://bit.ly/serverwmc
Reply
#27
I think I figured it out!  It's not a serverwmc problem, but I could implement a workaround in serverwmc which is a lot easier then changing kodi.  It would be great if you guys could try it and see if it works for you.  Update serverwmc to Preview 1260.
Windows Media Center PVR addon (pvr.wmc) and server backend (ServerWMC)
http://bit.ly/serverwmc
Reply
#28
(2020-01-05, 20:50)krustyreturns Wrote: I think I figured it out!  It's not a serverwmc problem, but I could implement a workaround in serverwmc which is a lot easier then changing kodi.  It would be great if you guys could try it and see if it works for you.  Update serverwmc to Preview 1260.
The 1260 build did not fix the issue for me. I still get the StartStreamError

2020/01/05 17:00:31.347 ServerWMC started.
2020/01/05 17:00:31.363 Assembly version: 1.0.0.63, build: 1260
2020/01/05 17:00:31.363 Config file version: 168
2020/01/05 17:00:31.363 Build: Release
2020/01/05 17:00:31.363 Server MachineName: <host>
2020/01/05 17:00:31.363 OS: Microsoft Windows 7 Home Premium Service Pack 1 (x64)
2020/01/05 17:00:31.363 OS Version: 6.1.7601.65536
2020/01/05 17:00:31.550 Processor: AMD Athlon™ II X2 240 Processor
2020/01/05 17:00:31.566 Graphics: ATI Radeon HD 4200
2020/01/05 17:00:31.581 -----------------------------------------
2020/01/05 17:00:31.581 Non-default Config Settings -------------
2020/01/05 17:00:31.613 isAutoStart: True >>Default: False
2020/01/05 17:00:31.613 StartupMinimized: True >>Default: False
2020/01/05 17:00:31.613 IsCloseToSysTray: True >>Default: False
2020/01/05 17:00:31.613 UseCredentialsInNetworkPath: True >>Default: False
2020/01/05 17:00:31.613 useEpisodeInTitleString: True >>Default: False
2020/01/05 17:00:31.613 UseDLNAChannels_MBS: True >>Default: False
2020/01/05 17:00:31.613 UseDLNAChannels_Plex: True >>Default: False
2020/01/05 17:00:31.613 UseSportsPadding: True >>Default: False
2020/01/05 17:00:31.613 PostSportsPadding: 60 >>Default: 120
2020/01/05 17:00:31.613 -----------------------------------------
2020/01/05 17:00:31.613 MainWindow> Showing splash screen.
2020/01/05 17:00:31.659 MainWindow> Starting InitializeWorker
2020/01/05 17:00:31.706 RedirectWMCDLLs> WMC DLL version found in GAC: 6.1.0.0 (win7)
2020/01/05 17:00:31.706 RedirectWMCDLLs> redirect handlers added
...
2020/01/05 17:03:25.172 Received client request: RPiTV-MB|192.168.1.199|OpenRecordingStream|10977524091959526
2020/01/05 17:03:25.172 OpenRecordingStream> -----------------start------------------------
2020/01/05 17:03:25.172 OpenRecordingStream> opening recording (ID[10977524091959526]) for client: Kodi^RPiTV-MB
2020/01/05 17:03:25.172 OpenRecordingStream> found rec file for ID[10977524091959526]: F:\Recorded TV\NFL Football_XXXXDT_2020_01_05_17_01_37.wtv
2020/01/05 17:03:25.172 OpenRecordingStream> service says this recording has finished (passive)
2020/01/05 17:03:25.172 WtvStream> streaming for playback: NFL Football_XXXXDT_2020_01_05_17_01_37.wtv
2020/01/05 17:03:25.186 OpenRecordingStream> returning client's path to recording: smb://<user>:<pw>@<host>/Recorded TV3/NFL Football_XXXXDT_2020_01_05_17_01_37.wtv
2020/01/05 17:03:25.186 OpenRecordingStream> stream format: passive-WTV
2020/01/05 17:03:25.186 OpenRecordingStream> -----------------done-------------------------
2020/01/05 17:03:25.186 Finished request OpenRecordingStream in 0.02s
2020/01/05 17:03:25.191 Received client request: RPiTV-MB|192.168.1.199|StreamStartError|smb://<user>:<pw>@<host>/Recorded TV3/NFL Football_XXXXDT_2020_01_05_17_01_37.wtv
2020/01/05 17:03:25.192 StreamStartError> client 'Kodi^RPiTV-MB' reports error opening stream, will close stream down
2020/01/05 17:03:25.192 StreamStartError> client 'Kodi^RPiTV-MB' path to stream file: 'smb://<user>:<pw>@<host>/Recorded TV3/NFL Football_XXXXDT_2020_01_05_17_01_37.wtv'
2020/01/05 17:03:25.192 StreamStartError> client 'Kodi^RPiTV-MB' calling CloseStream
2020/01/05 17:03:25.192 WtvStream::Close> client closed wtv stream: {0}
2020/01/05 17:03:25.192 WtvStream::Close> closed in 0.00 sec
2020/01/05 17:03:25.192 Close> closed stream for client: Kodi^RPiTV-MB
2020/01/05 17:03:25.193 Finished request StreamStartError in 0.00s
Reply
#29
(2020-01-05, 20:50)krustyreturns Wrote: I think I figured it out!  It's not a serverwmc problem, but I could implement a workaround in serverwmc which is a lot easier then changing kodi.  It would be great if you guys could try it and see if it works for you.  Update serverwmc to Preview 1260.
My apologies. After rebooting my Kodi device and THEN testing this, it seems to work! I can now record programs and immediately play them without restart. Thanks so much for the workaround Krusty!
Reply
#30
That's a relief, because I really think I got it.  Yes, it does require a restart of kodi (once) after the update to serverwmc.

Please keep me updated on any changes.
Windows Media Center PVR addon (pvr.wmc) and server backend (ServerWMC)
http://bit.ly/serverwmc
Reply

Logout Mark Read Team Forum Stats Members Help
Recorded shows won't play without Kodi restart0