Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support recording timer types #23

Closed
popy2k14 opened this issue Mar 25, 2018 · 48 comments
Closed

Support recording timer types #23

popy2k14 opened this issue Mar 25, 2018 · 48 comments

Comments

@popy2k14
Copy link

The addon lacks on support of timer types, so you can select an series from epg record all upcoming shows off the same name.

Would be nice if this feature will be integrated.

manuelm added a commit that referenced this issue Apr 6, 2018
This adds support for our existing timers. EPG based search timers are
still missing.

See #23
manuelm added a commit that referenced this issue Apr 7, 2018
This adds support for our existing timers. EPG based search timers are
still missing.

See #23
@popy2k14
Copy link
Author

@manuelm:
Does your latest commit (timer rework: 2b5a835) add the "Suchvorgaben" feature (record the same show based on the title) in the plugin?

@manuelm
Copy link
Owner

manuelm commented Apr 16, 2018

No. Otherwise this issue would have been closed.

The new timers makes recordings even worse. They are not visible in the EPG guide anymore and I doubt I can do anything about that.

@popy2k14
Copy link
Author

ok, thx for the info, maybe @ksooo can help with this. For testing, just contact me.

@ksooo
Copy link

ksooo commented Apr 17, 2018

I'm afraid you will need to debug Kodi yourself to learn why your timers do not show up correctly. Other add-ons have no problems with that.

Sorry, I have no test environment for dvbviewer and pure brain debugging is sooooooooooo time consuming. ;-)

@manuelm
Copy link
Owner

manuelm commented Apr 17, 2018

Yeah, I understand that. I just wanted to rule out that this is by design. i.e. new timers must have the epg uid set.

Can you point me to a file where I should start looking? I already looked at CFileItem but that basically leads me to everywhere :-)

@manuelm
Copy link
Owner

manuelm commented Apr 17, 2018

Btw I already looked at other PVRs as this is the first thing I do before asking for help. All PVRs I looked at make use of the epg uid field for non-manual timers.

@manuelm
Copy link
Owner

manuelm commented Apr 17, 2018

@popy2k14 You can download the new version for windows on https://ci.appveyor.com/project/manuelm/pvr-dvbviewer - I'll work on epg based timers after EDL as EDL is less work.

@manuelm
Copy link
Owner

manuelm commented Jun 8, 2018

@popy2k14
Copy link
Author

popy2k14 commented Jun 9, 2018

@manuelm: have downloaded the x64 version of your plugin and when i am install it in my "KodiSetup-20180602-b5181d72-master-x64.exe" installation, kodi says: Cannot load addon.

The log says:

14:21:51.498 T:9640 ERROR: Win32DllLoader::Load: Failed to load "C:\Users\popy\AppData\Roaming\Kodi\addons\pvr.dvbviewer\pvr.dvbviewer.dll" with error 126: "Das angegebene Modul wurde nicht gefunden.
"
Any hints?
Was there an PVR api update?

@manuelm
Copy link
Owner

manuelm commented Jun 9, 2018

I assume this is debug build related. I'll disable debug build and trigger a rebuild.

Was there an PVR api update?

Yes, today. But you are using an older nightly and a compatible PVR.

@manuelm
Copy link
Owner

manuelm commented Jun 9, 2018

hm, ofc. rebuilding will pull in the new PVR API update as part of the dependencies.. :/

@manuelm
Copy link
Owner

manuelm commented Jun 9, 2018

Please try those: https://ci.appveyor.com/project/manuelm/pvr-dvbviewer/build/test-65dc9a5

However before updating/installing the zip, you have to modify the file pvr.dvbviewer/addon.xml and change <import addon="kodi.binary.instance.pvr" version="5.10.0"/> to <import addon="kodi.binary.instance.pvr" version="5.9.0"/>

@popy2k14
Copy link
Author

popy2k14 commented Jun 10, 2018

have now updated my kodi on my test machine to "KodiSetup-20180609-5da94d19-master-x64.exe" and installed your addon. The following i have tested:

  • Create auto timer -> OK
  • Clear auto timer -> OK
    Dont know if it's relevant, but the created one shot timers (from auto timer) was not deleted.
    Maybe thats the behavour of DMS.

Tumbs up for this and many thanks!!!!

I have noticed a few drawbacks which would be fine gets sorted.
The following settings in the created auto timer does'nt get set to DMS defaults (like set in the DMS default recording settings), they are:

  • Priority is -1 when created with kodi but my default is 50
  • The field "series" (german Serie) is set to nothing, dont know if this is needed by DMS
    on my auto timers which was created in DMS webinterface i have set those to the name of the timer
  • Post action is not set to default
  • Post task is not set to default
  • check epg (EPG Überwachung) could not be set with kodi
  • deactivate auto timer when same... (title...) could not be set with kodi
    this is important to not have double recordings.

PS.: Just an idea, if these setting are not available in the pvr api, we could consider provide those globally with the addon settings.

Dont get me wrong that's just suggestions to make it usable and get rid of creating auto timers with DMS :-) Really Really nice work you are doing to bringing the complete DMS features into kodi!

pOpY

@manuelm
Copy link
Owner

manuelm commented Jun 10, 2018

Dont know if it's relevant, but the created one shot timers (from auto timer) was not deleted.
Maybe thats the behavour of DMS.

Yes. In DMS there is actually no real connection between auto timers and timers after they are created. E.g. if you rename an autotimer the reference in the timers list does not get renamed.
Kodi just displays an general message upon deletion. Neither DMS nor the PVR itself deletes child timers.

Regarding the wrong or missing default values: will check this next week.

Regarding missing features: Kodi supports custom attributes but they are no multi select. So I'd have to provide 2**x different combinations which is not going to happen. Maybe @ksooo has an idea regarding this. Maybe an additional interface to provide an custom gui xml which gets appended and it's values pushed back to the PVR.

@popy2k14
Copy link
Author

No problem regarding the auto and child timers. Just wanted to say you my test results. I would say, this is just as it is :-)

Thx, regarding missing default values, take your time.
Dont know what you mean regarding the missing features. If you mean check epg and deactivate auto timers, thanill think just two global addon settings would be sufficient.

See my picture...

additional_settings

pOpY

@manuelm
Copy link
Owner

manuelm commented Jun 10, 2018

Post action is not set to default
Post task is not set to default

Checked Post record action. Gets set to default.

Priority is fixed with 3894af2

If you mean check epg and deactivate auto timers, thanill think just two global addon settings would be sufficient.

Global settings are the worst of all solutions. Won't do this. These 4 knobs would result in 16 different possible states. I think for now I won't add them at all until a better solution is available.

@manuelm
Copy link
Owner

manuelm commented Jun 10, 2018

However we could talk about changing the default values. e.g I don't have hard feelings about enabling "Additionally check against recording timers" all the time. "Additionally check against removed recordings" is already enabled per default.

Regarding the remaining two knobs: I could add those as custom properties. Three different states seems ok. Especially as all three are related to each other.

@popy2k14
Copy link
Author

Checked Post record action. Gets set to default.

What do you mean with that, is this fixed?
In my case when i'll create an auto timer, my default post recording task "Post-Aufnahme" is not set in the auto timer and also not at the created child timers. Here are pictures:

DMS default settings:
1 dms_recording_defaults

DMS auto timer created with kodi:
2 dms_auto_timer_created with kodi

dms child timer created from auto timer:
3 dms_child_timer_created from autotimer

Thanks for fast the priority workaround/fix. I have seen that kodi has priorities (high, normal, ...) would'nt it be better to just use these and convert it to DMS compatible values (normal = 50, ...)?

Dont know what you mean with the combinations of the 4 knobs.
I dont mean enabling these all the time. Just let the user decide with global or better custom properties (which will be shown on creation of every auto timer). When ill got you right, knobs (radio buttons) shouöd be possible, right?

A really clear solution would be, if there are 4x global knobs, these will be set as default for the custom timer properties every time one gets created. So user can change it (yes/no) and the auto timer will be created with this settings.

@manuelm
Copy link
Owner

manuelm commented Jun 10, 2018

What do you mean with that, is this fixed?

I cannot reproduce this. Here the default value gets set. And even if not it's a bug in the DMS. I do not touch the values at all.

When ill got you right, knobs (radio buttons) shouöd be possible, right?

Yes, but as already explained they are single select only. No multi select. So providing 4 different settings results in 16 different items/states. I won't do this.

I'll go forward with always enabling "Additionally check against recording timers" and provide three different items/states for the two remaining deduplication settings. That's the best solution I can think of. And I won't do global settings.

@manuelm
Copy link
Owner

manuelm commented Jun 10, 2018

Thanks for fast the priority workaround/fix. I have seen that kodi has priorities (high, normal, ...) would'nt it be better to just use these and convert it to DMS compatible values (normal = 50, ...)?

Those are defined by me. I'm mapping them to integer values in the specific range. The normal timer API supports setting the user default value by passing -1. The auto timer API doesn't. So I'm hardcoding this for now.

@manuelm
Copy link
Owner

manuelm commented Jun 10, 2018

I cannot reproduce this.

So I checked for AfterProcessAction as well. Here no value gets set. According to the documentation this is ok as empty/no value means no action. However I can't do anything about this.

Edit: Ok, I found a way to work around this. Might take a little longer to fix as it's more work/code then setting a magic value.

@popy2k14
Copy link
Author

I cannot reproduce this. Here the default value gets set. And even if not it's a bug in the DMS. I do not touch the values at all.

hm, here it gets set to "Keine" but in settings i have one set (Post-Aufnahme).
Updated DMS to 2.1.1 but that did not solve the issue.
I am also using emby and the dvbv addon, and when creating an auto timer directly in emby it works.
In emby there is an addon option where you can enter a string.
I have entered "Post-Aufnahme" and there it works.

You said you dont even touch the "post recording task" values, maybe this is the issue?
I have looked in the sources from emby dvbv addon on github and there is a "after" statement in the api which seems to set this value, here is the line:

builder.AppendFormat("after={0}&", !String.IsNullOrWhiteSpace(Configuration.TimerTask) ? Configuration.TimerTask.ToUrlString() : String.Empty);

from here: puenktchen/DVBViewerTVPlugin@bd8f43b
at file "AutoCreateTimersTask.cs"

Here a global string setting would be nice.

ok, now ill got you regarding priority and the 4x knobs. Your explanation looks good to me also.

manuelm added a commit that referenced this issue Jun 11, 2018
manuelm added a commit that referenced this issue Jun 13, 2018
As a first step we load certain default values from the backend and use
them during auto timer creating. Later we should move the whole settings
handling over.

See #23
manuelm added a commit that referenced this issue Jun 13, 2018
As a first step we load certain default values from the backend and use
them during auto timer creation. Later we should move the whole settings
handling over.

See #23
@manuelm
Copy link
Owner

manuelm commented Jun 13, 2018

@popy2k14 Please give https://ci.appveyor.com/project/manuelm/pvr-dvbviewer/build/master-8bcae0a a try. All remaining points should be fixed. Unless you find more bugs I'll push/publish the autotimers this weekend.

@popy2k14
Copy link
Author

@manuelm have tested the new version with the following results.

The default "after" task will sadly not be set for me, see:

dvbv_1

I have looked into the code and seen that line:

params += "&AfterProcessAction=" + URLEncode(m_cli.GetSettings().m_recordingTask);

should'nt that be "&after=" as seen on my above content (stolen from embys dvbd addon)?

The option to prevent similar episode recordings works as it should.
A nice addition would be that the user can select an default which will be used for the auto timer dialog in kodi.
Can you please implement such a feature?
(I am speaking for my wife, she doesnt want to fiddle around with such options -> press create timer -> ok and go)

@manuelm
Copy link
Owner

manuelm commented Jun 14, 2018

The default "after" task will sadly not be set for me

Check out the debug log to see what the PVR is sending.

should'nt that be "&after=" as seen on my above content (stolen from embys dvbd addon)?

No. You're mixing the autotimers/epg search and timers interface.

A nice addition would be that the user can select an default which will be used for the auto timer dialog in kodi.

The PVR will use the default action defined in the DMS settings dialog. That's good enough. If you want to change the action you can do this using the webinterface or another tool.

@popy2k14
Copy link
Author

Heres the link to the api: http://en.dvbviewer.tv/wiki/Recording_Service_web_API#.2Ftasks.html.3Ftask
Search for "after=":

timeradd_after

@popy2k14
Copy link
Author

@manuelm ill see, you are using /api/searchadd.htm rather than /api/timeradd.html.
In the searchadd.htm, the "&AfterProcessAction=" is correct as stated here: https://www.dvbviewer.tv/forum/topic/59621-media-server-2x-api-changes/

Where do you get the value for this parameter? Because in my case its empty.
Here is the call to DMS when creating a timer:

20:43:30.852 T:2924 DEBUG: CurlFile::Open(0x1cc63976570) http://192.168.0.5:8089/api/searchadd.html?EPGBefore=5&EPGAfter=5&Days=127&SearchFields=3&AutoRecording=1&CheckRecTitle=0&CheckRecSubtitle=0&SearchPhrase=Snowpiercer&Name=Snowpiercer&RecordingFolder=Auto&CheckTimer=1&AfterProcessAction=&Priority=50&Channels=281480000327207&StartTime=&EndTime=&StartDate=-1.00.1899

@popy2k14
Copy link
Author

you are getting the variable "m_recordingTask" with the call to "api/getconfigfile.html?file=config%%5Cservice.xml"the %5 should be a slash which would be in my case

http://192.168.0.5:8089/api/getconfigfile.html?file=config%\service.xml

When ill enter this ill get 404, i have to remove the second %
So when i'll enter in my browser:

http://192.168.0.5:8089/api/getconfigfile.html?file=config\service.xml

i'll get a correct answer.

Could this be the issue?

@manuelm
Copy link
Owner

manuelm commented Jun 14, 2018

From api/getconfigfile.html?file=config%5Cservice.xml -> /Recording/entry/[@name=DefTask]

When ill enter this ill get 404, i have to remove the second %

No. See man 3 printf

I'll check this out myself. Haven't tested this at all. Just assumed I got it right.

@popy2k14
Copy link
Author

you are right, the string for the request is correct.
No problem, i am here to test again.

manuelm added a commit that referenced this issue Jun 14, 2018
@manuelm
Copy link
Owner

manuelm commented Jun 14, 2018

Once again

@popy2k14
Copy link
Author

The default after recording task is working now, thanks a lot!

A nice addition would be that the user can select an default which will be used for the auto timer dialog in kodi.

The PVR will use the default action defined in the DMS settings dialog. That's good enough. If you want to change the action you can do this using the webinterface or another tool.

Ill must come back to this because there is no default setting in DMS for this, look here:

dms_rec_default

@manuelm
Copy link
Owner

manuelm commented Jun 14, 2018

There is. In the DMS settings UI. Not in it's webinterface.

@manuelm
Copy link
Owner

manuelm commented Jun 14, 2018

Pushed to upstream repo with 3.6.0

@manuelm manuelm closed this as completed Jun 14, 2018
@manuelm
Copy link
Owner

manuelm commented Jun 14, 2018

Actually the setting is also exported to the webinterface. It's on the right side of your screenshot. "Task after recording" or "Aufgabe nach Aufnahme" in german:

Edit: However changing doesn't flush the file, so the PVR doesn't notice the setting unless you restart the DMS service + the PVR/Kodi.

@popy2k14
Copy link
Author

popy2k14 commented Jun 14, 2018

Sorry, but i cant find it:

cant_find

Just to be sure, we are talking for the defaults for the following, right?

additional_settings

@manuelm
Copy link
Owner

manuelm commented Jun 14, 2018

Standard-Aktion -> Aufgabe nach Aufnahme in your current screenshot(s)

@popy2k14
Copy link
Author

Sorry for beeing unclear. I'll meant the default's for:

dvbv_2

defaults

@popy2k14
Copy link
Author

Where can those be set?

@manuelm
Copy link
Owner

manuelm commented Jun 14, 2018

I just read your posts again. I think we have talked passed each other. You are talking about defaults for deduplication whereas I'm talking about how to change the Task after recording default value.

There are no defaults for deduplication. The first entry get's selected by Kodi.

@manuelm
Copy link
Owner

manuelm commented Jun 14, 2018

However I can change the default value if you want. I really don't care about this at all.

@popy2k14
Copy link
Author

yeah, now we are on the same train :-)
The "Task after recording" is working correctly now. It gets the default configured in DMS and set's this.

For the deduplication:
Is there a way to let user set an default addon setting which kodi uses for new auto timers?

I am using this feature to prevent duplicates based on the subtitle, see the next picture.
The gray timers was deactivated because of the deduplication feature (subtitle was marked):

deactivated_timers

@manuelm
Copy link
Owner

manuelm commented Jun 14, 2018

Is there a way to let user set an default addon setting which kodi uses for new auto timers?

No. As I said the first value gets selected by Kodi. In general I tend to use the same defaults than the DMS. But I can change the default value to "Record if EPG title + subtitle differs" if you want. Personally, I think that's the better default value.

@popy2k14
Copy link
Author

ok, now ill got you.
yes, ill think also the "Record if EPG title + subtitle differs" is the better value.
Please change it to that default.

@manuelm
Copy link
Owner

manuelm commented Jun 14, 2018

Fixed in 3.6.1. However during testing I noticed that the default value only gets selected if you create an autotimer from the EPG guide. Creating a new autotimer from the timers dialog still selects disabled. Looks like a bug in Kodi to me.

@Morpog
Copy link

Morpog commented Jan 27, 2019

Any chance getting this backported to Krypton 2.4.x addon? Leia isn't released yet and i'm stuck on Krypton because of a special MVC build to have native 3D Blu-ray support (https://forum.kodi.tv/showthread.php?tid=266316).

@manuelm
Copy link
Owner

manuelm commented Feb 6, 2019

Looking at the forum thread there seems to be a Kodi Leia/18 version now.

I'm not sure I'll have any time to look into this in the next couple of weeks. So I don't think a backport will happen from my side.

@Morpog
Copy link

Morpog commented Feb 6, 2019

Hi manuelm,
Yes you are right. I have contacted the maintainer of it and worked with him together on a new version of MVC support in Leia. So yes, for me it isn't needed anymore. Thanks for caring and having a look anyways. I really like the new features in pvr.dvbviewer in Leia.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants