iamkroot / trakt-scrobbler

Scrobbler for trakt.tv that supports VLC, Plex, MPC-HC, and MPV.
https://github.com/iamkroot/trakt-scrobbler/wiki
GNU General Public License v2.0
459 stars 30 forks source link

Error: Media Info is Incorrect #281

Closed brijazz closed 4 months ago

brijazz commented 8 months ago

Discussed in https://github.com/iamkroot/trakt-scrobbler/discussions/278

Originally posted by **brijazz** March 2, 2024 I have one series that refuses to scrobble! It shows up in the log as such: ``` 2024-02-28 15:54:48,949 - DEBUG - plex - monitor - action=scrobble 2024-02-28 15:54:48,976 - DEBUG - plex - monitor - {'state': 2, 'progress': 0.0, 'media_info': {'type': 'episode', 'title': 'After Midnight', 'season': 1, 'episode': 20, 'year': 2021}, 'updated_at': 1709153688.9494998} 2024-02-28 15:54:48,977 - DEBUG - scrobbler - scrobbler - Scrobbling start at 0.00% for After Midnight 2024-02-28 15:54:49,153 - WARNING - scrobbler - utils - Request failed 2024-02-28 15:54:49,158 - DEBUG - scrobbler - utils - Request: post {'url': 'https://api.trakt.tv/scrobble/start', 'headers': {'Content-Type': 'application/json', 'trakt-api-key': '[redacted]', 'trakt-api-version': '2', 'Authorization': 'Bearer [redacted]'}, 'json': {'show': {'ids': {'trakt': 220005}}, 'episode': {'season': 1, 'number': 20}, 'progress': 0.0}, 'timeout': 30} 2024-02-28 15:54:49,158 - DEBUG - scrobbler - utils - Response: 2024-02-28 15:54:49,159 - WARNING - scrobbler - trakt_interface - Not found on trakt. The media info is incorrect. 2024-02-28 15:54:49,159 - WARNING - scrobbler - scrobbler - Scrobble unsuccessful. Discarding it. ``` Any advice on getting this show to scrobble? Episodes are named via Filebot (with Plex binding).
iamkroot commented 7 months ago

I would suggest using media remap to manually specify the correct information for that file path(s).

See wiki https://github.com/iamkroot/trakt-scrobbler/wiki/Metadata-Remap

If that doesn't work, there have been other comments over the years with similar situations. Try searching though the github issues.

iamkroot commented 7 months ago

Looking closer, trakt search has matched the incorrect show (this one https://trakt.tv/shows/after-midnight) instead of https://trakt.tv/shows/after-midnight-2024

I would first delete the entry from trakt_cache.json (would be present next to log files) and then use trakts search to find the correct ID manually. You can edit the json file now to set the correct ID. OR you can specify the ID in Metadata Remap TOML file. #214

brijazz commented 7 months ago

Thanks for checking in. Here are the steps I've now taken: 1) deleted "After Midnight2021": 220005 from trakt_cache.json 2) used trakts search to find the correct ID 3) added "After Midnight2024": 219964 to trakt_cache.json

I then restarted the scrobbler - but that didn't seem to fix the issue. So, I reverted the changes in trakt_cache.json and tried to go the TOML route:

1) I created a file called remap_rules.toml at ~/.config/trakt-scrobbler (where config.yaml lives) 2) Inside the TOML file I added this:

[[rules]]
# specify which media you want to override
match.title = "After Midnight"

# now, specify the override
type = "episode"
id.trakt_slug = "after-midnight-2024" # (got the slug from url)

This didn't seem to resolve anything either. The latest log entry reads:

2024-03-20 10:58:24,832 - DEBUG - scrobbler - scrobbler - Scrobbling stop at 25.11% for After Midnight
2024-03-20 10:58:24,896 - WARNING - scrobbler - utils - Request failed
2024-03-20 10:58:24,896 - DEBUG - scrobbler - utils - Request: post {'url': 'https://api.trakt.tv/scrobble/stop', 'headers': {'Content-Type': 'application/json', 'trakt-api-key': 'ab0133a2365b2c64d70fd2adf3c7e775a4131471b56340933335af1b94785a3a', 'trakt-api-version': '2', 'Authorization': 'Bearer 56db4a2e4a922f83a7be95614de095e3b80032d8ddafd69486d0352bc9dfeed1'}, 'json': {'show': {'ids': {'trakt': 220005}}, 'episode': {'season': 1, 'number': 31}, 'progress': 25.11}, 'timeout': 30}
2024-03-20 10:58:24,896 - DEBUG - scrobbler - utils - Response: <Response [404]> 
2024-03-20 10:58:24,897 - WARNING - scrobbler - trakt_interface - Not found on trakt. The media info is incorrect.
2024-03-20 10:58:24,897 - WARNING - scrobbler - scrobbler - Scrobble unsuccessful. Discarding it.

Any other suggestions?

iamkroot commented 7 months ago

Note that you need to restart the scrobbler after the TOML change too. I'm guessing you've done that.

  1. For the json change, was the entry under shows? If so, I'm surprised that it contains the year (2021/2024) in the key field.
  2. For the TOML, did you get any log entries saying it matched a remap rule? If not, the match.title is not being applied for some reason. I'd try replacing that with match.path, which is a regex for the file path.
brijazz commented 7 months ago

Yes, I restarted the scrobbler after the TOML change.

1) Yes, the entry is under shows. I have a number of shows listed there, all of which have the year in the field:

"show": {
        "Moon Knight2022": 151840,
        "Mr. Mayor2021": 162199,
        "Dicktown2020": 163913,
        "The Chase2021": 171467,
        "Roar2022": 175015,
}

2) No references to match.title in the log. Changing match.title to match.path has no effect.

brijazz commented 7 months ago

Update: I edited the .json, but this time left the title as 'AfterMidnight2021' (instead of using 2024) and changed the ID to 219964 (as per the lookup results). That seems to be working now - no TOML needed.

iamkroot commented 4 months ago

Closing, looks like it is fixed.

brijazz commented 4 months ago

FYI, I just had the same issue with a show called "The 1% Club (US)" and was able to fix it using the same method as in my last post.