ZeroQI / YouTube-Agent.bundle

Plex Metadata Agent for Movies and TV Series libraries
463 stars 44 forks source link

metadata not populated for specific video #39

Closed zenemano closed 4 years ago

zenemano commented 4 years ago

I have 2 videos in a plex library on windows 10 from the same channel.

HFZFxITALoc is fine and has metadata populated. see detailed xml info

zenemano commented 4 years ago

21.xml.txt 20.xml.txt

ZeroQI commented 4 years ago

It looks like the guid is assigned correctly for https://www.youtube.com/watch?v=KJB_RyESQqs, it's the metadata the issue Please attach agent logs after updating metadata for that series (location in the read-me file, troubleshooting section)

zenemano commented 4 years ago

com.plexapp.system.log com.plexapp.agents.youtube.log

zenemano commented 4 years ago

thanks for the quick response ....

ZeroQI commented 4 years ago

I simply looked at the agent logs and searched "KJB_RyESQqs" and found:

2020-07-02 23:03:36,289 (210c) :  ERROR (networking:196) - Error opening URL 'https://www.googleapis.com/youtube/v3/videos?part=snippet,contentDetails,statistics&id=KJB_RyESQqs&key=AIzaSyC2q8yjciNdlYRNdvwbb7NEcDxBkv1Cass'
2020-07-02 23:03:36,289 (210c) :  INFO (logkit:16) - video_details - Could not retrieve data from YouTube for: KJB_RyESQqs

After putting this URL 'https://www.googleapis.com/youtube/v3/videos?part=snippet,contentDetails,statistics&id=KJB_RyESQqs&key=AIzaSyC2q8yjciNdlYRNdvwbb7NEcDxBkv1Cass' in a web browser, you get:

{
  "error": {
    "code": 403,
    "message": "The request cannot be completed because you have exceeded your \u003ca href=\"/youtube/v3/getting-started#quota\"\u003equota\u003c/a\u003e.",
    "errors": [
      {
        "message": "The request cannot be completed because you have exceeded your \u003ca href=\"/youtube/v3/getting-started#quota\"\u003equota\u003c/a\u003e.",
        "domain": "youtube.quota",
        "reason": "quotaExceeded"
      }
    ]
  }
}

Read-me states:

Note:
[!] register your own API key and also replace API_KEY='AIzaSyC2q8yjciNdlYRNdvwbb7NEcDxBkv1Cass' in ass code and the agent settings

Basically too many people use the agent without registering their own API key and deplete my API key request quota... 24,182,115 requests in the last 30 days !!! 24 millions requests yet 7 donations...

Working as designed, you need to create your own API key and replace it in the scanner and put it in agent settings Closing that ticket

zenemano commented 4 years ago

ok. sorry about this. I have figured out now what was needed. the plugin works fine with my api key but used up 10k quota very quickly. i do not use the ass scanner at all . I will send you 5eur just for the hassle. never used plex before and was not sure if kodi would be better. then found on google search your plugin. learned a lot in the last 2 days. you should highlight the need for a key as it is not so obvious. i do not get it why do you share your key and feel annoyed if people use it up. anyway thanks for the plugin but will need to look for an offline agent instead of the api and its quota. could you fetch the same from a json file if downloaded with youtube-dl?

ZeroQI commented 4 years ago

The thing is that it use to work without getting locked up but the number of users seem to have grown or their libraries. I will modify the readme now to avoid this in the future as it will happen more and more ...

Haven't tested youtube-dl options much, but if it can create a Jason file alongside the video then yes I could load locally the metadata but will need a code change. If it does so, please attach a file created and will code when I have time

zenemano commented 4 years ago

[KJB_RyESQqs].info.json.txt

see attached for the same video . it was generated by this: youtube-dl.exe KJB_RyESQqs --write-info-json --skip-download -o "[%(id)s].%(ext)s"

thanks

ZeroQI commented 4 years ago

https://github.com/ZeroQI/YouTube-Agent.bundle/issues/40 Placeholder for when i (or someone else) has time...