GNOME Bugzilla – Bug 751265
JSON import errors
Last modified: 2015-06-29 11:43:01 UTC
I've added an Audiobook folder to my Rhythmbox library. Each audiobook mp3 is accompanied by a .json file with a bookmarked position. Rhythmbox is confused by the .json files and reports each .json within Import Errors. Would it be possible to instruct Rhythmbox to ignore the .json files? As you did with other text files. Thank you for your time. Thomas
What error message are you getting for these files? Can you attach the output you get from 'gst-discoverer-1.0 /path/to/file.json'?
Some more information & output: The audiobooks in question are in a 32Gb USB stick. To which I've added a hidden .is_audio_player file. So that Rhythmbox mounts and displays the stick as an audio device. The contents of the USB stick are synchronised with an Android smartphone and Android tablet via Syncthing. The phone and tablet both run the Listen Audiobook Player application. It is this application which adds the .json bookmarking files. Which the application synchronises between Android devices via Dropbox. My Rhythmbox Music library has sub libraries for audiobooks, documentaries, drama, music and poetry. All of which live in a NAS box. I punt new audiobooks to the phone and tablet with a drag and drop of an audiobook from the sub-library on to the Audiobook device. Which works seamlessly until I play an audiobook on either device and the Listen application then creates a .json bookmark. To make things more complicated, Rhythmbox is only reporting 3 of the 4 .json files within Import Errors. The Errors being “Could not determine type of stream”. I wasn't sure how to save the output to a file so I've pasted the output below. Hope this is OK. thomas@PC:~$ gst-discoverer-1.0 /media/thomas/AUDIOBOOKS/mp3/Marilynne Robinson - Gilead/Marilynne Robinson - Gilead.lap.json Analyzing file:///media/thomas/AUDIOBOOKS/mp3/Marilynne Done discovering file:///media/thomas/AUDIOBOOKS/mp3/Marilynne An error was encountered while discovering the file Resource not found. Analyzing file:///home/thomas/Robinson Done discovering file:///home/thomas/Robinson An error was encountered while discovering the file Resource not found. Analyzing file:///home/thomas/- Done discovering file:///home/thomas/- An error was encountered while discovering the file Resource not found. Analyzing file:///home/thomas/Gilead/Marilynne Done discovering file:///home/thomas/Gilead/Marilynne An error was encountered while discovering the file Resource not found. Analyzing file:///home/thomas/Robinson Done discovering file:///home/thomas/Robinson An error was encountered while discovering the file Resource not found. Analyzing file:///home/thomas/- Done discovering file:///home/thomas/- An error was encountered while discovering the file Resource not found. Analyzing file:///home/thomas/Gilead.lap.json Done discovering file:///home/thomas/Gilead.lap.json An error was encountered while discovering the file Resource not found.
OK, so the actual problem here is that GStreamer's text/plain typefinder (it doesn't have one for json) isn't working on these files, which probably means they aren't correctly encoded. Can you attach one of the files?
(In reply to Jonathan Matthew from comment #3) > OK, so the actual problem here is that GStreamer's text/plain typefinder (it > doesn't have one for json) isn't working on these files Or rather that he didn't run them on these files. Thomas, put quotes around your filename, or simply use your shell's Tab key to auto-complete. It should have been: gst-discoverer-1.0 "/media/thomas/AUDIOBOOKS/mp3/Marilynne Robinson - Gilead/Marilynne Robinson - Gilead.lap.json" >, which probably > means they aren't correctly encoded. Can you attach one of the files?
Created attachment 305843 [details] example json with import error
Comment on attachment 305843 [details] example json with import error Also ran the line suggested. The result was shorter but essentially the same. thomas@PC:~$ gst-discoverer-1.0 "/media/thomas/AUDIOBOOKS/mp3/Marilynne Robinson - Gilead/Marilynne Robinson - Gilead.lap.json" Analyzing file:///media/thomas/AUDIOBOOKS/mp3/Marilynne%20Robinson%20-%20Gilead/Marilynne%20Robinson%20-%20Gilead.lap.json Done discovering file:///media/thomas/AUDIOBOOKS/mp3/Marilynne%20Robinson%20-%20Gilead/Marilynne%20Robinson%20-%20Gilead.lap.json An error was encountered while discovering the file Resource not found.
(In reply to Thomas from comment #6) > Comment on attachment 305843 [details] > example json with import error > > Also ran the line suggested. The result was shorter but essentially the same. <snip> > Resource not found. You typed it wrong again. Maybe you want to try drag'n'dropping it from the file manager instead?
Sorry for the incompetence. Dragged and dropped results below. Thanks for your patience. thomas@PC:~$ gst-discoverer-1.0 '/media/thomas/AUDIOBOOKS/mp3/Marilynne Robinson - Gilead/Marilynne Robinson - Gilead.lap.json' Analyzing file:///media/thomas/AUDIOBOOKS/mp3/Marilynne%20Robinson%20-%20Gilead/Marilynne%20Robinson%20-%20Gilead.lap.json Done discovering file:///media/thomas/AUDIOBOOKS/mp3/Marilynne%20Robinson%20-%20Gilead/Marilynne%20Robinson%20-%20Gilead.lap.json An error was encountered while discovering the file Could not determine type of stream.
While gstreamer isn't helping us much here, everything would be fine if the rhythmbox metadata code was handling errors as everything else expects it to. Files smaller than 4k that cannot be identified (like these json files) should be ignored.
fixed in commit 2447525