Skip to content
This repository has been archived by the owner on Apr 15, 2023. It is now read-only.

Implemented GetRecordingEdl for pvr.hts addon. #207

Merged
merged 1 commit into from Feb 13, 2014

Conversation

kendrak24
Copy link
Contributor

The change requires a modified tvheadend server. I've implemented the backend support here:
https://github.com/kendrak24/tvheadend (branch edl_support)

@kendrak24 kendrak24 closed this Jul 5, 2013
@kendrak24
Copy link
Contributor Author

Making some changes to the backend first...

@kendrak24 kendrak24 reopened this Jan 29, 2014
@kendrak24 kendrak24 closed this Jan 29, 2014
@kendrak24 kendrak24 reopened this Jan 29, 2014
@kendrak24
Copy link
Contributor Author

EDL support is now implemented in tvheadend upstream master. I've added the functionality to the pvr.hts addon.


PVR_ERROR CHTSPData::GetEdl(const PVR_RECORDING &recording, PVR_EDL_ENTRY entries[], int *size)
{
if (GetProtocol() < 12) return PVR_ERROR_NO_ERROR;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be PVR_ERROR_NOT_IMPLEMENTED

@kendrak24
Copy link
Contributor Author

@opdenkamp Changes applied.

unsigned int start, end, type;

if (htsmsg_get_u32(edl, "start", &start) != 0)
{
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you wrap these like this:

if (htsmsg_get_u32(edl, "start", &start) != 0 ||
    htsmsg_get_u32(edl, "end", &end) != 0 ||
    htsmsg_get_u32(edl, "type", &type) != 0)
{
  *size = 0;
  return PVR_ERROR_NO_ERROR;
}

also, why do you want to return here, instead of continuing with the next entry?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

why do you want to return here, instead of continuing with the next entry?
Well, initially I figured that if data was missing/broken the rest of the data couldn't be trusted, so basically just "ignore everything". But I've changed my mind on this, so now it will continue in stead...

@kendrak24
Copy link
Contributor Author

@opdenkamp Fixed from your comments.

@opdenkamp
Copy link
Owner

okay, please squash it into 1 commit, then it can be pulled

@kendrak24
Copy link
Contributor Author

@opdenkamp Squashed and ready!

opdenkamp pushed a commit that referenced this pull request Feb 13, 2014
Implemented GetRecordingEdl for pvr.hts addon.
@opdenkamp opdenkamp merged commit 0b39fbf into opdenkamp:master Feb 13, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants