Giter VIP home page Giter VIP logo

cagent's People

Contributors

gordonjb avatar justin avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

cagent's Issues

Generate posters?

Can we generate show/match posters? Poster with text, old style? Include logo?

This should also include matchup images, which are often landscape or other non poster dimensions. We could load these and convert them to a poster format, for instance resized in centre with a blur behind

Could we add Cagematch review text?!

See https://github.com/squaresmile/Plex-Plug-Ins/blob/9a81e813b0a8de1c0b2012db943df481fe8da14c/PlexMovie.bundle/Contents/Code/__init__.py#L824

Seems like it should be doable! This should be optional tho

This works! Add some code to parse through the first x reviews on a result page and add them like this:

metadata.reviews.clear()
                r = metadata.reviews.new()
                r.author = 'Lightwalker19'
                r.source = 'CAGEMATCH inmate'
                r.link = 'https://www.cagematch.net/?id=1&nr=195471&page=99'
                r.text = "One of the worst wrestling shows I've ever seen in my whole life. I've never ever seen so much garbage booking on one night. The only positive thing I can say about this show is: Well, it isn't the worst Wrestlemania of all time, because Wrestlemania 27, 9 and 11 exist. But let's get step by step: Dumb and unfunny beginning with Alexa and Hogan, dull way of crowning Rollins. AJ vs Orton being the only good match of the night but a standard one for their habilities. Time-wasted by watching filer matches like Miz vs Shane, Balor vs Lashley, Corbin vs Angle and Roman vs Drew matches. I don't like Kofi vs Bryan match, Sorry if you liked, but Kofi's crowning felt like the most anti-natural and forced title victory I've ever did remember. Batista vs HHH, a possible cure for someone's insomnia. Disappointing and boring Main event, and in the top of it all: A botched finish, This show was painful to watch. And I have to mention the no-wrestling segments? Dear Lord, the creative side of WWE was on its lowest point that night. Maybe the only good promo of the night wasCena's comeback as Dr. Thuganomics. But for a pointless propose. Uff, I need to rest a little. I never been so angry talking about a Wrestlemania show. Well, like I said, maybe back then at 2011, when Wrestlemania 27 was happening."

Load local posters

This would be handy for matchup images, which are often landscape or other non poster dimensions. We could load these and convert them to a poster format.

Simplify dependencies

We import a bunch of crap right now, could this be made simpler? Is it too heavy?

Match searching is creating incorrect names

I tried matching a match using the 0 id function (cm-id:300948:0), and selected the correct match. This had the following issues:

  • No "Matches" collection was added
  • The title of the matched item was "Thunder Rosa vs. Dr. Britt Baker DMD (w/Rebel) @ The Young Bucks (Matt Jackson & Nick Jackson) vs. Top Flight (Darius Martin & Daunte Martin) vs. Private Party (Isiah Kassidy & Marq Quen) vs. The Acclaimed (Anthony Bowens & Max Caster) vs. Jurassic Express (Jungle Boy & Luchasaurus) vs. The Inner Circle (Chris Jericho & MJF) (w/Wardlow) vs. The Inner Circle (Jake Hager & Sammy Guevara) vs. The Inner Circle (Ortiz & Santana) vs. The Dark Order (Evil Uno & Stu Grayson) vs. The Dark Order (Alex Reynolds & John Silver) @ AEW Dynamite #71 - Beach Break - 20210203 - 20210203", which is extremely wrong. Firstly, this should only be used for the candidate in search results, not the final title, the part after the @ should be the event. I think what is happening is that now a loop is going on, the same var is being appended to multiple times.
  • Other metadata is missing. Perhaps the ID is incorrect?

Support matching events

  • Support searching
  • Support matching

Seems like there are two main methods we need to implement, search and update.

search() seems to be the method to figure out candidates for matching. We need to set a results array of MetadataSearchResult objects (internal Plex class I guess), this is done with this info:

results.Append(
     MetadataSearchResult(
        id = id2,
        name = id2,
        year = 2017,
        score = 99,
        lang = lang
    )
)

We're implementing two types of search, ID matching and DB search. ID matching will occur if the search string contains cm-id:xxxx, where xxxx will be interpreted as the event ID in Cagematch. Score can be set to 100 for ID matches. We'll then need to look up that ID page to get the remaining info.

DB search will use urls to perform a search of the events database. We should be able to populate all the results info from the search page.

update()seems to actually set the metadata. I assume Plex will decide which result is passed in based on the score from the candidates returned from search for automatching, and the user will decide for Fix Match.

metadata.id contains the id being matched for looking up info.

How should score for search results be calculated?

Search page results contained in <div class "Table">
Contains

  • <div class="TableHeaderOff" id="TableHeader"> which has some brief text indicating total number of results displayed and available. May be useful in future.
  • <div class="TableContents"><table class="TBase TableBorderColor"> contains the actual table

the tr table rows have classes, TRowTVShow, TRowPayPerView, TRowCard

Option to remove promotion from title

For instance, if it's going into a collection, you might not want the name in the title, for instance in a ROH collection, you might want items inside the collection to be "Manhattan Mayhem" and "Final Battle 2005" instead of "ROH Manhattan Mayhem" and "ROH Final Battle 2005"

As to how we do this, it might involve looking up the short name from the promotion page. Maybe this info could be cached? Or we just hold a config file or something with a bunch of these pre programmed? We'll never get them all tho...

Allow a full custom string for Description

We have a bunch of keys for info that we're using to fill out a format string to build a description anyway. Why not allow overwriting that string?

Card/Results will still probably be a pain point, as they're separate webpages. I think maybe a $cardOrResults key and then which appears is still controlled by the setting.

Implement caching

The more we add new page requests for features, the more lookups we're doing, and the more repeated lookups of the same info we're doing.

Should cache pages/info, at least for a short time.

Release bundling

  • Installation of dependencies
  • Bundling
  • Releasing/Tagging

Install command?
pip install -r requirements.txt -t Cagent.bundle/Contents/Libraries/Shared

After so much messing with packaging options and trying to download deps manually, it was as easy as

pip install -t Cagent.bundle/Contents/Libraries/Shared/ --no-compile --no-binary=:all requests beautifulsoup4 fuzzywuzzy
pip freeze --path Cagent.bundle/Contents/Libraries/Shared/ > requirements.txt

Additional file path formats

Supporting ID matches is most important, that way people can name their files however they like and still resolve using Fix Match in Plex. However, improving automatic matching would be good. The initial set of formats is very geared to the way my files are sorted, so if we can make it work for others too we should.

I may have overestimated the granularity an agent offers (seems we only get a stripped filename), but may still be doable.

Initial supported file path formats

As it turns out, agents don't deal with this, scrapers do. We're using the movie scraper, and hopefully that'll be sufficient. We do some regex matching of the expected format in the agent, will have to document this.

Support matching by ID included in filename

Currently, ID matching expects the string to start and end with the ID, so it only works for searches. I imagine this is because the Plex scanner will pick out known IDs, where as our format is not known to the scanner.

Can we use the ID in a filename for automatching? Can we figure out a correct format, or parse the filename?

Will need to disable match id 0 functionality for automated searches.

Create a example media folder for testing

Currently to test, I'm just using a mounted network volume with some of my actual files in to test against.

Should be replaced with some replicable way of creating a test structure

Toggles for Description metadata

Allow the user to select which card information should be included in the description: the card, the results, or no info.

The default should be the card.

More id matching options

Currently only match against events using cm-id:xxxxx

Can we also support matching against DVD's and matches in this way?

Perhaps cm-dvd:xxxx and cm-id:xxxx:x (e.g. match 7 on event 1234 is cm-id:1234:7)?

How to deal with dates/broadcast date

Currently dates are used in two places.

metadata.originally_available_at is set to the "Broadcast date" entry if there is one in event info, and the "Date" if not, as this is always present.

The problem here will always be that this approach is right for some events and wrong for others (not to mention that this distinction is entirely subjective).

For instance, a taped AEW show that was taped on 11.03.2021 but aired on 17.03.2021, we would want to use the date it was aired. Fairly cut and dry. Although even then, the date used in Cagematch event searches is always the taping date, which can make it hard to match a taped event.

However as an alternate, a Big Japan show which took place on 20.06.2018 then ended up aired on TV on 30.06.2018 feels like a different case to me. It wasn't so much a taped for TV match as a match that happened to air.

I think broadcast by default is probably the right way to go. but maybe we can check if the search string/filename contains a date, and if it matches either the broadcast or tape date, go with that as that's the user expressing a clear preference.

Quick test everything done so far before first release

  • Test search
  • Test match/update
  • Test results config item
    • Test results
    • Test card
    • Test none
  • Test that wrestlers are added to roles section, and that matching ones are connected
  • Test that promotion collections are created
  • Test that Matches collection is created
  • Test that matches are added to promotions if option enabled
  • Need to test what happens when search using ID that doesn't exist

Support matching individual matches

Format:

Movies
└─── [Promotion] - [yyyy-mm-dd] - M - [Name].ext

Will probably need to do some sort of fuzzy matching on the card. We can use the promotion and date to get a list of candidate events, then we'll need to run down the cards until we find a match

This can't ever be perfect I don't think without using event ids and match numbers, there will undoubtedly be cases where the same people had the same match for the same promotion twice in one day, on the same show and on different shows. But we can make a guess. All we'd be matching in this case anyway is some simple metadata like the event name, promotion + venue so we can stick it in the description, and maybe some cast info. I don't see too much fuss being made if we're not 100% accurate.

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.