Announcement

Collapse
No announcement yet.

[HOWTO] Analyse Specific Season *only* "hack"

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Prime Video [HOWTO] Analyse Specific Season *only* "hack"

    In the spirit of Germania jpp72 "unleashing" their hacks for various tricks, I thought I'd share a hack that allows you can make StreamFab analyse only the currently selected season instead the first season and scanning all available seasons, effectively mimicking the behaviour of OnceHasBeenStream.


    The trick lies in modifying
    Code:
    amazon_get_season_urls.py
    that is found in the scripts folder in two places, specifically lines 33 and 44.


    So, first, having BACKED UP THE FILE, change line 33 from:
    Code:
    elems = amazonSoup.select('.dv-node-dp-seasons a')
    ​
    to anything that isn't selecting that specific class, I simply add a "-fudged" ending to it, so it looks like:
    Code:
    elems = amazonSoup.select('.dv-node-dp-seasons-fudged a')
    ​

    Similarly, with line 44, from
    Code:
    elems = amazonSoup.select('.dv-node-dp-seasons-default a')
    ​
    to, again, anything that isn't selecting that specific class, like suffixing it with a "-fudged" endling like so:
    Code:
    elems = amazonSoup.select('.dv-node-dp-seasons-default-fudged a')
    ​

    Save the file (as .py not a .txt file, obviously), select the season of TV show and hit the "Analyse" button. Voila!


    The reason why this hack works is because the TV shows that have one season only don't have any anchors under the dv-node-dp-season(-defualt)? class, while those that have multiple seasons have anchors for every other season under that class (well, technically in a list under that class, but that's irrelevant). So what the hack does is it makes StreamFab to select anchors under a class that doesn't exist and when that list of anchors is empty, StreamFab treats the TV show as though it only has one season available.


    Obviously, if you have some python knowledge you can rewrite the function to always return an empty array in the necessary place, but I am shooting for the lowest skilled py hacker here, and quite often I flip between two versions, so each to their own. Wilson.Wang maybe there could be a StreamFab option and two separate scripts and depending on what option is selected the correct script gets invoked in some future version of 'Fab?

    Unfudged behaviour:-

    Click image for larger version

Name:	image.png
Views:	1944
Size:	135.9 KB
ID:	452099



    Fudged behaviour:-
    Click image for larger version

Name:	image.png
Views:	1813
Size:	136.3 KB
ID:	452100

    #2
    Since I am currently analyzing individual amazon episodes in “Movie Mode” myself (needs 2x #) ..
    .. this is nothing new for me, but:

    Who takes care of users who experience “inexplicable phenomena” due to manual changes?

    From experience, I don't think users looking for help will mention such changes​ ..

    Comment


      #3
      Originally posted by Germania View Post
      Since I am currently analyzing individual amazon episodes in “Movie Mode” myself (needs 2x #) ..
      .. this is nothing new for me, but:

      Who takes care of users who experience “inexplicable phenomena” due to manual changes?

      From experience, I don't think users looking for help will mention such changes​ ..
      What inexplicable phenomena do you envisage? The users being stuck with only being able to analyse one TV season instead of all of them? That inexplicable phenomena is specific and very limited cf, say, replacing the scripts from an archaic version of 'Fab to force a "movie mode" ‍

      Comment


        #4
        > What inexplicable phenomena do you envisage?

        We already had errors with episodes not being displayed (without manual change)

        You are new and probably don't know the users here... they report errors without infos:
        Provider xy does not work - please fix​


        > replacing the scripts from and archaic version of 'Fab to force a "movie mode"

        I wrote: needs 2x #
        (in actual script)

        btw: Only 1 line has been changed and 8 added since 6167.​

        Comment


          #5
          Originally posted by Germania View Post
          > What inexplicable phenomena do you envisage?

          We already had errors with episodes not being displayed (without manual change)

          You are new and probably don't know the users here... they report errors without infos:
          Provider xy does not work - please fix​


          > replacing the scripts from and archaic version of 'Fab to force a "movie mode"

          I wrote: needs 2x #
          (in actual script)

          btw: Only 1 line has been changed and 8 added since 6167.​
          The entire purpose of
          Code:
          amazon_get_season_urls.py
          is to write a file that contains a JSONised (wrapped in an associative list) array of urls for each season of the show, or, if the show only has single season write an empty JSONised array. The script in that file has literally zero to do with analysing episodes.

          Next?

          Comment


            #6
            You don't seem to want to understand me.
            I'm not saying you're wrong, but I'm worried about the consequences.

            One typing error is enough and dozens of users wonder
            why SF behaves differently with the person seeking help (e.g. no analysis starts)

            Changing a single character for the date resulted in several postings - here

            There is a good reason why I do not post instructions for editing SF script in the forum.​

            Comment


              #7
              Originally posted by Germania View Post
              You don't seem to want to understand me.
              I'm not saying you're wrong, but I'm worried about the consequences.

              One typing error is enough and dozens of users wonder
              why SF behaves differently with the person seeking help (e.g. no analysis starts)

              Changing a single character for the date resulted in several postings - here

              There is a good reason why I do not post instructions for editing SF script in the forum.​

              Again, you're going out of your way with hypotheticals... First, the failure model you're describing simply doesn't exist in this case:

              if you mess up editing, the first thing you try analysing will be stuck waiting for the JSONised file.

              So, the consequences here are limited to two outcomes: bad script - total failure straight away; and correct edit- only the current season is analysed. THAT IS IT, again, cf, say digging out scripts from an archaic version and dropping them into the current one...

              Even if Amazon changed the class under which they store links for all seasons of the selected show, you will still get the current season selected correctly.


              The fearmongering you're spreading is not just unjustified but is entirely unsubstantiated.


              Besides, I've not met people who have sufficient brain to go around messing with the guts of a program who can't write a proper failure log; so the likelihood of "it ain't working, fix it!"-crowd going fiddling under the bonnet is immeasurable.

              Comment


                #8
                > Again, you're going out of your way with hypotheticals.

                One year of experience with help in the forum and you see it differently.


                > say digging out scripts from an archaic version and dropping them into the current one...

                However, I did not post a HowTo (for everyone) as a new topic ..
                .. and only explained how I did it in a topic when asked.

                It's not about logical consequences for people with brains.
                Just the thought of an 0815 user starting to edit (or test) ..
                .. is the biggest mess for the person who wants to help with problems.​

                Comment


                  #9
                  Originally posted by Germania View Post
                  > Again, you're going out of your way with hypotheticals.

                  One year of experience with help in the forum and you see it differently.
                  Your hypothetical "inexplicable phenomena" failures simply don't exist, I already explained the failure mode for this file is INSTANT, as in the edit either works or doesn't.

                  The rest of your FUD is just that. Take care.

                  Comment


                    #10
                    I guess I'm a little confused. Is there a problem returning the analysis for all seasons vs. one selected season? Other than the former taking a few seconds longer?

                    I do remember a post saying SF couldn't analyze more than 100 episodes in a series.

                    Comment


                      #11
                      Originally posted by MidnightInAurora View Post
                      I guess I'm a little confused. Is there a problem returning the analysis for all seasons vs. one selected season? Other than the former taking a few seconds longer?

                      I do remember a post saying SF couldn't analyze more than 100 episodes in a series.
                      Sometimes you have seasons that have improved video resolution as they went on (eg. going from 480p to 1080p), and yes, you can mitigate that with "1080p if available" or "Best available;" but when it comes to audio, if audio gets upgraded in subsequent seasons from, say DDP Stereo to DDP 5.1, you'll be stuck downloading DDP Stereo (as far as I could figure out). This way you can get pick the correct thing for the correct seasons.

                      Also, as you said, if a show has a whole bunch of seasons, say 20, and you just want to download the latest episode, why waste time?

                      Comment


                        #12
                        Originally posted by 0xFeedBeef View Post

                        Sometimes you have seasons that have improved video resolution as they went on (eg. going from 480p to 1080p), and yes, you can mitigate that with "1080p if available" or "Best available;" but when it comes to audio, if audio gets upgraded in subsequent seasons from, say DDP Stereo to DDP 5.1, you'll be stuck downloading DDP Stereo (as far as I could figure out). This way you can get pick the correct thing for the correct seasons.

                        Also, as you said, if a show has a whole bunch of seasons, say 20, and you just want to download the latest episode, why waste time?
                        Thanks. That makes sense. I tried your mod and it seems to work fine. Returns the selected season along with any extras for that season.

                        I'll keep the mod.

                        I don't see any problem with making mods like that. If a person changes something and SF has an issue, the first thing they'll do is back out the change. And, user-contributed mods get incorporated into base software all the time. Perhaps there should be a SF forum area for user mods - use at your own risk of course.

                        Comment


                          #13
                          Originally posted by MidnightInAurora View Post

                          Thanks. That makes sense. I tried your mod and it seems to work fine. Returns the selected season along with any extras for that season.

                          I'll keep the mod.

                          I don't see any problem with making mods like that. If a person changes something and SF has an issue, the first thing they'll do is back out the change. And, user-contributed mods get incorporated into base software all the time. Perhaps there should be a SF forum area for user mods - use at your own risk of course.

                          Like I said, the hack doesn't do anything fancy other than "lies" to SF that there are no other seasons for this show

                          Comment


                            #14
                            If it works, this is actually great! I will give it a try.
                            Germania, I will ask in your other thread what is on my tongue here...

                            Comment


                              #15
                              Originally posted by 0xFeedBeef View Post
                              In the spirit of Germania jpp72 "unleashing" their hacks for various tricks, I thought I'd share a hack that allows you can make StreamFab analyse only the currently selected season instead the first season and scanning all available seasons, effectively mimicking the behaviour of OnceHasBeenStream.


                              The trick lies in modifying
                              Genius!
                              Yes, this fixed my issue with NCIS (see my other post). Will no doubt fix other issues as well with shows that have different specs for season 1, etc.

                              Comment

                              Working...
                              X