Giter VIP home page Giter VIP logo

plex-rewind's Introduction

Plex Rewind

Plex Rewind release status Plex Rewind tests status Plex Rewind latest release

A Plex Rewind application inspired by the likes of Spotify Wrapped and Tautulli.

Present Plex user statistics and habits in a beautiful and organized manner - as a web application application powered by Next.js and Tailwind.css, using data from Tautulli, Overseerr and Plex. You can also disable the Rewind functionality and just use it as an easily sharable Dashboard for your Plex users or vice versa!

Features

  • 📱 Fully responsive - viewable, usable & enjoyable on desktop, tablet or mobile, courtesy of Tailwind.css.
  • 🔄 Fully dynamic - the data your're viewing will always be the latest available.
  • 📆 Rewind - allows your Plex users view their statistics and habits for a given year.
  • 👀 Dashboard - provides an easily glanceable overview of activity on your server for all your libraries.
  • ✨ Beautiful animations with Framer Motion.
  • 🔗 Integrates with Overseerr & Tautulli.
  • 🔐 Log in with Plex - uses NextAuth.js to enable secure login and session management with your Plex account.
  • 🚀 PWA support - installable on mobile devices and desktops thanks to Serwist.
  • ⭐ All of this and more - powered by Next.js.

Keep an eye on the issues page to see what new features have already been requested or to make your own request!

Preview

Dashboard

Rewind

Getting started

  1. Grab the latest release from the releases page or clone the repository:
git clone https://github.com/RaunoT/plex-rewind.git --branch main
  1. Fill out the variables in the .env file.

    Check out the variables reference in the wiki for more information.

  2. Run docker compose up --build -d to build and start the application.

    To update, download the latest release, or if you cloned the repo, run git pull and then repeat the Docker command.

  3. The application should now be running on http://localhost:8383.

  4. (optional) You can expose the app to the internet using a reverse proxy of your choice. Or you can skip all of the above, fork this repository, and deploy it to Vercel. You can set the env variables under "Settings > Environment Variables" for your project.

Donate

If you like this project and wish to support it, you can do so by donating via Patreon or PayPal. Thank you! ❤️

Please note that supporting does not guarantee any support or future developments.

Learn More

To learn more about some of the tools used in this project, take a look at the following resources:

plex-rewind's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

plex-rewind's Issues

Testing bug report template

Description

Testing bug report template

Steps to reproduce

  1. Go here
  2. Do that
  3. See this

Screenshots

image

Logs

main-179-77349b5710ce588cf739-plex-4.116.1.34756-a4ce464.js:1 [Parser] Unable to parse JSON: "undefined" is not valid JSON (no response)
onLogMessage @ main-179-77349b5710ce588cf739-plex-4.116.1.34756-a4ce464.js:1
onLog @ main-179-77349b5710ce588cf739-plex-4.116.1.34756-a4ce464.js:1
m @ main-179-77349b5710ce588cf739-plex-4.116.1.34756-a4ce464.js:1
trigger @ main-179-77349b5710ce588cf739-plex-4.116.1.34756-a4ce464.js:1
(anonymous) @ main-179-77349b5710ce588cf739-plex-4.116.1.34756-a4ce464.js:1
ke @ main-179-77349b5710ce588cf739-plex-4.116.1.34756-a4ce464.js:1
jh @ main-179-77349b5710ce588cf739-plex-4.116.1.34756-a4ce464.js:1
(anonymous) @ 6654-6654-5e6fe91a4045853ab3e9-plex-4.116.1.34756-a4ce464.js:2
u @ 6654-6654-5e6fe91a4045853ab3e9-plex-4.116.1.34756-a4ce464.js:2
add @ 6654-6654-5e6fe91a4045853ab3e9-plex-4.116.1.34756-a4ce464.js:2
(anonymous) @ 6654-6654-5e6fe91a4045853ab3e9-plex-4.116.1.34756-a4ce464.js:2
each @ 6654-6654-5e6fe91a4045853ab3e9-plex-4.116.1.34756-a4ce464.js:2
(anonymous) @ 6654-6654-5e6fe91a4045853ab3e9-plex-4.116.1.34756-a4ce464.js:2
Deferred @ 6654-6654-5e6fe91a4045853ab3e9-plex-4.116.1.34756-a4ce464.js:2
then @ 6654-6654-5e6fe91a4045853ab3e9-plex-4.116.1.34756-a4ce464.js:2
(anonymous) @ main-179-77349b5710ce588cf739-plex-4.116.1.34756-a4ce464.js:1
38373 @ main-179-77349b5710ce588cf739-plex-4.116.1.34756-a4ce464.js:1
r @ auth-form/?utm_source=Plex%20Apps&utm_medium=Plex%20Web&utm_campaign=Plex%20Apps:26
t @ main-179-77349b5710ce588cf739-plex-4.116.1.34756-a4ce464.js:1
(anonymous) @ main-179-77349b5710ce588cf739-plex-4.116.1.34756-a4ce464.js:1
r.O @ auth-form/?utm_source=Plex%20Apps&utm_medium=Plex%20Web&utm_campaign=Plex%20Apps:26
(anonymous) @ main-179-77349b5710ce588cf739-plex-4.116.1.34756-a4ce464.js:1
a @ auth-form/?utm_source=Plex%20Apps&utm_medium=Plex%20Web&utm_campaign=Plex%20Apps:26
(anonymous) @ main-179-77349b5710ce588cf739-plex-4.116.1.34756-a4ce464.js:1

Platform

desktop

Device

PC

Operating System

Windows 11

Browser and version

Chrome 120.0.6099.129

Additional context

No response

Scrolling Rewind "Top 5" too fast skips to prev/next story

Description

The issue only occurs when you scroll fast (flick). It's most likely due to the Story reading it as a click event, which in turn triggers the prev/next Story action. Maybe we can add some sort of a short timeout before the click action is run?

Steps to reproduce

  1. Start rewind on a small (mobile) device.
  2. Skip to a "Here's your full Top 5" Story for movies, music or shows.
  3. Try to scroll up/down quickly.

Screenshots

No response

Logs

No response

Platform

smartphone

Device

iPhone 13 mini

Operating System

iOS 17.2.1

Browser and version

Safari

Additional context

No response

Ability to view Rewind for a previous year

Description

We should be able to optionally set the year for which we want to see the Rewind for.
Currently it's showing it for the ongoing year only.

Desired behavior

The Rewind year could be set in the .env file.

Additional context

No response

Ability to hide number of plays and users in Dashboard

Description

This project is currently the best to show an overall dashboard to users all year. But i want to hide statistics in dashboard such as number of plays and number of users who watched a specific item. I think like everything else using an env variable for this is the best way but It would be great even if there is a pointer to implement by changing inside code in any way first?

Desired behavior

Using an env variable, users can tweak few things off that appear in dashboard

Additional context

No response

Support multiple Tautulli instances

I've got multiple servers and my users use both. Is it possible to refactor this to allow for multiple tautulli servers, and combine the information from them all?

Implement configuration/settings screen

Description

Currently all the configuration for the app has to be done inside .env. It works, but it's not very user friendly.
Additionally, since .env is bundled at build time, it is blocking #32 due to missing variables at build time.

Desired behavior

Upon first booting up the app, the user is greeted with a configuration screen where he can set up his variables. After these are set, the user can later change them under a settings page.

Additional context

We should make sure that settings are persisted after updating.

Refresh button for PWA

Description

Would make sense to have a refresh button available.

Desired behavior

Either a pull-down to mimic browser functionality (a.la Overseerr) or a separate refresh button.

Additional context

No response

TypeError: Cannot read properties of undefined (reading 'id')

Plex Rewind Version

v1.8.6

Description

Returns the following in docker logs:

⨯ Error: 'sharp' is required to be installed in standalone mode for the image optimization to function correctly. Read more at: https://nextjs.org/docs/messages/sharp-missing-in-production
TypeError: Cannot read properties of undefined (reading 'id')
at /app/.next/server/app/rewind/page.js:1:36458
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Promise.all (index 2)
at async o (/app/.next/server/app/rewind/page.js:1:36246)
at async m (/app/.next/server/app/rewind/page.js:1:32508)
at async Promise.all (index 0)
at async g (/app/.next/server/app/rewind/page.js:1:33471)

Steps to reproduce

current .env

NODE_ENV=production
2
3 NEXT_PUBLIC_TAUTULLI_URL=http://192.168.1.99:8181
4 TAUTULLI_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
5 NEXT_PUBLIC_OVERSEERR_URL=0.0.0.0:5055
6 OVERSEERR_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxZi1hMmY3LTM5NTJmMzUzZDYwYyk
7 TMDB_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
8 PLEX_HOSTNAME=192.168.1.99
9 PLEX_PORT=32400
10
11 NEXT_PUBLIC_SITE_URL=http://192.168.1.99:8383
12 NEXTAUTH_URL=http://192.168.1.99:8383
13 NEXTAUTH_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
14
15 NEXT_PUBLIC_GOOGLE_ANALYTICS_ID=
16 NEXT_PUBLIC_IS_REWIND_DISABLED=false
17 NEXT_PUBLIC_IS_DASHBOARD_DISABLED=false
18 NEXT_PUBLIC_IS_DASHBOARD_USERS_DISABLED=false
19 NEXT_PUBLIC_EXCLUDED_DASHBOARD_STATS=
20 NEXT_PUBLIC_EXCLUDED_LIBRARIES=
21 NEXT_PUBLIC_STATISTICS_START_DATE=2018-01-01

Screenshots

image

Logs

⨯ Error: 'sharp' is required to be installed in standalone mode for the image optimization to function correctly. Read more at: https://nextjs.org/docs/messages/sharp-missing-in-production
TypeError: Cannot read properties of undefined (reading 'id')
    at /app/.next/server/app/rewind/page.js:1:36458
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Promise.all (index 2)
    at async o (/app/.next/server/app/rewind/page.js:1:36246)
    at async m (/app/.next/server/app/rewind/page.js:1:32508)
    at async Promise.all (index 0)
    at async g (/app/.next/server/app/rewind/page.js:1:33471)

On the last run this appended to the error:

[Error: An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.] {
digest: '3846803662'

Platform

desktop

Device

Desktop

Operating System

Ubuntu 22.04

Browser and version

Firefox 121.0 Chrome 120.0.6099.200

Additional context

No response

Don't show libraries size in Dashboard when 0

Description

Currently, we're showing library size even when it's 0, there's no point in doing that.

Steps to reproduce

  1. Navigate to Dashboard
  2. Observe library with "0 Bytes" as size

Screenshots

image

Logs

No response

Platform

desktop

Device

N/A

Operating System

N/A

Browser and version

N/A

Additional context

No response

Stuck on spinning wheel

Follow up from -> https://www.reddit.com/r/PleX/comments/18pd48j/plex_rewind_a_new_webbased_app_for_displaying/?share_id=TFGuooSL1u5l25IWC9VMD&utm_content=1&utm_medium=ios_app&utm_name=ioscss&utm_source=share&utm_term=1

I got the error below initially

 => ERROR [plex-rewind deps 4/4] RUN   if [ -f yarn.lock ]; then yarn --frozen-lockfile;   elif [ -f package-lock.json ]; then npm ci;   elif [ -f pn  1.6s
------                                                                                                                                                      
 > [plex-rewind deps 4/4] RUN   if [ -f yarn.lock ]; then yarn --frozen-lockfile;   elif [ -f package-lock.json ]; then npm ci;   elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i --frozen-lockfile;   else echo "Lockfile not found." && exit 1;   fi:                                                 
0.537 yarn global v1.22.19                                                                                                                                  
0.561 [1/4] Resolving packages...                                                                                                                           
0.828 [2/4] Fetching packages...                                                                                                                            
1.106 [3/4] Linking dependencies...
1.235 [4/4] Building fresh packages...
1.238 success Installed "[email protected]" with binaries:
1.238       - pnpm
1.238       - pnpx
1.238 Done in 0.70s.
1.598  ERR_PNPM_FROZEN_LOCKFILE_WITH_OUTDATED_LOCKFILE  Cannot perform a frozen installation because the version of the lockfile is incompatible with this version of pnpm
1.598 
1.598 Try either:
1.598 1. Aligning the version of pnpm that generated the lockfile with the version that installs from it, or
1.598 2. Migrating the lockfile so that it is compatible with the newer version of pnpm, or
1.598 3. Using "pnpm install --no-frozen-lockfile".
1.598 Note that in CI environments, this setting is enabled by default.
------
failed to solve: process "/bin/sh -c if [ -f yarn.lock ]; then yarn --frozen-lockfile;   elif [ -f package-lock.json ]; then npm ci;   elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i --frozen-lockfile;   else echo \"Lockfile not found.\" && exit 1;   fi" did not complete successfully: exit code: 1

I ran

pnpm install --no-frozen-lockfile

then

docker compose build

and

docker compose up

The application spins but has no error on the terminal or browser console

Running on Ubuntu 22.04, please let me know how I can help debug!

Get libraries dynamically

The app is currently expecting your Plex libraries to have section_id of 3 for movies, 2 for shows and 1 for music.

Testing feature request template

Description

Testing feature request template

Desired behavior

Testing feature request template

Additional context

Additonal context

Publish Docker image

We should consider publishing an already built Docker image instead of having the user build it.

Implement login

Need to implement some type of login to allow users on the same server to access the app.

Improve loading states

Improve loading states, so that we only show loaders for data that's actually fetching.

Add image loading state

Description

Sometimes it takes a while to load the images from Tautulli, we should add a separate loading state so the user won't just see a blank space.

Desired behavior

We can use the same skeleton loader from the main loading state.

Additional context

Current behaviour on slow connection:

image

Forked to Vercel Error

I forked the project and got it up and running to the login with plex page but plex returns "We were unable to complete this request.
You will be redirected automatically." and the goes to plex.tv.

Images not loading

CleanShot 2023-12-24 at 01 43 20@2x

After logging in, all of the images are failing with the response "url" parameter is not allowed

REQUEST: Configuration guide

Could you put together a brief configuration guide and, ideally, a sample docker-compose.yml?

Any chance you'll be publishing and maintaining a docker image for this?

Add SSO cookie authentication support

Description

Often times these types of applications will be deployed as a complement to a full stack of applications that use Plex to authenticate users.
It would be very useful to be able to have SSO for these scenarios to provide a better user experience.
SSO providers include Organize, Authentik, etc.

Desired behavior

A user signs in through an authentication done upstream where a cookie with the Plex token is set, e.g. X-Plex-Token
plex-rewind then looks for this cookie and authenticates the user session thereby skipping the login page.

Additional context

I would be happy to test out assist with developing this feature. I am not very familiar with nextjs so if you can point me in the right direction I'll be happy to take a stab at it!

Add ability to see managed user's Rewinds

I have a login for my admin account on Plex that no one uses but I use a managed user and because I use the login of the admin account to access my managed user I cannot see the rewind for the managed user.

Covers only showing placeholders

Description

When i launch plex-rewind all i see is placeholder images instead of real covers. No idea what i am missing.

Also file size for plex is only shown for Movies and 0 Bytes for everything else, but i guess thats unrelated :)

Steps to reproduce

  1. clone repo
  2. set .env variables
  3. build compose
  4. run docker
  5. open web interface

Screenshots

image

Logs

No response

Platform

desktop

Device

Desktop

Operating System

Docker throug ubuntu WLS2 on windows 11

Browser and version

Chrome 120.0.6099.130

Additional context

No response

Add "{count} watched" to Rewind for movies, shows and music

Description

Would be cool if the users could see how many movies, shows or music items they've watched during the year.

Desired behavior

We could show it after the total duration stat in Rewind for movies, shows and music. Something like "You've watched 82 movies this year".

Additional context

No response

Support getting stats from multiple libraries of same type

Currently when getting libraries total values, for example in movies Rewind, we get the stats for the section_id of the first library from all libraries array that matches type movie. Same is true for the rest of the Rewind total stats and Dashboard user statistics.

Tautulli 500 error

Plex Rewind Version

v1.8.7

Description

Upon authenticating and then clicking on Rewind "Uh oh.. something went wrong!" error appears.

Steps to reproduce

Spinup a docker compose

Screenshots

image

Logs

▲ Next.js 14.0.4

   - Local:        http://localhost:8383

   - Network:      http://0.0.0.0:8383

 ✓ Ready in 59ms

Error fetching from Tautulli API. The query was 'get_library_media_info'.

 Error: Tautulli API request failed: 500 Internal Server Error

    at s (/app/.next/server/app/api/auth/[...nextauth]/route.js:1:6117)

    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

    at async c (/app/.next/server/app/dashboard/(route)/[slug]/page.js:1:6348)

    at async Promise.all (index 2)

    at async f (/app/.next/server/app/dashboard/(route)/[slug]/page.js:1:6955)

Error: Tautulli API request failed: 500 Internal Server Error

    at s (/app/.next/server/app/api/auth/[...nextauth]/route.js:1:6117)

    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

    at async c (/app/.next/server/app/dashboard/(route)/[slug]/page.js:1:6348)

    at async Promise.all (index 2)

    at async f (/app/.next/server/app/dashboard/(route)/[slug]/page.js:1:6955)

Error fetching from Tautulli API. The query was 'get_library_media_info'.

 Error: Tautulli API request failed: 500 Internal Server Error

    at s (/app/.next/server/app/api/auth/[...nextauth]/route.js:1:6117)

    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

    at async Promise.all (index 5)

    at async d (/app/.next/server/app/rewind/page.js:1:31575)

    at async Promise.all (index 3)

    at async g (/app/.next/server/app/rewind/page.js:1:33498)

Error: Tautulli API request failed: 500 Internal Server Error

    at s (/app/.next/server/app/api/auth/[...nextauth]/route.js:1:6117)

    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

    at async Promise.all (index 5)

    at async d (/app/.next/server/app/rewind/page.js:1:31575)

    at async Promise.all (index 3)

    at async g (/app/.next/server/app/rewind/page.js:1:33498)

Error fetching from Tautulli API. The query was 'get_library_media_info'.

 Error: Tautulli API request failed: 500 Internal Server Error

    at s (/app/.next/server/app/api/auth/[...nextauth]/route.js:1:6117)

    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

    at async Promise.all (index 0)

Error fetching from Tautulli API. The query was 'get_library_media_info'.

 Error: Tautulli API request failed: 500 Internal Server Error

    at s (/app/.next/server/app/api/auth/[...nextauth]/route.js:1:6117)

    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

    at async Promise.all (index 2)

Error fetching from Tautulli API. The query was 'get_library_media_info'.

 Error: Tautulli API request failed: 500 Internal Server Error

    at s (/app/.next/server/app/api/auth/[...nextauth]/route.js:1:6117)

    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

    at async Promise.all (index 4)

Platform

desktop

Device

Desktop

Operating System

Windows 10

Browser and version

Firefox 121.0.1 (64-bit)

Additional context

image

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.