Skip to content

Commit

Permalink
Add zimit noMobileDevice setting
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit74 committed Jul 1, 2024
1 parent 5471ada commit 4512f5d
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions dispatcher/backend/src/common/schemas/offliners/zimit.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
from marshmallow import fields, validate

from common.schemas import SerializableSchema, String, StringEnum
from common.schemas.fields import (
validate_output,
validate_zim_description,
validate_zim_filename,
)
from marshmallow import fields, validate

# https://github.com/puppeteer/puppeteer/blob/main/src/common/DeviceDescriptors.ts
# https://github.com/puppeteer/puppeteer/blob/
Expand Down Expand Up @@ -334,6 +333,18 @@ class Meta:
validate=validate_devicelist,
)

no_mobile_device = fields.Boolean(
truthy=[True],
falsy=[False],
metadata={
"label": "No device",
"description": "Do not emulate a device (use at your own risk, behavior is "
"uncertain ; if set, 'As device' setting is ignored)",
},
data_key="noMobileDevice",
required=False,
)

user_agent = String(
metadata={
"label": "User Agent",
Expand Down

0 comments on commit 4512f5d

Please sign in to comment.