mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
IGN:No need for hostname when generating stanza feed
This commit is contained in:
parent
7931a9d2bd
commit
3aa67005ea
@ -113,7 +113,6 @@ class ConfigDialog(QDialog, Ui_Dialog):
|
||||
self.port.setValue(opts.port)
|
||||
self.username.setText(opts.username)
|
||||
self.password.setText(opts.password if opts.password else '')
|
||||
self.hostname.setText(opts.hostname)
|
||||
self.auto_launch.setChecked(config['autolaunch_server'])
|
||||
|
||||
def up_column(self):
|
||||
@ -219,7 +218,6 @@ class ConfigDialog(QDialog, Ui_Dialog):
|
||||
sc = server_config()
|
||||
sc.set('username', unicode(self.username.text()).strip())
|
||||
sc.set('password', unicode(self.password.text()).strip())
|
||||
sc.set('hostname', unicode(self.hostname.text()).strip())
|
||||
sc.set('port', self.port.value())
|
||||
of = str(self.output_format.currentText())
|
||||
fmts = []
|
||||
|
@ -692,22 +692,29 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_3" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_13" >
|
||||
<property name="text" >
|
||||
<string>If you plan to use the content server to access your ebook collection on an iphone using the stanza reader, you will need to enter either the fully qualified &hostname or the IP address for your computer below. You can then browse your books by adding the URL http://myhostname/stanza as a custom catalog in the stanza reader on your iphone.</string>
|
||||
<string>If you want to use the content server to access your ebook collection on your iphone with Stanza, you will need to add the URL http://myhostname:8080/stanza as a new catalog in the stanza reader on your iphone. Here myhostname should be the fully qualified hostname or the IP address of this computer.</string>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>hostname</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="hostname" />
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer" >
|
||||
<property name="orientation" >
|
||||
|
@ -22,8 +22,6 @@ def server_config(defaults=None):
|
||||
help=_('The server timeout in seconds. Default is %default'))
|
||||
c.add_opt('thread_pool', ['--thread-pool'], default=30,
|
||||
help=_('The max number of worker threads to use. Default is %default'))
|
||||
c.add_opt('hostname', ['--hostname'], default='localhost',
|
||||
help=_('The hostname of the machine the server is running on. Used when generating the stanza feeds. Default is %default'))
|
||||
c.add_opt('password', ['--password'], default=None,
|
||||
help=_('Set a password to restrict access. By default access is unrestricted.'))
|
||||
c.add_opt('username', ['--username'], default='calibre',
|
||||
|
@ -77,9 +77,9 @@ class LibraryServer(object):
|
||||
<id>urn:calibre:${record[FM['id']]}</id>
|
||||
<author><name>${authors}</name></author>
|
||||
<updated>${record[FM['timestamp']].strftime('%Y-%m-%dT%H:%M:%S+00:00')}</updated>
|
||||
<link type="application/epub+zip" href="http://${server}:${port}/get/epub/${record[FM['id']]}" />
|
||||
<link rel="x-stanza-cover-image" type="image/jpeg" href="http://${server}:${port}/get/cover/${record[FM['id']]}" />
|
||||
<link rel="x-stanza-cover-image-thumbnail" type="image/jpeg" href="http://${server}:${port}/get/thumb/${record[FM['id']]}" />
|
||||
<link type="application/epub+zip" href="/get/epub/${record[FM['id']]}" />
|
||||
<link rel="x-stanza-cover-image" type="image/jpeg" href="/get/cover/${record[FM['id']]}" />
|
||||
<link rel="x-stanza-cover-image-thumbnail" type="image/jpeg" href="/get/thumb/${record[FM['id']]}" />
|
||||
<content type="xhtml">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="text-align: center">${Markup(extra)}${record[FM['comments']]}</div>
|
||||
</content>
|
||||
@ -259,7 +259,6 @@ class LibraryServer(object):
|
||||
books.append(self.STANZA_ENTRY.generate(authors=authors,
|
||||
record=record, FM=FIELD_MAP,
|
||||
port=self.opts.port,
|
||||
server=self.opts.hostname,
|
||||
extra = ''.join(extra),
|
||||
).render('xml').decode('utf8'))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user