home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Talk
TV-Server on WHS - Collection of fixes and workarounds
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="larry_S" data-source="post: 579616" data-attributes="member: 85587"><p><strong>AW: TV-Server on WHS - Collection of fixes and workarounds</strong></p><p></p><p>The Problem only exists on schedules scheduleType 0 (One Time).</p><p>The Scheduled Series works correctly.</p><p></p><p>You can also try to change the following in the Script.</p><p>Add the line (after the 4.) in the SQL Statement:</p><p>[CODE] " and (starttime>current_timestamp or Endtime>current_timestamp) " & _[/CODE]</p><p></p><p>Complete SQL:</p><p>[CODE]set rs1=db1.execute("SELECT min(Starttime) as start from " & _</p><p> "( select dateadd(mi,(preRecordInterval+"&Zeitdiff&")*-1,Starttime) as starttime, dateadd(mi,PostRecordInterval+"&Zeitdiff&",Endtime) as endtime " & _</p><p> " from schedule " & _</p><p> " where scheduleType=0 " & _</p><p> " and (starttime>current_timestamp or Endtime>current_timestamp) " & _</p><p> " union " & _</p><p> " select dateadd(mi,datepart(mi,starttime)-(preRecordInterval) -"&Zeitdiff&" ,dateadd(hh,datepart(hh,starttime),heute)) as startime, " & _</p><p> " dateadd(mi,datepart(mi,endtime)+(PostRecordInterval)+"&Zeitdiff&" ,dateadd(hh,datepart(hh,endtime),heute)) as endtime " & _</p><p> " from schedule " & _</p><p> " inner join (SELECT DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE())) as heute,DATEADD(dd, -1, DATEDIFF(dd, 0, GETDATE())) as gestern, DATEADD(dd, +1, DATEDIFF(dd, 0, GETDATE())) as morgen ) as UA " & _</p><p> " on 1=1 " & _</p><p> " where scheduleType in(1,3,4) or (scheduleType=2 and datepart(dw,heute)=datepart(dw,starttime)) or (scheduleType=6 and datepart(dw,heute) in (1,2,3,4,5)) or (scheduleType=5 and datepart(dw,heute) in (6,7)) " & _</p><p> " union " & _</p><p> " select dateadd(mi,datepart(mi,starttime)-(preRecordInterval) -"&Zeitdiff&" ,dateadd(hh,datepart(hh,starttime),morgen)) as startime, " & _</p><p> " dateadd(mi,datepart(mi,endtime)+(PostRecordInterval)+"&Zeitdiff&" ,dateadd(hh,datepart(hh,endtime),morgen)) as endtime " & _</p><p> " from schedule " & _</p><p> " inner join (SELECT DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE())) as heute,DATEADD(dd, -1, DATEDIFF(dd, 0, GETDATE())) as gestern, DATEADD(dd, +1, DATEDIFF(dd, 0, GETDATE())) as morgen ) as UA " & _</p><p> " on 1=1 " & _</p><p> " where scheduleType in(1,3,4) or (scheduleType=2 and datepart(dw,morgen)=datepart(dw,starttime)) or (scheduleType=6 and datepart(dw,morgen) in (1,2,3,4,5)) or (scheduleType=5 and datepart(dw,morgen) in (6,7)) " & _</p><p> " union " & _</p><p> " select dateadd(mi,datepart(mi,starttime)-(preRecordInterval) -"&Zeitdiff&" ,dateadd(hh,datepart(hh,starttime),gestern)) as startime, " & _</p><p> " dateadd(mi,datepart(mi,endtime)+(PostRecordInterval)+"&Zeitdiff&" ,dateadd(hh,datepart(hh,endtime),gestern)) as endtime " & _</p><p> " from schedule " & _</p><p> " inner join (SELECT DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE())) as heute,DATEADD(dd, -1, DATEDIFF(dd, 0, GETDATE())) as gestern, DATEADD(dd, +1, DATEDIFF(dd, 0, GETDATE())) as morgen ) as UA " & _</p><p> " on 1=1 " & _</p><p> " where scheduleType in(1,3,4) or (scheduleType=2 and datepart(dw,gestern)=datepart(dw,starttime)) or (scheduleType=6 and datepart(dw,gestern) in (1,2,3,4,5)) or (scheduleType=5 and datepart(dw,gestern) in (6,7)) " & _</p><p> ") as ua " & _</p><p> "where endTime>current_timestamp")[/CODE]</p><p></p><p>Please let me know if it works</p></blockquote><p></p>
[QUOTE="larry_S, post: 579616, member: 85587"] [b]AW: TV-Server on WHS - Collection of fixes and workarounds[/b] The Problem only exists on schedules scheduleType 0 (One Time). The Scheduled Series works correctly. You can also try to change the following in the Script. Add the line (after the 4.) in the SQL Statement: [CODE] " and (starttime>current_timestamp or Endtime>current_timestamp) " & _[/CODE] Complete SQL: [CODE]set rs1=db1.execute("SELECT min(Starttime) as start from " & _ "( select dateadd(mi,(preRecordInterval+"&Zeitdiff&")*-1,Starttime) as starttime, dateadd(mi,PostRecordInterval+"&Zeitdiff&",Endtime) as endtime " & _ " from schedule " & _ " where scheduleType=0 " & _ " and (starttime>current_timestamp or Endtime>current_timestamp) " & _ " union " & _ " select dateadd(mi,datepart(mi,starttime)-(preRecordInterval) -"&Zeitdiff&" ,dateadd(hh,datepart(hh,starttime),heute)) as startime, " & _ " dateadd(mi,datepart(mi,endtime)+(PostRecordInterval)+"&Zeitdiff&" ,dateadd(hh,datepart(hh,endtime),heute)) as endtime " & _ " from schedule " & _ " inner join (SELECT DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE())) as heute,DATEADD(dd, -1, DATEDIFF(dd, 0, GETDATE())) as gestern, DATEADD(dd, +1, DATEDIFF(dd, 0, GETDATE())) as morgen ) as UA " & _ " on 1=1 " & _ " where scheduleType in(1,3,4) or (scheduleType=2 and datepart(dw,heute)=datepart(dw,starttime)) or (scheduleType=6 and datepart(dw,heute) in (1,2,3,4,5)) or (scheduleType=5 and datepart(dw,heute) in (6,7)) " & _ " union " & _ " select dateadd(mi,datepart(mi,starttime)-(preRecordInterval) -"&Zeitdiff&" ,dateadd(hh,datepart(hh,starttime),morgen)) as startime, " & _ " dateadd(mi,datepart(mi,endtime)+(PostRecordInterval)+"&Zeitdiff&" ,dateadd(hh,datepart(hh,endtime),morgen)) as endtime " & _ " from schedule " & _ " inner join (SELECT DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE())) as heute,DATEADD(dd, -1, DATEDIFF(dd, 0, GETDATE())) as gestern, DATEADD(dd, +1, DATEDIFF(dd, 0, GETDATE())) as morgen ) as UA " & _ " on 1=1 " & _ " where scheduleType in(1,3,4) or (scheduleType=2 and datepart(dw,morgen)=datepart(dw,starttime)) or (scheduleType=6 and datepart(dw,morgen) in (1,2,3,4,5)) or (scheduleType=5 and datepart(dw,morgen) in (6,7)) " & _ " union " & _ " select dateadd(mi,datepart(mi,starttime)-(preRecordInterval) -"&Zeitdiff&" ,dateadd(hh,datepart(hh,starttime),gestern)) as startime, " & _ " dateadd(mi,datepart(mi,endtime)+(PostRecordInterval)+"&Zeitdiff&" ,dateadd(hh,datepart(hh,endtime),gestern)) as endtime " & _ " from schedule " & _ " inner join (SELECT DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE())) as heute,DATEADD(dd, -1, DATEDIFF(dd, 0, GETDATE())) as gestern, DATEADD(dd, +1, DATEDIFF(dd, 0, GETDATE())) as morgen ) as UA " & _ " on 1=1 " & _ " where scheduleType in(1,3,4) or (scheduleType=2 and datepart(dw,gestern)=datepart(dw,starttime)) or (scheduleType=6 and datepart(dw,gestern) in (1,2,3,4,5)) or (scheduleType=5 and datepart(dw,gestern) in (6,7)) " & _ ") as ua " & _ "where endTime>current_timestamp")[/CODE] Please let me know if it works [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Talk
TV-Server on WHS - Collection of fixes and workarounds
Contact us
RSS
Top
Bottom