Closed Xalaxis closed 5 years ago
Checking it, thank you. As far as I can see there is something wrong with progress bar... As for dirty workaround for now you can redirect stdout to a file, and it should go well.
I've just pushed new version, v0.3.9, can you please give it a try?
@Xalaxis ping
@andrey-yantsen Thanks for the ping, I missed the first email. Downloading now works, but with a new error:
[05/12/2018 13:44:18] [INFO] [plexiglas] Downloading deadmau5 - For Lack Of A Better Name Strobe.mp3 to C:\Users\Wolfie\Desktop\Plexiglas\Music, file size is 24.14 MiB
deadmau5 - For Lack Of A Better Name Strobe.mp3.part: 100%|█████████████████████████████████████████████████████████████████████████████████████████████| 25.3M/25.3M [00:11<00:00, 2.27MB/s]
[05/12/2018 13:44:29] [ERROR] [plexiglas] File "C:\Users\Wolfie\Desktop\Plexiglas\Music\deadmau5 - For Lack Of A Better Name Strobe.mp3.part" has an unexpected size (actual: 25307561, expected: 25309609)
Traceback (most recent call last):
File "c:\users\wolfie\appdata\local\programs\python\python37-32\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\wolfie\appdata\local\programs\python\python37-32\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Wolfie\AppData\Local\Programs\Python\Python37-32\Scripts\plexiglas.exe\__main__.py", line 9, in <module>
File "c:\users\wolfie\appdata\local\programs\python\python37-32\lib\site-packages\plexiglas\cli.py", line 242, in main
required_media = plugin.sync(plex, opts)
File "c:\users\wolfie\appdata\local\programs\python\python37-32\lib\site-packages\plexiglas\simple_sync.py", line 118, in sync
download_media(plex, section.title, item, part, opts, mark_downloaded)
File "c:\users\wolfie\appdata\local\programs\python\python37-32\lib\site-packages\plexiglas\content.py", line 226, in download_media
raise ValueError('Downloaded file size is not the same as expected')
ValueError: Downloaded file size is not the same as expected```
@Xalaxis The last error was due to big file size (nearly 32 gigs), now you have completely new one :) Somehow the file size by announced Plex is different from the size of downloaded file... If you retry the download, would it fail again?
@andrey-yantsen Sorry, I didn't have time to test downloading the full 32GB file, but at least the download now starts :).
Retrying the music file download fails with exactly the same error message. It's also worth noting that the incomplete .part file isn't automatically deleted (which might be worth doing if there's no point keeping it around)
Trying the download with a different file works.
Sorry, I didn't have time to test downloading the full 32GB file, but at least the download now starts :).
No worries, it's ok. At least it starts, right :)
Trying the download with a different file works.
What a... if you'd manually remove .part-file will it fix the issue? Otherwise — can you send me the "broken" file somehow (e.g. using something like https://uploadfiles.io/)?
I tried manually removing the part file, but no luck unfortunately. I'd guess it's just overwritten right now anyway. Here's the partial file.
@Xalaxis can you please also share the original mp3?
And for the full picture — can you please send me the entire command (stripping server name, if you wish) of how you're executing the script?
And the command line is PS C:\Users\Wolfie\Desktop\Plexiglas> plexiglas --simple-sync-url "https://app.plex.tv/desktop#!/server/<redacted>?key=%2Flibrary%2Fsections%2F23&typeKey=%2Flibrary%2Fsections%2F23%2Fall%3Ftype%3D10&save=1&sort =viewCount%3Adesc" 1
Okaaay, I still can't reproduce it :) Can you send me an XML with "media info" on this file?
Honestly — I haven't tested "simple-sync" with photos/music/playlists, so at current stage I don't recommend to use it for anything except Movies or TV-Shows...
If you'll suddenly find out that size
attribute within Part
tag is different from 25307561
(it's the size of file you've sent me) — try to refresh the music library (or at least the album, not sure if it's possible).
@Xalaxis ping :)
XML
<Track ratingKey="12025" key="/library/metadata/12025" parentRatingKey="12015" grandparentRatingKey="11824" guid="com.plexapp.agents.plexmusic://gracenote/track/199300679-0AF28A1ADD59F930781ECB4EA5AF61B2/199300689-4FAAA30A0CA1FAA2E5829C9AAF0B32CA?lang=en" librarySectionTitle="Music" librarySectionID="23" librarySectionKey="/library/sections/23" type="track" title="Strobe" grandparentKey="/library/metadata/11824" parentKey="/library/metadata/12015" grandparentTitle="deadmau5" parentTitle="For Lack Of A Better Name" summary="" index="10" parentIndex="1" ratingCount="1617586" viewCount="37" lastViewedAt="1543248901" year="2010" thumb="/library/metadata/12015/thumb/1523290397" art="/library/metadata/11824/art/1544670796" parentThumb="/library/metadata/12015/thumb/1523290397" grandparentThumb="/library/metadata/11824/thumb/1544670796" grandparentArt="/library/metadata/11824/art/1544670796" duration="637100" addedAt="1399227615" updatedAt="1535995826">
<Media id="12357" duration="637100" bitrate="318" audioChannels="2" audioCodec="mp3" container="mp3">
<Part accessible="1" exists="1" id="241242" key="/library/parts/241242/1399227615/file.mp3" duration="637100" file="/mnt/MMusic/Electronic Artists/Deadmau5/For Lack Of A Better Name/10 - Deadmau5 - For Lack Of A Better Name - Strobe.mp3" size="25309609" container="mp3">
<Stream id="144854" streamType="2" selected="1" codec="mp3" index="0" channels="2" bitrate="318" albumGain="-4.73" albumPeak="1.000000" albumRange="6.201957" audioChannelLayout="stereo" gain="-3.78" loudness="-14.22" lra="6.77" peak="0.676849" samplingRate="44100" displayTitle="Unknown (MP3 Stereo)"/>
</Part>
</Media>
<Mood id="2026" filter="mood=2026" tag="Dreamy Pulse"/>
<Extras size="0"> </Extras>
</Track>
</MediaContainer>
The size is still the same after a refresh + analyze
@Xalaxis can you check the file size on your computer? Because both files I have are 25307561
bytes. Something is extreeemely wrong. Somewhere... :)
-rwxrwxrwx. 1 nobody nobody 25309609 May 4 2014 '10 - Deadmau5 - For Lack Of A Better Name - Strobe.mp3'
🤔
waaaaaat
This is weird
And if you download the file from https://github.com/andrey-yantsen/plexiglas/issues/3#issuecomment-445030602 — what would be it's size?
Maybe it's time to run fsck? :)
Here's the disparity
I've checked once again on my side:
-rwxr-xr-x 1 virus 25307561 Dec 6 21:08 '10 - Deadmau5 - For Lack Of A Better Name - Strobe.mp3'
and md5:
5070c5b898bd534117ca9d4f82eb28b2 10 - Deadmau5 - For Lack Of A Better Name - Strobe.mp3
There is no 25309609
in the dialogue, anyway
Ah, my bad. Hmm
Server:
2a620ab6921f3483e97033f84c32f745 10 - Deadmau5 - For Lack Of A Better Name - Strobe.mp3
Downloaded via Plex Web:
5070c5b898bd534117ca9d4f82eb28b2 10 - Deadmau5 - For Lack Of A Better Name - Strobe.mp3
Which file you've uploaded to me: from the server, or from Plex Web?
Plex web
Ok, I need the original one then, can you send it?
Ok, now I can reproduce it, thank you! Plex removes some mp3-tags and therefore the file size changes. I'll try to find a solution for this, or, at least, will add an option to ignore relatively small size difference.
Perhaps disabling file size checking is the right way to go? Shouldn't the transport take care of ensuring no data is lost in the transfer?
Yep, transport definitely should check the data, but I simply don't trust Plex :D I mean — if it'd decide to drop connection in the middle of the file I wouldn't be sure if it's ok, or an error... Anyway, I have a reproducible case now, I'll check what I can do here in next couple days.
There is a new version, v0.3.10, on its way, can you please give it a try?
When using the following --simple-sync-url, a crash occurs:
PS C:\Users\Wolfie\Desktop\Plexiglas> plexiglas --simple-sync-url "https://app.plex.tv/desktop#!/server/<redacted>?key=%2Flibrary%2Fsections%2F21&typeKey=%2Flibrary%2Fsections%2F21%2Fall%3Ftype%3D1&filters=unwatched%3D1&save=1&limit=&sort=originallyAvailableAt%3Adesc" 1