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

Behaviour when no broadcast date is known #33

Closed
canihavesomecoffee opened this issue Feb 2, 2016 · 1 comment · Fixed by #34
Closed

Behaviour when no broadcast date is known #33

canihavesomecoffee opened this issue Feb 2, 2016 · 1 comment · Fixed by #34

Comments

@canihavesomecoffee
Copy link
Contributor

Hello,

first of all I'd like to thank you for this nice maintained PHP library for accessing theTVDB.

I'm wondering however, if the current behaviour for creating a DateTime object based on the FirstAired field for episodes is correct. If there is a FirstAired, it creates the DateTime object just fine, but in my case I have a couple of series where the FirstAired field in xml is just empty...

This results in the DateTime object being initialized at the current time, which makes it rather annoying to compare against a previously stored value...

So my question is if this shouldn't be changed to something which indicates that there is no known value for this yet.

An example of the XML which doesn't contain an FirstAired element:

<?xml version="1.0" encoding="UTF-8" ?>
<Data>
  <Series>
    <id>300472</id>
    <Actors>Snipped for brevity</Actors>
    <Airs_DayOfWeek></Airs_DayOfWeek>
    <Airs_Time></Airs_Time>
    <ContentRating></ContentRating>
    <FirstAired></FirstAired>
    <Genre>|Adventure|Drama|Fantasy|Horror|</Genre>
    <IMDB_ID>tt1316546</IMDB_ID>
    <Language>en</Language>
    <Network>AMC</Network>
    <NetworkID></NetworkID>
    <Overview>Snipped for brevity</Overview>
    <Rating></Rating>
    <RatingCount>0</RatingCount>
    <Runtime>40</Runtime>
    <SeriesID></SeriesID>
    <SeriesName>Preacher</SeriesName>
    <Status>Continuing</Status>
    <added>2015-09-09 13:23:34</added>
    <addedBy>417533</addedBy>
    <banner>graphical/300472-g2.jpg</banner>
    <fanart>fanart/original/300472-1.jpg</fanart>
    <lastupdated>1452903959</lastupdated>
    <poster>posters/300472-1.jpg</poster>
    <tms_wanted_old>0</tms_wanted_old>
    <zap2it_id></zap2it_id>
  </Series>
</Data>
@Moinax
Copy link
Owner

Moinax commented Feb 3, 2016

That's a good idea, I merged your PR.

Regards,

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

Successfully merging a pull request may close this issue.

2 participants