Giter Club home page Giter Club logo

emby2jelly's People

Contributors

marc-vieg avatar nothing4you avatar tetebueno avatar

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  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

emby2jelly's Issues

KeyError: 'Name'

I'm getting an error on the first user while copying watched data.

Traceback (most recent call last):
  File "/home/example/Workspace/Emby2Jelly/APImain.py", line 500, in <module>
    jelly(newUser_pw)
  File "/home/example/Workspace/Emby2Jelly/APImain.py", line 421, in jelly
    iterateMigrationData()
  File "/home/example/Workspace/Emby2Jelly/APImain.py", line 363, in iterateMigrationData
    MigrationMedia['JellyId'] = search_byName(MigrationMedia,Library)
  File "/home/example/Workspace/Emby2Jelly/APImain.py", line 335, in search_byName
    if  jelly_movie['Name'] == MigrationMedia['Name']:
KeyError: 'Name'

if this is due to a missing or misidentified file on the jellyfin side I have no idea how to find it.

Check provider key along with ProviderId

I just ran into the situation that I have marked movie 8 Mile - https://www.themoviedb.org/movie/65 as watched in Emby.
Both providers don't have a prefix like imdb's tt, so it looks through my jelly library and finds episode 65 on tvdb - https://thetvdb.com/series/buffy-the-vampire-slayer/episodes/65 which is obviously something completely different.
As this script currently does not check that the IDs belong to the same provider this results in incorrect media matching.

Can you read out ENV variables and read the settings file

I'd like to dockerize your script, there are some things that would be great maybe you can conditionally read out the ENV variables.

Something along this would probably work.

# Get environment variables
EMBY_APIKEY = os.getenv('EMBY_APIKEY')
EMBY_URLBASE = os.getenv('EMBY_URLBASE')
JELLY_APIKEY = os.getenv('JELLY_APIKEY')
JELLY_URLBASE = os.getenv('JELLY_URLBASE')

Not for remote server migrations?

so I ran this from my own PC given the layout of the settings.ini file. but in either case Jelly is running on new hardware running on Ubuntu, and Emby is running on an older server inside of a truenas jail.
It seems to pull user data from Emby just fine but then crashes.

`##### EmbySync Done #####

Traceback (most recent call last):
File "APImain.py", line 500, in
jelly(newUser_pw)
File "APImain.py", line 415, in jelly
jellyUsers = jelly_get_users_list()
File "APImain.py", line 187, in jelly_get_users_list
return "error : " + json.loads(response.content.decode('utf-8'))
File "/usr/lib/python3.8/json/init.py", line 357, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
`

I noticed this issue which appeared somewhat similar hence the title #8 (comment)

Match by Filename/Path

Awesome script for Movies and TV.

I have an Emby server bunch of video files like YouTube videos etc that aren't on IMDB etc.

Would it be at all possible to match based on filepath / filename instead of a release ID?

introduce additional argument --password-for-non-existent-user

Something along the line of:

Option Argument : (only one file can be used at a time, one run to a file, then one run from a file)
			--tofile [file]     run the script saving viewed statuses to a file instead of sending them to destination server
			--fromfile [file]       run the script with a file as source server and send viewed statuses to destination server
--newuserpwd "change-your-password-9efde123"

Error Looking For Users?

Im on Windows, and was hoping to pull off the migration from Emby to Jellyfin for my watched files.

I can read off of Emby just fine and create a file. However, when it tries to move to Jellyfin, I'm receiving an error about users? Not sure? I'm moving from the same user to same user, only 1 user available in both Emby and Jellyfin

Traceback (most recent call last):

File "APImain.py", line 498, in
jelly(newUser_pw)
File "APImain.py", line 413, in jelly
jellyUsers = jelly_get_users_list()
File "APImain.py", line 187, in jelly_get_users_list
return "error : " + json.loads(response.content.decode('utf-8'))
File "C:\Users...\Python38\lib\json_init_.py", line 357, in loads
return _default_decoder.decode(s)
File "C:\Users...\Python38\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users...\Python38\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Send to Existing user?

How possible would it be to add a variable to sync to an existing user? Say I have the same user already created on my new server and I want to move over the status, on a test run it did nothing with that user because it already existed but I wanted to actually force the status over to it.

--fromfile option create users, but don't migrate watched data

Using --fromfile option the selectedUsers list is not populated with data, therefore migration not happen.
I added two lines to the compare_users function after line 204 and then it did the job.

    for eUser in MigrationData:
        embyList.append(eUser)
            if selectedUsers ==[]:
                selectedUsers.append(eUser)

I used the master branch, and it worked fine from server to server and with the --tofile option.
I couldn't test the modified version from server2server and with --tofile option as the source server was not available anymore.

Ohtherwise, thanks for the script. It helped me a lot.

Just tried running on windows - No module names 'requests'

on windows, tried running this.

C:\Users\vaise\Downloads\Emby2Jelly>python APImain.py
Traceback (most recent call last):
File "C:\Users\vaise\Downloads\Emby2Jelly\APImain.py", line 15, in
import requests
ModuleNotFoundError: No module named 'requests'

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.