Giter VIP home page Giter VIP logo

Comments (8)

bearlikelion avatar bearlikelion commented on May 27, 2024

I cannot specify a library for the Tautulli API lookup, but when fetching TV items there is _show.librarySectionID which can be compared to only add items for the specified libraries in the config.ini. This would require another API call looking up library names -> id (I already do this in clear_collections()) and eliminate any Anime TV Shows from appearing in the 'Popular TV Shows' collection. It would result in less items in the collection overall (ex. 10 items on Tautulli 4 of which are anime = 6 tv shows total).

Additionally we could also add support for an optional Anime category to create dynamic collections based on a 3rd category name/id.

from popularplex.

meisnate12 avatar meisnate12 commented on May 27, 2024

thats why i suggested in option 2 asking for more movies/shows then you actually need and just adding up to the right amount. So if the count is 10 then say we have a buffer option that is also 10 well then the program could grab 20 movies but only add 10 to the list

from popularplex.

bearlikelion avatar bearlikelion commented on May 27, 2024

While I like this idea, there's no Tautulli API to lookup media play counts, I haven't looked into their SQL DB to see if they store plays.

How many results do you get returned for popular TV?

Example:
http://plexpy/api/v2?apikey=APIKEY&cmd=get_home_stats&time_range=7

from popularplex.

meisnate12 avatar meisnate12 commented on May 27, 2024

just do this to specify how many you want to be returned
http://plexpy/api/v2?apikey=APIKEY&cmd=get_home_stats&time_range=7&count=NUMBER_TO_RETURN
so if the user wants a 10 movie list but has multiple libraries they can set a "buffer" of lets say 10 and then you add them together and throw 20 in as NUMBER_TO_RETURN and then check each one while adding to the library to make sure its in the right section and only add up to their original desired amount in this case 10

from popularplex.

bearlikelion avatar bearlikelion commented on May 27, 2024

I have made a change to the master branch which should solve some of these issues.

You can configure the stat_count for the API request in the config file to a number (say 20). It will now only add media if the library matches the library IDs configured in the config.ini, so it should exclude your anime from the TV Shows collection.

Test the functionality and let me know what you think, we could also add a 'Limit' config option to stop adding to collections if there's 10 items already since currently it will add all 20 items from Movies to the Movies collection.

from popularplex.

bearlikelion avatar bearlikelion commented on May 27, 2024

I have added the functionality to limit the number of items in a collection
Config.ini example

from popularplex.

bearlikelion avatar bearlikelion commented on May 27, 2024

I am assuming this issue has been resolved with the latest changes, if it still occurs please open a new issue.

from popularplex.

meisnate12 avatar meisnate12 commented on May 27, 2024

Yea that's fine seems like the best option for now unless the api changes to allow for specific section tops

from popularplex.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.