auroraemby 0 Posted September 18, 2023 Share Posted September 18, 2023 THANK YOU! are we allowed to slip you donations or something to keep this going? Link to comment Share on other sites More sharing options...
Starap 1 Posted September 20, 2023 Share Posted September 20, 2023 On 9/19/2023 at 8:10 AM, auroraemby said: THANK YOU! are we allowed to slip you donations or something to keep this going? I second this! This has saved me an ungodly amount of hours, a donation to the project is the least I can do. Link to comment Share on other sites More sharing options...
ronl3 2 Posted September 25, 2023 Share Posted September 25, 2023 With the recent crackdown on paid plex shares you will see a wave of migration of users from plex to emby, and alot of fresh interest in this tool... Link to comment Share on other sites More sharing options...
Cr8iveLosr 54 Posted October 2, 2023 Share Posted October 2, 2023 Curious. is it possible to use this script for plex skip intro and chapter thumbs to emby as well? Thank you Link to comment Share on other sites More sharing options...
CloudWing93 26 Posted October 4, 2023 Author Share Posted October 4, 2023 On 10/2/2023 at 11:42 AM, Cr8iveLosr said: Curious. is it possible to use this script for plex skip intro and chapter thumbs to emby as well? Thank you Looking at the docs for the plexapi python library we can get whether plex has generated intro markers but it doesn't return what those markers are so I don't think it is possible at this time. 1 Link to comment Share on other sites More sharing options...
adminExitium 173 Posted October 4, 2023 Share Posted October 4, 2023 The library does have the markers via the markers object method which returns the Marker class:Â https://python-plexapi.readthedocs.io/en/latest/modules/media.html#plexapi.media.Marker Usage references: https://github.com/Darkmadda/PlexSkipIntro/blob/a11368e47b1ba589cbe9e1a8df2b4bf00f617b93/lib/addon.py#L41 https://github.com/x1ao4/plex-desktop-skipper/blob/2117785471bfb8bb7ff0971f8cee53a9269b3140/en/plex-desktop-skipper/plex-desktop-skipper.py#L70C29-L70C29 Link to comment Share on other sites More sharing options...
Compulzive 3 Posted October 14, 2023 Share Posted October 14, 2023 Hi Im new on emby - I alsp migrated from Plex. Then i saw that plex kill my acces, i ended up removing plex. Is it then still possible to Migrat the info? im having some problems with identify tv show and episodes.  Link to comment Share on other sites More sharing options...
lionn1 1 Posted October 16, 2023 Share Posted October 16, 2023 Hi there, I'm trying to migrate the watch history and I am currently experiencing the below error once starting:  Starting Movie Matching for user: Kickflix. movie match success using imdb -- Constantine movie match success using imdb -- Dungeons & Dragons: Honor Among Thieves movie match success using imdb -- Enemy movie match success using imdb -- A Grand Day Out movie match success using imdb -- A Perfect World Starting TV Series Matching for user: Kickflix. Traceback (most recent call last): File "/opt/p2e/watch-history-migration.py", line 200, in <module> migrateShowsHistory(plexClientAdminUser, EMBY_ADMIN_USERNAME) File "/opt/p2e/watch-history-migration.py", line 190, in migrateShowsHistory if embyWatched == False: ^^^^^^^^^^^ UnboundLocalError: cannot access local variable 'embyWatched' where it is not associated with a value Could you please share your insights and if there's something that has changed inside Emby? Link to comment Share on other sites More sharing options...
Solution lionn1 1 Posted October 24, 2023 Solution Share Posted October 24, 2023 On 16/10/2023 at 13:23, lionn1 said: Hi there, I'm trying to migrate the watch history and I am currently experiencing the below error once starting:  Starting Movie Matching for user: Kickflix. movie match success using imdb -- Constantine movie match success using imdb -- Dungeons & Dragons: Honor Among Thieves movie match success using imdb -- Enemy movie match success using imdb -- A Grand Day Out movie match success using imdb -- A Perfect World Starting TV Series Matching for user: Kickflix. Traceback (most recent call last): File "/opt/p2e/watch-history-migration.py", line 200, in <module> migrateShowsHistory(plexClientAdminUser, EMBY_ADMIN_USERNAME) File "/opt/p2e/watch-history-migration.py", line 190, in migrateShowsHistory if embyWatched == False: ^^^^^^^^^^^ UnboundLocalError: cannot access local variable 'embyWatched' where it is not associated with a value Could you please share your insights and if there's something that has changed inside Emby? So going forward on this, I have made a fork of the original and made some changes here. https://gitlab.com/leeuw121/plex-to-emby-migration *If anyone is going to use this, I am not aiming to make any public changes or fixes to this as this has mainly been to ensure that the scripts are working for myself, by no means would this mean I would be able to assist with many issues going forward at all. However if I do make any changes I will update the scripts accordingly. Edits to the original: I've split both migrations to be one for movies and one for tv. For myself, I have multiple TV libraries (Cartoons, TV, Anime etc) so to lighten the load on the script, I've split these apart so it's not constantly trying to migrate Movies every single time. With this, the additions made to these are: Watch data Scripts will run and output into "logs/[scriptname].log" The initial coding has changed with small keyword changes to fit the changes in API's etc. Learning from this I would ensure the below: Ensure the Plex libraries are using either TVDB or TMDB instead of the Plex Series metadata, if you have to change this, I would highly recommend refreshing metadata. (Regarding the Hetzner difficulties, moving the plex server's full database into a local hosted service will assist in doing so) Gaining the shared users' plex tokens has been difficult to do so without asking them to acquire this token for you. (I am looking into doing this via Plex User ID and just relying on the "Claimed Server Admin Token") Some episodes in shows still have issues with matching. This can be a case where some words in episode names still aren't 100% accurate. EG: "Those Who Hunt: START" on Emby, and "Those Who Hunt: Start" on Plex. These won't migrate over until you change this on either Emby or Plex, however I would recommend changing this on Plex.  1 Link to comment Share on other sites More sharing options...
Adamaen 2 Posted December 15, 2023 Share Posted December 15, 2023 Hello, I am also migrating from plex to emby and find this incredible script. i'm using win 11, installed python and plex api. i am only interested in migrating users watched history. i have only one account on my plex server (no other home account) and a lot of users who i share my plex with. The script worked perfectly for my account. I managed to get my users plex token, but when i use the script with a user plex token of a shared user i got this error: File "C:\Users\Morgan\Downloads\watch-history-migration-movies.py", line 177, in <module> adminAccount = MyPlexAccount(token=PLEX_ADMIN_USER_TOKEN) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Morgan\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\plexapi\myplex.py", line 125, in __init__ data, initpath = self._signin(username, password, code, remember, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Morgan\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\plexapi\myplex.py", line 130, in _signin return self.query(self.key), self.key ^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Morgan\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\plexapi\myplex.py", line 240, in query raise Unauthorized(message) plexapi.exceptions.Unauthorized: (401) unauthorized; https://plex.tv/api/v2/user <?xml version="1.0" encoding="UTF-8"?> <errors> <error code="1001" message="User could not be authenticated" status="401"/> </errors> Thanks for help. Link to comment Share on other sites More sharing options...
gregeeh 1 Posted December 30, 2023 Share Posted December 30, 2023 Hello, I've used this script to migrate the admin user watched status and it worked great. However I cannot figure out how to migrate the other shared users on Plex to a User on Emby. Can someone please provide me with some help? TIA  Link to comment Share on other sites More sharing options...
Adamaen 2 Posted January 8 Share Posted January 8 Hi, i finally found a solution to migrate my plex users watched status to emby with another project: GitHub - arabcoders/watchstate: Self-hosted service to sync your plex, jellyfin and emby play state. without relying on 3rd-party external services. There is a little trick to migrate shared users, you can find the solution in discussions. Link to comment Share on other sites More sharing options...
Adamaen 2 Posted January 15 Share Posted January 15 On 12/30/2023 at 6:53 AM, gregeeh said: Hello, I've used this script to migrate the admin user watched status and it worked great. However I cannot figure out how to migrate the other shared users on Plex to a User on Emby. Can someone please provide me with some help? TIA  Hi, Did you see my last post? Link to comment Share on other sites More sharing options...
gregeeh 1 Posted January 15 Share Posted January 15 2 hours ago, Adamaen said: Hi, Did you see my last post? Yes, thank you. Link to comment Share on other sites More sharing options...
Snoak 0 Posted April 25 Share Posted April 25 Hi! Trying to use the script, but I'm getting the following error. Can someone help? Thanks Getting Library Items. This can take a while. Traceback (most recent call last):  File "C:\Users\pierr\Downloads\plex-to-emby-migration-master (1)\plex-to-emby-migration-master\metadata-migration-tv.py", line 149, in <module>   account = MyPlexAccount(PLEX_TOKEN)        ^^^^^^^^^^^^^^^^^^^^^^^^^  File "C:\Users\pierr\AppData\Local\Programs\Python\Python312\Lib\site-packages\plexapi\myplex.py", line 125, in __init__   data, initpath = self._signin(username, password, code, remember, timeout)            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "C:\Users\pierr\AppData\Local\Programs\Python\Python312\Lib\site-packages\plexapi\myplex.py", line 138, in _signin   data = self.query(self.SIGNIN, method=self._session.post, data=payload, timeout=timeout)       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "C:\Users\pierr\AppData\Local\Programs\Python\Python312\Lib\site-packages\plexapi\myplex.py", line 248, in query   raise BadRequest(message) plexapi.exceptions.BadRequest: (400) bad_request; https://plex.tv/api/v2/users/signin <?xml version="1.0" encoding="UTF-8"?> <errors>  <error code="1004" message="password is missing" status="400"/> </errors> Link to comment Share on other sites More sharing options...
Snoak 0 Posted April 25 Share Posted April 25 I was able to do it by using the username and password instead of the plex_token. Working now! Link to comment Share on other sites More sharing options...
Snoak 0 Posted April 25 Share Posted April 25 Everything worked well, but I'm wondering if the script could also sync the episode title cards/posters for series? I see that the get emby episodes function is there, so it would be feasible right? Thanks! Link to comment Share on other sites More sharing options...
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