Kodi Community Forum
[OLD/CLOSED] PseudoTV Live - Set-Top box solution - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Program Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=151)
+----- Forum: PseudoTV / PseudoTV Live (https://forum.kodi.tv/forumdisplay.php?fid=231)
+----- Thread: [OLD/CLOSED] PseudoTV Live - Set-Top box solution (/showthread.php?tid=169032)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694


[FORK] "PseudoTV Live" w/ LiveTV, InternetTV and added Strm Support - ADHDMedia - 2014-05-12

Yup, updated to Gotham and the USTVnow channels scraped just fine. Everything seems to be in perfect working order Smile

Thanks again for all your hard work bro. Can't wait for the donor features.


RE: [FORK] "PseudoTV Live" w/ LiveTV, InternetTV and added Strm Support - scooper750 - 2014-05-12

Channel Sharing...

Has anyone had any issues setting up Channel Sharing.
I've followed the directions regarding sharing but my client never syncs with the master.
I enabled sharing on the client and point the location to the master.
What am I missing.

I wanted to say that I haven't shared my playlists (with Path Substitution), but each instance has the same identical copies.
Not sure if that would cause an issue.


RE: [FORK] "PseudoTV Live" w/ LiveTV, InternetTV and added Strm Support - for-the - 2014-05-12

So, that Reddit channel modification I was working on:

I've hit a bit of a wall and was wondering if anyone might have any ideas?

I can easily get a list of YouTube videos for the channel, but XBMC needs the duration of each video, which is a problem.

I can use Youtube's API to get the duration details, but I have to make a request for each video. After about 100 requests the API starts refusing to answer because the script hits Youtube's API's quota. It also means that any further request (even for other youtube channels) will get refused as well.

There's a way to do batch requests, but that requires a developer key.. which means that all of PseudoTV's users will be on the same quota. That can't be good?

I could restrict the video limit... but, even then, if you were to refresh the channel list twice in quick succession everything would stop working since the quote would get hit -- which would end up confusing a lot of people.

Of course, the modification works great for me since I'm the only person using it and know what's up. But, I'd rather be able to get the modification added . Smile

Anyone have any ideas?


RE: [FORK] "PseudoTV Live" w/ LiveTV, InternetTV and added Strm Support - ianuk2005 - 2014-05-12

(2014-05-11, 00:50)Lunatixz Wrote:
(2014-05-11, 00:34)ianuk2005 Wrote: Quick question, I can't seem to find any info on this. For all my channels no matter whether it's a 3 hour movie or 15 minute show they all appear as 1 hour long in the epg. Is this normal??

No this is not normal, either your media is encoded with incorrect run times or your xbmc scrape incorrect info. Search fourm for how to fix.

All my media seems to be scraped correctly with the correct run times. The plugins i'm using are gomovies and gotv which pulls data from various sources before selecting a stream source. I'm not sure how pseudotv handles everything back end so i'm assuming that it's not receiving any run times from the plugin and defaulting? Is there any solution to this that will make it use the run times from the library info?


Re: RE: [FORK] "PseudoTV Live" w/ LiveTV, InternetTV and added Strm Support - Lunatixz - 2014-05-12

(2014-05-12, 20:51)ianuk2005 Wrote:
(2014-05-11, 00:50)Lunatixz Wrote:
(2014-05-11, 00:34)ianuk2005 Wrote: Quick question, I can't seem to find any info on this. For all my channels no matter whether it's a 3 hour movie or 15 minute show they all appear as 1 hour long in the epg. Is this normal??

No this is not normal, either your media is encoded with incorrect run times or your xbmc scrape incorrect info. Search fourm for how to fix.

All my media seems to be scraped correctly with the correct run times. The plugins i'm using are gomovies and gotv which pulls data from various sources before selecting a stream source. I'm not sure how pseudotv handles everything back end so i'm assuming that it's not receiving any run times from the plugin and defaulting? Is there any solution to this that will make it use the run times from the library info?

Are you using strms or direct plugin building?

(2014-05-12, 20:28)for-the Wrote: So, that Reddit channel modification I was working on:

I've hit a bit of a wall and was wondering if anyone might have any ideas?

I can easily get a list of YouTube videos for the channel, but XBMC needs the duration of each video, which is a problem.

I can use Youtube's API to get the duration details, but I have to make a request for each video. After about 100 requests the API starts refusing to answer because the script hits Youtube's API's quota. It also means that any further request (even for other youtube channels) will get refused as well.

There's a way to do batch requests, but that requires a developer key.. which means that all of PseudoTV's users will be on the same quota. That can't be good?

I could restrict the video limit... but, even then, if you were to refresh the channel list twice in quick succession everything would stop working since the quote would get hit -- which would end up confusing a lot of people.

Of course, the modification works great for me since I'm the only person using it and know what's up. But, I'd rather be able to get the modification added . Smile

Anyone have any ideas?

Duration is available from youtube. Review my youtube code to learn how.


RE: [FORK] "PseudoTV Live" w/ LiveTV, InternetTV and added Strm Support - bry - 2014-05-12

For those with a SiliconDust HDHomeRun Prime - I used a powershell script written by user wtg on the silicondust forums that I slightly modified. this will work on windows 7 or 8 while running powershell as admin.

Code:
<#
.Synopsis
Creates .strm files that can be used by XBMC to view live TV using a Silicon Dust HDHomeRun.

.Parameter device
If unspecified the script discovers your device id automatically, which should be fine unless you
have multiple HDHomeRuns. If you do have multiple devices, supply the ID of the device you wish
to generate strm files for.

.Parameter tuner
(Optional, default = 0) Supply a different tuner number if desired.

.Parameter outputDir
(Optional, default = %TEMP%) Directory to write the .strm files to. Supply another directory name
if desired, or a period for the current directory.

.Parameter LineUpXML
(Optional, default = "%ProgramData%\SiliconDust\HDHomeRun\Digital*.xml") If you have both a
"Digital Cable.XML" and "Digital Antenna.XML" scan file because you're using the original HDHomeRun
with both cable and antenna inputs - or have at least run a GUI scan from both sources at some
point - you'll need to specify the filename. By the default the script grabs whichever file it finds
in the Silicon Dust program data directory.

.Parameter pad
(Optional) Zero-pad the channel numbers to the specified number of digits.

.Parameter scan
Specify this option if you want the process to generate the files by running a command-line scan
and processing the results. If unspecified the file is generated via the XML file in which the
HDHomeRun stores the last gui scan results. It's much slower to force a scan and the stream files
won't be named as meaningfully.

.Example
   .\gen_strms.ps1 -outputDir c:\temp

   Generate streams for tuner 0 and write the files to c:\temp.

.Example
   .\gen_strms.ps1 -tuner 1 -out c:\temp

   Generate streams for tuner 1 and write to c:\temp. Parms don't need to be spelled out completely.

.Example
   .\gen_strms.ps1 -out . -LineUpXML 'c:\ProgramData\SiliconDust\HDHomeRun\Digital Cable.xml'

   Generate streams for tuner 0 and write files to the current directory, using the Digital Cable.xml
   file.

.NOTES
   Date      Version  Comments
   --------  -------  -------------------------------------------------------
   10/22/12   1.0     Initial release
   11/08/12   1.1     Added ability to specify a scan file on the command line;
                      added error message if two XML scan files are found; added
                      tuner to the output file name; added support for padding
                      channel numbers; improved support for scan file.
#>
Param(
[string] $device    = 'FFFFFFFF',
[string] $tuner     = '0',
[string] $outputDir = "$env:temp",
[int]    $pad       = 1,
[string] $LineUpXML = "$env:ProgramData\SiliconDust\HDHomeRun\CableCard*.xml",
[switch] $scan      = $false,
[string] $ScanFile  = "")

# create a regex pattern to find invalid characters in a filename
$invalid_chars = "[{0}]" -f ([Regex]::Escape([System.IO.Path]::GetInvalidFileNameChars()-join''))
  
if ( $device -eq 'FFFFFFFF' ) {
   # discover the device id, or the last one reported if more than one
   & "$env:programfiles\silicondust\hdhomerun\hdhomerun_config.exe" discover | %{
      switch -regex ($_) {
         "device (\w+) found" { $device = $matches[1] }
      }
   }
   write-host "Creating streams for device id $device"
}    

if ( $scan -or $ScanFile -gt '' ) {
   if ( $scan ) {
      write-host "Starting scan - this can take a while..."      
      $scan_data = & "$env:programfiles\silicondust\hdhomerun\hdhomerun_config.exe" $device scan $tuner
   } else {
      Write-Host "Reading scan file $ScanFile..."
      $scan_data = get-content $ScanFile
   }
   $scan_data | % {
      switch -regex ( $_ ) {
         "SCANNING.*:(?<chan>\d+)"  {  $chan = $matches.chan
                                       write-verbose "Processing physical channel $chan"
                                       break
                                    }
         "PROGRAM (?<PID>\d+): (?<prog>\d*\.*\d*)\s*(?<chan_name>.*)"  {
                                       $ProgID    = $matches.PID
                                       $prog      = $matches.prog
                                       $chan_name = $matches.chan_name
                                       if ( $chan_name -eq "" ) { $chan_name = 'Blank' }
                                       if ( $chan_name -match "(\(encrypted\)|\(control\)|\(no data\))" ) {
                                          write-verbose "Channel $chan_name, program $prog is encrypted or has no data"
                                          break
                                       }
                                       # write the data to the file.
                                       if ( $chan -match '[.]' ) {
                                          # The guide number has a period in it and thus shouldn't be padded
                                          $number = $chan
                                       } else {
                                          $number = ("{0:d$pad}" -f [int]$chan)
                                       }
                                       $file = "$number-$ProgID ($tuner)-$chan_name.strm"
                                       $file = Join-Path $OutputDir ([Regex]::Replace($file, $invalid_chars, ''))
                                       write-host "Writing stream file $file."
                                       "hdhomerun://$device-$tuner/tuner$tuner`?channel=auto:$chan&program=$ProgID" `
                                       | out-file -FilePath $file -encoding "ASCII"
                                    }
      }
   }
} else {  
   # Verify path to GUI listing file.
   switch ( ([array](dir $LineUpXML)).count ) {
      1          {
                    write-output "Loading HDHomeRun's lineup file from last GUI scan..."
                    $xml = [xml](get-content $LineUpXML)
                 }
      {$_ -gt 1} {  throw "More than 1 file exists matching $LineUpXML. Use -LineUpXML option to specify while file to use." }
      default    {  throw "ERROR: Cannot find HDHomeRun's GUI's lineup file $LineUpXML. " }
   }
   Write-Output "Number of channels found: " $xml.LineUp.Program.Count
   $xml.LineUp.Program | %{
      if ($_.Enabled -eq 'true') {
         if ( $_.GuideNumber -match '[.]' ) {
            # The guide number has a period in it and thus shouldn't be padded
            $number = $_.GuideNumber
         } else {
            $number = ("{0:d$pad}" -f [int]$_.GuideNumber)
         }
         $file = "$number ($tuner)-" + $_.Name + '.strm'
         $file = Join-Path $OutputDir ([Regex]::Replace($file, $invalid_chars, ''))
         write-host "Writing stream file $file."
         "hdhomerun://$device-$tuner/tuner$tuner`?channel=$($_.Modulation):$($_.Frequency)&program=$($_.ProgramNumber)" `
         | out-file -FilePath $file -encoding "ASCII"  
      }
   }
}



RE: [FORK] "PseudoTV Live" w/ LiveTV, InternetTV and added Strm Support - for-the - 2014-05-12

(2014-05-12, 21:02)Lunatixz Wrote: Duration is available from youtube. Review my youtube code to learn how.

Oh, I can get duration for the first 100 videos. After that it starts failing.

Your code has the advantage of pulling the duration from a single API request (The whole playlist, the whole users' channel, etc). But, because the videos on Reddit don't have any relationship between them, I'm forced to get the duration one-by-one with an API request for each video, which eventually causes the API to start sending back 403 - Access Denied errors; and not just for my part of the script. All future Youtube requests will also fail...


Re: RE: [FORK] "PseudoTV Live" w/ LiveTV, InternetTV and added Strm Support - Lunatixz - 2014-05-12

(2014-05-12, 21:16)for-the Wrote:
(2014-05-12, 21:02)Lunatixz Wrote: Duration is available from youtube. Review my youtube code to learn how.

Oh, I can get duration for the first 100 videos. After that it starts failing.

Your code has the advantage of pulling the duration from a single API request (The whole playlist, the whole users' channel, etc). But, because the videos on Reddit don't have any relationship between them, I'm forced to get the duration one-by-one with an API request for each video, which eventually causes the API to start sending back 403 - Access Denied errors; and not just for my part of the script. All future Youtube requests will also fail...

Yeah sounds like your hammering the api... what kind of list are you trying to parse? Can I see an example reddit list?


RE: [FORK] "PseudoTV Live" w/ LiveTV, InternetTV and added Strm Support - for-the - 2014-05-12

(2014-05-12, 21:36)Lunatixz Wrote: Yeah sounds like your hammering the api... what kind of list are you trying to parse? Can I see an example reddit list?

Yup, it's exactly that. The API won't let me dump 100 requests at it. Which isn't a problem for one or two channels. But, put 4-5 Reddit channels and suddenly it stops working.

There's nothing special about the Reddit list. I use feedparser and some regex to create a list of youtube videos. So, something like: ["a6I2izxeabY","UbvZt3CjNOg", etc]

Then I loop through them and grab the duration information from Youtube using their API URL:

http://gdata.youtube.com/feeds/api/videos/UbvZt3CjNOg?v=2

Which gets me the duration, but only for a single video per request. And it all works beautifully.. unless you really like Reddit channels. Then it silently fails when the API quota is hit. And not just for that one Reddit channel, but for all other Youtube channels as well.

Unlike playlists or user's sites, there's no way (that I can determine) to request data on a bunch of randomly chosen videos.

So... I'm stuck with a solution that works 90% of the time. And I'm pretty sure that having 10% of all users going "Why doesn't this work?" isn't a reasonable solution.

What's frustrating is that it's just missing the duration information. I can get all the other information I need (title, summary, etc) from Reddit. But, without the duration of the video I can't build the playlist.


Re: RE: [FORK] "PseudoTV Live" w/ LiveTV, InternetTV and added Strm Support - Lunatixz - 2014-05-12

(2014-05-12, 22:13)for-the Wrote:
(2014-05-12, 21:36)Lunatixz Wrote: Yeah sounds like your hammering the api... what kind of list are you trying to parse? Can I see an example reddit list?

Yup, it's exactly that. The API won't let me dump 100 requests at it. Which isn't a problem for one or two channels. But, put 4-5 Reddit channels and suddenly it stops working.

There's nothing special about the Reddit list. I use feedparser and some regex to create a list of youtube videos. So, something like: ["a6I2izxeabY","UbvZt3CjNOg", etc]

Then I loop through them and grab the duration information from Youtube using their API URL:

http://gdata.youtube.com/feeds/api/videos/UbvZt3CjNOg?v=2

Which gets me the duration, but only for a single video per request. And it all works beautifully.. unless you really like Reddit channels. Then it silently fails when the API quota is hit. And not just for that one Reddit channel, but for all other Youtube channels as well.

Unlike playlists or user's sites, there's no way (that I can determine) to request data on a bunch of randomly chosen videos.

So... I'm stuck with a solution that works 90% of the time. And I'm pretty sure that having 10% of all users going "Why doesn't this work?" isn't a reasonable solution.

What's frustrating is that it's just missing the duration information. I can get all the other information I need (title, summary, etc) from Reddit. But, without the duration of the video I can't build the playlist.

You need to find a way to add the videos to a YouTube playlist. Then gdata the playlist which will have all relevant info in it.

https://www.google.com/search?safe=off&site=&source=hp&ei=xyxxU-WKO9KysATw84DICg&q=python+youtube+playlist+creator


RE: [FORK] "PseudoTV Live" w/ LiveTV, InternetTV and added Strm Support - redhalo - 2014-05-12

@Lunatixz or any other skinners who may be in the know, are there specific id's for skinning the individual show listing in the epg, as opposed to the entire row? Let me know if my question doesn't make sense.

I'm halfway done with a custom skin to match the Eminence skin.


RE: [FORK] "PseudoTV Live" w/ LiveTV, InternetTV and added Strm Support - for-the - 2014-05-12

(2014-05-12, 22:19)Lunatixz Wrote: You need to find a way to add the videos to a YouTube playlist. Then gdata the playlist which will have all relevant info in it.

I think that just moves the problem: Instead of being unable to create the channel, I'll be unable create the playlist because adding 100 videos to playlist is still 100 API calls. (Also, create the playlist under who's account? Create a PseudoTV user that has, literally, 1000s of playlists for each PsuedoTV Live user? Or force user to submit their youtube account details and have it create playlists on their account?)

The best solution I can think of is for me to create a youtube video that just says "Error: API Overload" and have it pass that video information back to PseduoTV Live when the API limit is hit. So, for the 10% of the time that it doesn't work for, it'll at least tell them why and they'll still have a working channel list. Then, hopefully, on the channel's next refresh, they won't hit the limit and those videos will eventually get populated. Not the prettiest of solutions... But, the view count on the video will also be a good indication of how often users are hitting the API limit.


RE: [FORK] "PseudoTV Live" w/ LiveTV, InternetTV and added Strm Support - ianuk2005 - 2014-05-12

(2014-05-12, 21:02)Lunatixz Wrote:
(2014-05-12, 20:51)ianuk2005 Wrote:
(2014-05-11, 00:50)Lunatixz Wrote: No this is not normal, either your media is encoded with incorrect run times or your xbmc scrape incorrect info. Search fourm for how to fix.

All my media seems to be scraped correctly with the correct run times. The plugins i'm using are gomovies and gotv which pulls data from various sources before selecting a stream source. I'm not sure how pseudotv handles everything back end so i'm assuming that it's not receiving any run times from the plugin and defaulting? Is there any solution to this that will make it use the run times from the library info?

Are you using strms or direct plugin building?

Strm files, content example:

plugin://plugin.video.GOtv/?action=play&name=2+Broke+Girls+S01E01&title=Pilot&imdb=1845307&tvdb=248741&year=2011&season=1&episode=1&show=2+Broke+Girls&show_alt=2+Broke+Girls&date=2011-09-19


RE: [FORK] "PseudoTV Live" w/ LiveTV, InternetTV and added Strm Support - Lunatixz - 2014-05-12

(2014-05-12, 23:20)for-the Wrote:
(2014-05-12, 22:19)Lunatixz Wrote: You need to find a way to add the videos to a YouTube playlist. Then gdata the playlist which will have all relevant info in it.

I think that just moves the problem: Instead of being unable to create the channel, I'll be unable create the playlist because adding 100 videos to playlist is still 100 API calls. (Also, create the playlist under who's account? Create a PseudoTV user that has, literally, 1000s of playlists for each PsuedoTV Live user? Or force user to submit their youtube account details and have it create playlists on their account?)

The best solution I can think of is for me to create a youtube video that just says "Error: API Overload" and have it pass that video information back to PseduoTV Live when the API limit is hit. So, for the 10% of the time that it doesn't work for, it'll at least tell them why and they'll still have a working channel list. Then, hopefully, on the channel's next refresh, they won't hit the limit and those videos will eventually get populated. Not the prettiest of solutions... But, the view count on the video will also be a good indication of how often users are hitting the API limit.

So instead of building a list that can be parsed correctly, you would rather api call each video until you get temp banned from the api, then right code to handle the exception? I wouldn't be interested in that...

If you have the video id's which you indicated you do. Then just should add the videos to a youtube playlist using python, Then parse the playlist for video data.

If I were you I would do something like this http://stackoverflow.com/questions/21277142/adding-youtube-video-to-playlist-using-youtube-data-api-v3-in-python batch the job to only add 25 video id's at a time up to a limit set by the user (25|50|100|etc).
Then I would call the playlist with feedparser and get all information to populate channel with.

(2014-05-12, 23:24)ianuk2005 Wrote:
(2014-05-12, 21:02)Lunatixz Wrote:
(2014-05-12, 20:51)ianuk2005 Wrote: All my media seems to be scraped correctly with the correct run times. The plugins i'm using are gomovies and gotv which pulls data from various sources before selecting a stream source. I'm not sure how pseudotv handles everything back end so i'm assuming that it's not receiving any run times from the plugin and defaulting? Is there any solution to this that will make it use the run times from the library info?

Are you using strms or direct plugin building?

Strm files, content example:

plugin://plugin.video.GOtv/?action=play&name=2+Broke+Girls+S01E01&title=Pilot&imdb=1845307&tvdb=248741&year=2011&season=1&episode=1&show=2+Broke+Girls&show_alt=2+Broke+Girls&date=2011-09-19

okay, think I have an idea why it's not working for you... that plugin doesn't generate nfos... I'll add some code to deal with the problem...


RE: [FORK] "PseudoTV Live" w/ LiveTV, InternetTV and added Strm Support - guttermonk - 2014-05-13

My PVR channels won't load in PTVL, but they load okay in XBMC's LiveTV. Had them working yesterday before I messed them up by auto-tuning a video addon with super favorites... guess Tekzilla wasn't considered a folder in Rev3... doh!

Any idea how to get PVR channels back? xbmc.log