[Question] GetMediaInfo equivalent in MAS? (1 Viewer)

Lightning303

MP Donator
  • Premium Supporter
  • September 12, 2009
    798
    577
    Home Country
    Germany Germany
    Hey,
    im trying to get the basic video properties for my movies. For example the resolution, or the audiocodec. I found GetMediaInfo in WSS, and that works, but it seems to get the information from the file itself and not from the movingpicture database. These information however are allready present in the movpic db. Is there another way at the moment?

    Thanks.

    Edit:
    Another thing, is there no way to get the watched flag of a movie? There seems to be one for TVEpisodes, but not for Movies?
     
    Last edited:

    Oxan

    Retired Team Member
  • Premium Supporter
  • August 29, 2009
    1,730
    1,124
    Home Country
    Netherlands Netherlands
    It's currently not possible to get the mediainfo from the database, MPExtended always extracts it by itself. The performance hit isn't as massive as it seems, we load the data only once for each media item and cache it after that. Loading it from the database is planned for 0.6 though, but I can't give you any ETA on that.

    The watched flag for movies has been added to 0.5.4 ;)
     

    Lightning303

    MP Donator
  • Premium Supporter
  • September 12, 2009
    798
    577
    Home Country
    Germany Germany
    Thanks for your answer.

    we load the data only once for each media item and cache it after that
    Oh, thats great, i saw that when i requested the mediainfos for my whole movie collection that my harddrives went crazy and it took forever, but never tried again. So that would not be the case in a second attempt? Are these information cached permanently, or are they gone after, lets say a reboot?


    The watched flag for movies has been added to 0.5.4
    Thats nice to hear ;). Thanks. *waiting* :)
     

    Oxan

    Retired Team Member
  • Premium Supporter
  • August 29, 2009
    1,730
    1,124
    Home Country
    Netherlands Netherlands
    Oh, thats great, i saw that when i requested the mediainfos for my whole movie collection that my harddrives went crazy and it took forever, but never tried again. So that would not be the case in a second attempt? Are these information cached permanently, or are they gone after, lets say a reboot?
    It should be permanently cached, but the cache might be cleaned on a major MPExtended upgrade (0.5 -> 0.6 for example).

    Thats nice to hear ;). Thanks. *waiting* :)
    Should be released in 3,5 weeks ;)
     
    Last edited:

    Lightning303

    MP Donator
  • Premium Supporter
  • September 12, 2009
    798
    577
    Home Country
    Germany Germany
    It should be permanently cached, but the cache might be cleaned on a major MPExtended upgrade (0.5 -> 0.6 for example).

    Yeah that wouldnt be a problem. Sadly getting a movie list with GetMoviesBasic and then getting video properties with GetMediaInfo for every movie isnt performant at all. Even when the information is cached. Every GetMediaInfo takes roughly 0,04 seconds, which meens getting a large movie list takes forever :(. Have to wait on this one then. When you come around adding this to MAS, hopefully you add it in GetMoviesDetailed, so the extra json request isnt needed anymore :).

    Thanks again.
     

    Oxan

    Retired Team Member
  • Premium Supporter
  • August 29, 2009
    1,730
    1,124
    Home Country
    Netherlands Netherlands
    Yes, I understand. It's a usecase we've been thinking about as well and that other client developers have requested as well. There have been some ideas for implementing an SQL JOIN-like syntax to retrieve multiple objects with one call, like "select m, GetMediaInfo(m) for m in GetMoviesBasic". Nothing concrete yet though.

    (I probably won't add it to the WebMovieDetailed class, as it's not related to the movie itself: you can have multiple versions of the same movie with vastly different video properties. The data is also not available in all backends).
     

    Lightning303

    MP Donator
  • Premium Supporter
  • September 12, 2009
    798
    577
    Home Country
    Germany Germany
    Yeah, a join would be great. In the project im working on, i used to just access the db directly and could benifit from all the sql stuff available. However as i want to make my project available to others aswell, i first want to change that to just using MPExtended. Its more userfriendly and cleaner. Going to continue changing to the code to use MPExtended and then wait for a solution :). Thanks
     

    Users who are viewing this thread

    Top Bottom