Trailers Plugin v1.3.0 (Play/Stream/DL for MovingPictures, My Films, My Videos..) [2020-02-23] (2 Viewers)

doskabouter

Development Group
  • Team MediaPortal
  • September 27, 2009
    4,654
    3,120
    Nuenen
    Home Country
    Netherlands Netherlands
    I can see some changes to what OnlineVideos returns to me for playback options which I use to determine the quality of videos and whether it suits your preferred options in the trailers plugin.

    e.g. I may get back something like this for a URL:
    "1280x720 | (22)"

    But was expecting to see something like:
    "1280x720 | mp4"

    I need to determine if this is due to me having an outdated onlinevideos plugin, a change to the way onlinevideos API works or a bug in OnlineVideos.

    @doskabouter do you know much about hosterBase.GetPlaybackOptions(url)), has there been some changes in that lately ?

    The base is surely not changed, but I did do some work on the youtube part. That could possibly had triggered the change.
    Don't know if that is easily fixed though
     

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    4,654
    3,120
    Nuenen
    Home Country
    Netherlands Netherlands
    It's youtube removing the "type" option from the url...
    At least it's fixed now in the plugin, and when I have some spare time I will see if I can get a mapping (or mimetype) so that at least you'll see the extensions again
     

    DHosein

    Portal Member
    January 2, 2016
    41
    15
    50
    Home Country
    Great Britain (UK) Great Britain (UK)
    Yep - all up to date and able to play online videos from youtube. Trailers log doesn't give any clues - but movingpictures.xml has something like this for every trailer:

    <Trailers>
    <Name>Gremlins (1984) Official Trailer #1 - Horror Comedy</Name>
    <Quality>720</Quality>
    <Source>XBEVwaJEgaA</Source>
    <Language>en</Language>
    <Type>Trailer</Type>
    <IsValid>false</IsValid>
    </Trailers>
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,755
    7,200
    Sydney
    Home Country
    Australia Australia
    Hi @DHosein, could you delete a few Trailer references from that XML file (the whole section), then restart MediaPortal so I can see the log as to determine why it thinks it's invalid.
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,755
    7,200
    Sydney
    Home Country
    Australia Australia
    Thanks @DHosein, I see what your problem is.

    According to your settings, you have chosen 'LQ' (Low Quality) trailers and none are found at that resolution or lower. I suggest you choose HD or HQ.

    For Example:
    Code:
    2020-03-01 18:20:01.492 [INFO] [AutoDownload][36]: Checking for trailer downloads, Title: Gremlins, Year: 1984, IMDb: tt0087363, TMDb: 927
    2020-03-01 18:20:01.507 [INFO] [AutoDownload][36]: Getting download options for video, Name: Gremlins (1984) Official Trailer #1 - Horror Comedy, Quality: 720, Source: XBEVwaJEgaA, Type: Trailer
    2020-03-01 18:20:01.518 [DEBG] [AutoDownload][36]: Getting download and playback options, URL = 'http://www.youtube.com/watch?v=XBEVwaJEgaA'
    2020-03-01 18:20:02.477 [DEBG] [AutoDownload][36]: Found download option, Source URL = 'https://r1---sn-aigzrner.googlevideo.com/videoplayback?expire=1583108399&ei=z_xbXrKsB8K51wbYqIrwCw&ip=90.255.162.118&id=o-AO9Z--AJGTXzQJSVSAMRTs7vw7TleTXGPLmH08QUENnz&itag=18&source=youtube&requiressl=yes&mm=31%2C26&mn=sn-aigzrner%2Csn-5hne6nsr&ms=au%2Conr&mv=m&mvi=0&pl=19&initcwndbps=1762500&vprv=1&mime=video%2Fmp4&gir=yes&clen=7061774&ratebypass=yes&dur=120.929&lmt=1406572070125201&mt=1583086724&fvip=1&fexp=23842630%2C23882514&c=WEB&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cratebypass%2Cdur%2Clmt&sig=ADKhkGMwRQIgcTtb5L9D9433j4088xlch98pqIWMbivh25WYsAPs7rsCIQChxGow5WUWeeFU9dJEncJDzD2tXS0osB5dwqLKCptTug%3D%3D&lsparams=mm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=ABSNjpQwRgIhAPlLXJoGnrQO-ggPTvvBxmxQ64Ztt4NJ3KVeokM_X3uvAiEAx172O-HNq1iV6uy8nKPLe6rmFX6a0TUOAj_unxEeRio%3D', Quality = '640x360 |  (18)'
    2020-03-01 18:20:02.485 [DEBG] [AutoDownload][36]: Found download option, Source URL = 'https://r1---sn-aigzrner.googlevideo.com/videoplayback?expire=1583108399&ei=z_xbXrKsB8K51wbYqIrwCw&ip=90.255.162.118&id=o-AO9Z--AJGTXzQJSVSAMRTs7vw7TleTXGPLmH08QUENnz&itag=22&source=youtube&requiressl=yes&mm=31%2C26&mn=sn-aigzrner%2Csn-5hne6nsr&ms=au%2Conr&mv=m&mvi=0&pl=19&initcwndbps=1762500&vprv=1&mime=video%2Fmp4&ratebypass=yes&dur=120.929&lmt=1509153307218369&mt=1583086724&fvip=1&fexp=23842630%2C23882514&c=WEB&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cratebypass%2Cdur%2Clmt&sig=ADKhkGMwRQIgHhqgnnmnmHakhoGF09CM2puC6M6bHAINWsGoPcP-_8wCIQCidBdL89Hi-K9-kdOe28ErXJjLFggOJ30bBnVO1Rs1ag%3D%3D&lsparams=mm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=ABSNjpQwRgIhAPlLXJoGnrQO-ggPTvvBxmxQ64Ztt4NJ3KVeokM_X3uvAiEAx172O-HNq1iV6uy8nKPLe6rmFX6a0TUOAj_unxEeRio%3D', Quality = '1280x720 |  (22)'
    2020-03-01 18:20:02.557 [WARN] [AutoDownload][36]: Could not find any matching resolution or lower for download, skipping trailer download

    Gremlins has trailers at 640x360 and 1280x720. Neither of these match a 'LQ' setting, from code this is 426x or 320x:
    Code:
                if (preferredQuality == "HD")
                {
                    var options = downloadOptions.Where(o => o.Key.Contains("1280x"));
                    if (options.Count() > 0)
                    {
                        // get the low audio bitrate version as the high bit rate seems to fail
                        return new KeyValuePair<string, string>(options.First().Value, "HD");
                    }
                    else
                    {
                        // no HD available, check next highest quality
                        return GetPreferredQualityOption(downloadOptions, "HQ");
                    }
                }
                else if (preferredQuality == "HQ")
                {
                    // get the next highest quality
                    var options = downloadOptions.Where(o => o.Key.Contains("640x"));
                    if (options.Count() > 0)
                    {
                        // get the low audio bitrate version as the high bit rate seems to fail
                        return new KeyValuePair<string, string>(options.First().Value, "HQ");
                    }
                    else
                    {
                        // no HQ available, check next highest quality
                        return GetPreferredQualityOption(downloadOptions, "LQ");
                    }
                }
                else if (preferredQuality == "LQ")
                {
                    var options = downloadOptions.Where(o => o.Key.Contains("426x"));
                    if (options.Count() > 0)
                    {
                        return new KeyValuePair<string, string>(options.First().Value, "LQ");
                    }
                    else
                    {
                        options = downloadOptions.Where(o => o.Key.Contains("320x"));
                        if (options.Count() > 0)
                        {
                            return new KeyValuePair<string, string>(options.First().Value, "LQ");
                        }
                    }
                }
    
                // no mp4 videos available
                return new KeyValuePair<string, string>(null, null);
            }

    1583188129044.png
     

    DHosein

    Portal Member
    January 2, 2016
    41
    15
    50
    Home Country
    Great Britain (UK) Great Britain (UK)
    That seems to have kick-started something. Switching back to HD has given me another couple hundred trailers. Here's hoping it's sorted.
     

    Users who are viewing this thread

    Top Bottom