mirror of
https://github.com/Googolplexed0/zotify.git
synced 2026-04-25 06:15:55 +03:00
[GH-ISSUE #26] Debug Logging in a File & SKIP_EXISTING Redownloads #20
Labels
No labels
bug
considering
discussion
documentation
enhancement
enhancement
good first issue
help wanted
pull-request
question
stale
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/zotify#20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @astralalgorithm on GitHub (Jun 20, 2025).
Original GitHub issue: https://github.com/Googolplexed0/zotify/issues/26
Originally assigned to: @Googolplexed0 on GitHub.
userland@localhost:~$
0%| | 0/1 [00:07<?, ?url/s]
0%| | 0/1 [00:07<?, ?url/s]
0%| | 0/1 [00:07<?, ?url/s]
0%| | 0/1 [00:06<?, ?url/s]
0%| | 0/1 [00:06<?, ?url/s]
0%| | 0/1 [00:06<?, ?url/s]
0%| | 0/1 [00:06<?, ?url/s]
0%| | 0/1 [00:06<?, ?url/s]
t. thats what it says after the attempt to diwnload an album. it randomly skips tracks from an album saying they are unavailable. this is close it seems. draftkinners zotify didnt make it this far. any help or advice is appreciated. i thought to look at permissions for the download directory in config.json and thats drwxrwx--- so no permission for other. I dont think thats why but i dont know. another thing i noticed is i can go to host-rootfs/sdcard/music. but if i go to mnt/sdcard or /sdcard/music from root i get "cannot open "." operation not permitted" . weird. they appear to have the same permissions though.
@astralalgorithm commented on GitHub (Jun 21, 2025):
so if i understand correctly, that album is unavailable entirely on spotify. it used to be on there i guess? but then license holder requested it taken down? but spotify leave the page up to make it appear like they have said album. (serenity now) lol.
@astralalgorithm commented on GitHub (Jun 22, 2025):
so i think i managed to get this working. ffmpeg was erroring after every track was downloaded. i got lucky and caughtba partial glimpse of the errror before the next track progress overwrote that line. it pointed me to download execstack and prelink deb from debian ftp. then i issued "sudo dpkg -i prelink_0.0.2013xxx.deb execstack_0.0.2013xxx.deb
sudo execstack -c /usr/lib/arm-linux-gnueabihf/libx264.so.164". now how can i view the zotify error log to see if there were errors? i had the screen go to sleep and downloading got paused. so i restarted the command and it finished the rest buti would like to know there werent errors. so please can anybody say where or how i can view the relevant zotify log?
@astralalgorithm commented on GitHub (Jun 22, 2025):
well in the config it says ffmpeg log "errors" (also printSplash is false?) though i cant find how to view ffmpeg logs either... guess until someone can verify how to view logs i can just rerun the command to download the playlist/album and if it skips every track it had no errors originally? i know, pretty smart right lol ;p (btw my return key doesnt work on here
@astralalgorithm commented on GitHub (Jun 22, 2025):
would be cool if there was a option in config for debug logging to a file if its not already. anyway fantastic job to all involved. thanks
@astralalgorithm commented on GitHub (Jun 22, 2025):
rerunning the command results in redownloading! my config is set to "skip existing = true". ? why would it redownload when the original files are all there? it didnt even make a new directory, just overwrote. It skipped 3 of 17 i think. and of course the progress printing in the bash overwrites errors.
@astralalgorithm commented on GitHub (Jun 22, 2025):
just saw the post in pull requests. just experienced redownload of an album trying to check if any song had errors. my config has skip existing set to true. so do i need to turn on skip previously downloaded? though i worry that would skip even if the song was incomplete?
@Googolplexed0 commented on GitHub (Jun 22, 2025):
A lot going on here, but not enough specifics for me to help right away.
ffmpeg errors should only interfere in the download process if you are transcoding from
.oggto another format/codec, by not transcoding you can avoid any potential issues.There is no error logging to file, error logs are all written to the terminal. Adding a
logs.txtrecord config option is something I can look into adding in the near future. The progress bars should not be overwriting error messages, so I'd like a more detailed description of this, since my system doesn't behave this way.SKIP_EXISTINGshould skip any song that's been added to the.song_idsfile, where additions to the.song_idsfile only occur after a successful download.SKIP_PREVIOUSLY_DOWNLOADEDuses the same system, but with one.song_archivefile at theROOT_PATH. It is possible that these songs had errors on previous attempts and needed redownloading. To get a better look at the redownloading, you can use the--debugflag to print some extra diagnostic/logging info to the terminal.If you could attach your
config.jsonand the album you are downloading I would be happy to help diagnose what's going on.@astralalgorithm commented on GitHub (Jun 23, 2025):
i will try to find a way to show you how it looks. its bizarre, in the config i remember every print option is enab led excluding splash. when im downloading the track progress prints backwards verticall y in the bash lol it overwrites pr evious lines like "fetching track". eventually when it reac hes the beginning it stops its ascent and just updates that top line percentage rather than a line above rhe last percent update.
@astralalgorithm commented on GitHub (Jun 23, 2025):
(EDIT: I transferred by using command line between android and windows. though still wish i could drag and drop. ) im trying to transfer the downloaded mp3s to redownload to show you what it looks like and the mp3s are not visible on my windows pc. any idea why i have that problem? (anyway will report back asap)
@astralalgorithm commented on GitHub (Jun 24, 2025):
redownloaded. wasnt able to figure out how to show you but my description is accurate. i noticed every track progress update listed the target file size. so i watched the entire albym download babysitting the percent. i wrote down each files size printed during download. none of the downloaded files size match exactly though? they are a few .xx Meg over generally but a few are under by kbs? like 1 track zotify reported as 4.66Meg but the file after download is 4.54MB, though there seemingly were no errors. So is that normal or whats the deal with that mismatch? (by the way the 1st double download album and the earlier fresh redownload both compared side by side in windows are the same file sizes respectively) seems like everything i try to do to confirm the files are good leaves me uncertain kinda? lol ever heard of the observer effect? What about murphy? or bob the uncle? ohhhh yeah, the config........ but wait back to the file size mismatch wait wait whey, is it reporting the ogg vorbis file size during download? but after thats converted its a dif size? just a guess
@astralalgorithm commented on GitHub (Jun 24, 2025):
@astralalgorithm commented on GitHub (Jun 24, 2025):
got any advice for optimal settings?
@astralalgorithm commented on GitHub (Jun 24, 2025):
@astralalgorithm commented on GitHub (Jun 24, 2025):
managed to copy that after a track was skipped due to an error but everytime i tried to scroll up highlighting the shell to copy the beginning it would jump back down to the ongoing download progress update. frustrating... so im unsure why that track was skipped... keep in mind my config is almost entirely default. i changed downloadrealtime to true after i read it false could prevent more than 18 tracks but besides that i dont think i changed anything except updating download path... also keep in mind im on a touch screen in userland debian so... when there was an error it printed quite a lot downwards which made rhe progress update on remaining downloads with plenty of space instead of being scrunched against the ceiling of the shell.
@astralalgorithm commented on GitHub (Jun 24, 2025):
ERROR: SKIPPING SONG - GENERAL DOWNLOAD ERROR
@astralalgorithm commented on GitHub (Jun 24, 2025):
https://imgur.com/a/z87rs0e https://imgur.com/a/3EIRlNw
@astralalgorithm commented on GitHub (Jun 24, 2025):
in those images you can see how the progress update prints vertical in the shell. in the 2nd image you can see remnants of previous updates on a few lines but the higher percentage lines were overwritten so it appears like the download was only twenty somethng percent but it really completed though the next song progress took its place etc
@astralalgorithm commented on GitHub (Jun 25, 2025):
i had the idea to disable some print features to hopefully lighten the load but i really want to see the progress. not sure what to do in that case... guess i could disable download progress and only print errors or skips? but darn i really would like to see the %. also i am 99.9% sure the album i download makes no difference. but if you do want the link to the previously mentioned unavailable album let me know.
@astralalgorithm commented on GitHub (Jun 25, 2025):
another question on the heap. (sorry) if the session gets closed or terminated after a download? would that mess up skipping existing? i imagine no, it shouldnt but grasping at straws to get any of this. but i have been experiencing crashes when i switch between tabs a lot. so sometimes i have to open a new session. just puffing the sherlock looking for any culprit.
@astralalgorithm commented on GitHub (Jun 25, 2025):
well, good news. just reran the last album that last error / skip happened on and it skipped everything it had got the 1st time seemingly... so maybe it IS that album that allows redownloads of existing? or maybe it was a fluke
@Googolplexed0 commented on GitHub (Jul 8, 2025):
The overwriting happens because the progress print system relies on using carriage return characters (
\r) and moving cursors back up to the previous line(s) (\033[Athrough\033[K), which your shell/terminal (that looks fairly old) may not fully support. There are not any workarounds to this if unsupported AFAIK. Best solution would be to disable all but one progress bar and see if that works.No, this would have no effect unless you manage to precisely stop after the ffmpeg conversion but before writing the song_id to the archive, which is (in all practicality) impossible. Even if it did occur, it would only affect the single song.
Do link the album and the specific songs that are being skipped. If I can recreate the issue exactly then there might be hope for a fix, otherwise it is likely an issue with your specific system.