Bug 97688

Summary: shared-mime-info 1.7 no longer identifies .cbz as ebook
Product: shared-mime-info Reporter: Jeremy Bicha <jbicha>
Component: generalAssignee: Shared Mime Info group <shared_mime_info>
Status: RESOLVED NOTOURBUG QA Contact:
Severity: major    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Jeremy Bicha 2016-09-08 23:26:12 UTC
I tried to open a sample .cbz [1] in gnome-books 3.21.91 with tracker 1.9-1 and shared-mime-info 1.7-1 on Ubuntu GNOME 16.10 Beta. But instead I get this error:

Oops! Unable to load "Adekab-v01c01"
File type Zip archive (application/zip) is not supported.

1.7 Output
==========

Here's some commands I ran in a terminal:
$ file Adekan-v01c01.cbz 
Adekan-v01c01.cbz: Zip archive data, at least v2.0 to extract
$ mimetype Adekan-v01c01.cbz 
Adekan-v01c01.cbz: application/vnd.comicbook+zip
$ tracker info Adekan-v01c01.cbz 

  'rdf:type' = 'http://www.w3.org/2000/01/rdf-schema#Resource'
  'rdf:type' = 'http://www.semanticdesktop.org/ontologies/2007/01/19/nie#DataObject'
  'rdf:type' = 'http://www.semanticdesktop.org/ontologies/2007/01/19/nie#InformationElement'
  'rdf:type' = 'http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject'
  'nie:mimeType' = 'application/vnd.comicbook+zip'

(extra lines removed)

Downgrading to shared-mime-info 1.6-1ubuntu2 fixes the issue.

1.6 output
==========

$ file Adekan-v01c01.cbz 
Adekan-v01c01.cbz: Zip archive data, at least v2.0 to extract

$ mimetype Adekan-v01c01.cbz 
Adekan-v01c01.cbz: application/x-cbz

$ tracker info Adekan-v01c01.cbz 
  'rdf:type' = 'http://www.w3.org/2000/01/rdf-schema#Resource'
  'rdf:type' = 'http://www.semanticdesktop.org/ontologies/2007/01/19/nie#DataObject'
  'rdf:type' = 'http://www.semanticdesktop.org/ontologies/2007/01/19/nie#InformationElement'
  'rdf:type' = 'http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Document'
  'rdf:type' = 'http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject'
  'rdf:type' = 'http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#TextDocument'
  'rdf:type' = 'http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#PaginatedTextDocument'
  'rdf:type' = 'http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#EBook'
  'nie:mimeType' = 'application/x-cbz'


[1] You can find the file I used by clicking the COMIC BOOK ZIP link at
https://archive.org/details/manga_Adekan-v01c01.cbz
Comment 1 Bastien Nocera 2016-09-08 23:39:41 UTC
(In reply to Jeremy Bicha from comment #0)
> I tried to open a sample .cbz [1] in gnome-books 3.21.91 with tracker 1.9-1
> and shared-mime-info 1.7-1 on Ubuntu GNOME 16.10 Beta. But instead I get
> this error:
> 
> Oops! Unable to load "Adekab-v01c01"
> File type Zip archive (application/zip) is not supported.

The mime-type is application/vnd.comicbook+zip. See:
https://bugzilla.gnome.org/show_bug.cgi?id=770904
Comment 2 Jeremy Bicha 2016-09-08 23:45:52 UTC
tracker no longer has this line (and related lines) for the file:

'rdf:type' = 'http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#EBook'

I'm commenting here since I don't know whether that needs to be fixed in shared-mime-info or in tracker.
Comment 3 Bastien Nocera 2016-09-09 08:56:49 UTC
(In reply to Jeremy Bicha from comment #2)
> tracker no longer has this line (and related lines) for the file:
> 
> 'rdf:type' = 'http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#EBook'
> 
> I'm commenting here since I don't know whether that needs to be fixed in
> shared-mime-info or in tracker.

Looks like tracker doesn't use aliases.

The mime-type changed from application/x-cbz to application/vnd.comicbook+zip, but the alias application/x-cbz was added to keep the backwards compatibility. Tracker doesn't seem to use the aliases.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.