pymedusa / Medusa

Automatic Video Library Manager for TV Shows. It watches for new episodes of your favorite shows, and when they are posted it does its magic.
https://pymedusa.com
GNU General Public License v3.0
1.8k stars 276 forks source link

Should the NameParser by default parse into season 1 for absolute episodes numbers? #2013

Closed p0psicles closed 7 years ago

p0psicles commented 7 years ago

Before submitting your issue:

Enable debug logging in Medusa settings, reproduce the error (be sure to disable after the bug is fixed)

Branch/Commit: Develop

Hi @ratoaq2, should guessit parse into season 1 by default, when parsing below result?

D:\Development\SrAngular\tests>python report_guessit.py "JoJo's.Bizarre.Adventure.(2012).EP.19.A.Race.Toward.the.Brink.(BD.AVC.1080p.FLAC.AC3).[Dual.Audio].[B02F59BB]" "JoJo's Biza
rre Adventure"
# guessit: 2.1.2.dev0  rebulk: 0.8.3.dev0
# show list: ["JoJo's Bizarre Adventure"]
? JoJo's.Bizarre.Adventure.(2012).EP.19.A.Race.Toward.the.Brink.(BD.AVC.1080p.FLAC.AC3).[Dual.Audio].[B02F59BB]
  title: JoJo's Bizarre Adventure
  alias: JoJo's Bizarre Adventure 2012
  year: 2012
  episode: 19
  episode_title: A Race Toward the Brink
  format: BDRip
  video_codec: h264
  screen_size: 1080p
  audio_codec: ['FLAC', 'AC3']
  other: DualAudio
  crc32: B02F59BB
  type: episode
  parsing_time: 0.0640001296997

The reason why i'm asking this is because, currently is doesn't. And that is an issue for anime shows, which depend on it.

The shows are parsed without season number (None). Then adding it to cache, works fine, as we default back to season 1. https://github.com/pymedusa/Medusa/blob/develop/medusa/tv_cache.py#L376

But this only applies to adding the results to cache. Searching them through a backlog, daily or forced search, doesn't work.

So my question is, should we implement the rule by default for anime shows in guessit the nameparser, or add it to the GenericProvider find_search_result? As now there is a discrepancy.

ratoaq2 commented 7 years ago

Guessit shouldn't add information that's not in the release name; and season 1 is not in the release name.

On the other hand, our name parser uses guessit and post process the result enhancing with indexer information and sometimes db info as well. So, in short, our name parser needs to be enhanced to default it to season 1, not guessit.

Btw, the name parser logic is still messy

medariox commented 7 years ago

That is actually already being done (under certain circumstances) here: https://github.com/pymedusa/Medusa/blob/develop/medusa/post_processor.py#L611-L624

I wonder why it didn't work for you @p0psicles. Does the show have more than one season?

ratoaq2 commented 7 years ago

I have the feeling that this kind of logic is spread all over the place. Shouldn't this be in the name parser only?

p0psicles commented 7 years ago

Yes the show has more then 1 season. But if the season is not added, it should assume it's season 1. @ratoaq2, I know it's not guessit related, but more has somthing todo with our NameParser. I have to be specific to avoid confusion. Your right.

p0psicles commented 7 years ago

@ratoaq2, yes that's the point of this issue. It should be in one location. And as the NameParser is used almost everywhere (sometimes used too much), I would think this would be proper location.

medariox commented 7 years ago

Besides the fact that the logic is messy and all over the place, we should think about the negative consequences that @p0psicles' suggestion could cause. Should that rule be applied to all anime shows? What if guessit doesn't parse the season correctly and the episode ends up in season 1 by mistake? Are there any "rules" we can follow? Anyway, I agree, this is not something guessit should handle.

p0psicles commented 7 years ago

Yes I agree @medariox. That's also the reason why i'm discussing it, and not have changed it yet.

fernandog commented 7 years ago

@p0psicles we can close this right?