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

plex_exporter_importer.py: Season "2020" of daily show breaks script #185

Open
shaddowlink opened this issue Mar 26, 2023 · 5 comments
Open
Labels
1. Bug request Request for bug to be fixed 2. Level: Medium The request is of normal difficulty 3. Request accepted Request is accepted and will be realised

Comments

@shaddowlink
Copy link

shaddowlink commented Mar 26, 2023

Hey,

Running the importer with verbose flag I could trace an error I get.
It stops and throws error on a daily show that has the year as Season number
(not related to my other issue)
tried to import watch status

 ZDF Magazin Royale
                S2020E1 - Die ganz große Verschwörung!
                S2020E2 - Volkswagen - Das Weltauto!
                S2020E3 - Online-Glücksspiele in Schleswig-Holstein
                S2020E4 - Eier aus Stahl: Jan Marsalek
                S2020E5 - Rassismus in der Polizei
Shutting down...
Progress saved
AN ERROR OCCURED. ALL YOUR PROGRESS IS SAVED. PLEASE SHARE THE FOLLOWING WITH THE DEVELOPER:
Traceback (most recent call last):
  File "/opt/scripts/./plex_exporter_importer.py", line 1426, in <module>
    response = plex_exporter_importer(
  File "/opt/scripts/./plex_exporter_importer.py", line 1359, in plex_exporter_importer
    _leave(**exit_args, e=e)
  File "/opt/scripts/./plex_exporter_importer.py", line 442, in _leave
    raise e
  File "/opt/scripts/./plex_exporter_importer.py", line 1275, in plex_exporter_importer
    if verbose == True: print(f'                S{episode["parentIndex"]}E{episode["index"]} - {episode["title"]}')
KeyError: 'index'

@shaddowlink shaddowlink added the 1. Bug request Request for bug to be fixed label Mar 26, 2023
@Casvt
Copy link
Owner

Casvt commented Mar 26, 2023

It suggests that the episode doesn't have any episode number. Is that correct?

@shaddowlink
Copy link
Author

image

well the episode numer is the air date its a daily show, thats how my automation handles it also plex agent regognize them correctly

@Casvt
Copy link
Owner

Casvt commented Mar 26, 2023

What is the episode number in Plex for it? Which number is shown in the Plex web UI?

@shaddowlink
Copy link
Author

<MediaContainer size="1" allowSync="1" identifier="com.plexapp.plugins.library" librarySectionID="7" librarySectionTitle="TV" librarySectionUUID="c1eeb591-0e44-4d71-97d6-416b4879d2e4" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1678801244">
<Video ratingKey="98499" key="/library/metadata/98499" parentRatingKey="98498" grandparentRatingKey="35387" guid="plex://episode/5f945012b5637a002d2849f5" parentGuid="plex://season/602e808fb59d8d002d142724" grandparentGuid="plex://show/5f945011b5637a002d2849ef" type="episode" title="Die ganz große Verschwörung!" titleSort="Die ganz grose Verschworung!" grandparentKey="/library/metadata/35387" parentKey="/library/metadata/98498" librarySectionTitle="TV" librarySectionID="7" librarySectionKey="/library/sections/7" grandparentTitle="ZDF Magazin Royale" parentTitle="Staffel 2020" originalTitle="Episode 1" contentRating="de/FSK 16" summary="Für seine erste Sendung hat sich Jan in die dunkelsten Ecken des Internets gewagt, in das Epizentrum seriöser Illuminaten und Klarseher – auf Telegram. Folgen Sie ihm hinunter ins Rabbit Hole und erfahren Sie endlich die Wahrheit über die ganz große "Verschwörung"." index="1" parentIndex="2020" year="2020" thumb="/library/metadata/98499/thumb/1679250834" art="/library/metadata/35387/art/1678684848" parentThumb="/library/metadata/98498/thumb/1679250834" grandparentThumb="/library/metadata/35387/thumb/1678684848" grandparentArt="/library/metadata/35387/art/1678684848" duration="1911400" originallyAvailableAt="2020-11-06" addedAt="1678684787" updatedAt="1679250834">
<Media id="182152" duration="1911400" bitrate="2784" width="1280" height="720" aspectRatio="1.78" audioChannels="2" audioCodec="ac3" videoCodec="h264" videoResolution="720" container="mkv" videoFrameRate="PAL" videoProfile="high">
<Part accessible="1" exists="1" id="189968" key="/library/parts/189968/1604706696/file.mkv" duration="1911400" file="/mnt/unionfs/Media/TV/ZDF Magazin Royale (2020) {imdb-tt13486352}/Staffel 2020/ZDF Magazin Royale - 2020-11-06 - Die ganz große Verschwörung! HDTV-720p.mkv" size="665097017" container="mkv" videoProfile="high">
<Stream id="391291" streamType="1" default="1" codec="h264" index="0" bitrate="2336" language="Englisch" languageTag="en" languageCode="eng" bitDepth="8" chromaLocation="left" chromaSubsampling="4:2:0" codedHeight="720" codedWidth="1280" frameRate="25.000" hasScalingMatrix="0" height="720" level="41" profile="high" refFrames="5" scanType="progressive" width="1280" displayTitle="720p (H.264)" extendedDisplayTitle="720p (H.264)"> </Stream>
<Stream id="391292" streamType="2" selected="1" default="1" codec="ac3" index="1" channels="2" bitrate="448" language="Deutsch" languageTag="de" languageCode="deu" audioChannelLayout="stereo" samplingRate="48000" displayTitle="Deutsch (AC3 Stereo)" extendedDisplayTitle="Deutsch (AC3 Stereo)"> </Stream>
</Part>
</Media>
<Director id="179527" filter="director=179527" tag="J. Patrick Arbeiter"/>
<Writer id="179528" filter="writer=179528" tag="Carolin Worbs"/>
<Writer id="179529" filter="writer=179529" tag="Miguel Robitzky"/>
<Writer id="179530" filter="writer=179530" tag="Egon Kitsch"/>
<Writer id="179531" filter="writer=179531" tag="Tim Wolff"/>
<Writer id="179532" filter="writer=179532" tag="Markus Hennig"/>
<Producer id="179533" filter="producer=179533" tag="Felix Schon"/>
<Guid id="tmdb://2475040"/>
<Role id="179486" filter="actor=179486" tag="Bernhard Hoëcker" tagKey="5d77682b6f4521001ea9a214" role="Self" thumb="https://metadata-static.plex.tv/people/5d77682b6f4521001ea9a214.jpg"/>
<Role id="179487" filter="actor=179487" tag="H.P. Baxxter" tagKey="5d7769a9fb0d55001f52c7dd" role="Musical Guest" thumb="https://metadata-static.plex.tv/people/5d7769a9fb0d55001f52c7dd.jpg"/>
<Extras size="0"> </Extras>
<Related> </Related>
</Video>
</MediaContainer>

This is the XML data of the media. Its name is "episode 1" and it looks like a normal show in plex titles are "Episode 1/2/...."

image

@Casvt
Copy link
Owner

Casvt commented Mar 27, 2023

Okay, I'm going to say something that sounds dumb but it's not.

I'm planning to rewrite the script anyway (clean it up, more logging, more stable, etc.), and I'm just going to hope for now that the issue will automatically resolve itself with the new version.

@Casvt Casvt added 3. Request accepted Request is accepted and will be realised 2. Level: Medium The request is of normal difficulty labels Mar 27, 2023
@Casvt Casvt changed the title Season "2020" of daily show breaks plex_exporter_importer.py plex_exporter_importer.py: Season "2020" of daily show breaks script Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. Bug request Request for bug to be fixed 2. Level: Medium The request is of normal difficulty 3. Request accepted Request is accepted and will be realised
Projects
None yet
Development

No branches or pull requests

2 participants