Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add language as important criteria #51

Open
jkoenig72 opened this issue Jan 11, 2021 · 1 comment
Open

Add language as important criteria #51

jkoenig72 opened this issue Jan 11, 2021 · 1 comment

Comments

@jkoenig72
Copy link

Describe the problem
Compare / list language and make it available for auto delete

Describe any solutions you think might work

Something like that might work... important is "item.reload()", otherwise AudioStream info is not provided.
...
# loop returned duplicates
for item in dupes:
item.reload()
languages = []
for media in item.media:
#print(media)
for part in media.parts:
#print(part)
for stream in part.streams:
if type(stream) is plexapi.media.AudioStream:
#print(type(stream))
#print(stream, end=', ')
#print(stream.codec , end=', ')
#print(stream.languageCode)
languages.append(stream.languageCode)
....

        elif 'languages' in k:
            tmp.append(parts[item_id][k])

...

#add language to score
if 'ger' in media_info["languages"]:
    score+=20000

...

Additional context
Nice tool you have created. FInd it very useful...

@snickers2k
Copy link

would be great
i "rely" on German DL (dual-language) with english as second and i can't use dupefinder as long it prefers single audio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants