FatherSaint 27 Posted 20 hours ago Posted 20 hours ago I am having issues with the Reports plugin as I try to find my old movies that are 720p or even worse to upgrade. It has often wrongly identified the resolutions, usually showing 1080p as 720p... So, anyway, I've been using Co-Pilot to create reporting based using the API key that I created specifically for this. I should mention that I first tried the API key that was already with the same error. My Lifetime license appears to be fully installed and everything is happy in that regard. ERROR OCCURRED: Access token is invalid or expired. The C:\Reports path has full permissions and I'm executing the .PS1 file from within Powershell, which is running as Administrator. After a lot of back and forth, Co-Pilot thinks that the issue is related to network binding of some sort, causing the key to be rejected. Any thoughts would be much appreciated. I've attached the script here as a .TXT file, in case that helps. EmbyReportingPowershell.txt
Luke 42951 Posted 20 hours ago Posted 20 hours ago Hi, have you taken a look at this? Emby SDK Documentation: API-Key Authentication 1
FatherSaint 27 Posted 20 hours ago Author Posted 20 hours ago Honestly, I thought it was more likely something in the script, even though Co-Pilot didn't agree. LOL I'll read that now, thank you!
FatherSaint 27 Posted 19 hours ago Author Posted 19 hours ago (edited) PLAN B: Tiny Media Manager can apparently export the list that I need. I have it installed and running right now. Unfortunately, I had done what the page shows. It doesn't make sense to me, especially since I am the ONLY configured user and so presumably the Admin by default. Co-Pilot decided at some point that instead of using localhost the script should use the IP address instead. Maybe I'll just have to manually do this, which would be a stinker, but the Reports plugin might give me some good info. Edited 19 hours ago by FatherSaint Update
Lessaj 546 Posted 18 hours ago Posted 18 hours ago Have you tried api_key instead of ApiKey in the URL? 1
FatherSaint 27 Posted 18 hours ago Author Posted 18 hours ago This is ALL Co-Pilot, I don't know what I'm doing when it comes to scripts and programming. That's a good catch, I didn't see it but do now that you ask about it. I just tried that way and still got the error. Unless Tiny Media Manager doesn't give me a proper report, I'm not going to pursue this. Thank you for posting!
Lessaj 546 Posted 17 hours ago Posted 17 hours ago (edited) I ran the query against my instance with api_key and it accepted it. I ran the exact script with my own variable too and it worked, I just changed the api_key name I mentioned. You should be able to manually run a curl with the path looking like this: EDIT: Could be HTTP instead as well, I used "https://path.to.my.emby" for the variable, but "http://ip.address:port" should work too. Quote curl "https://<INSTANCE ADDRESS>/Items?IncludeItemTypes=Movie&Recursive=true&Fields=MediaStreams&api_key=<APIKEYGOESHERE>" Edited 17 hours ago by Lessaj
js28194 69 Posted 16 hours ago Posted 16 hours ago There is a reports plugin that compiles this data for all your movies already. I have found that you can change the default from 100 to all then export to excel and do some excel ju-jitsu. By that I mean using the data filter tool in excel. All that takes 5 minutes vs. trying to develop a script that takes hours or days. Fun if your just trying to learn, but re-inventing the wheel seems a bit much. Just sayin.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now