Scrolling content container instead of whole page. Improved title source in XEmpire scraper. Fixed scene page breaking when no photos are available.

This commit is contained in:
ThePendulum 2019-09-25 01:38:06 +02:00
parent 52aff6d20c
commit 05263a97ea
5 changed files with 26 additions and 3 deletions

View File

@ -18,8 +18,9 @@ Do not modify `config/default.js`, but instead create a copy at `config/local.js
### Options ### Options
`npm start -- --option value` `npm start -- --option value`
To run the web server, run `npm start` without any arguments. Running `npm start` without any arguments will run the web server.
* `--fetch`: Fetch updates instead of running the webserver. Without further arguments, it will use the networks and sites defined in the configuration file.
* `--site [site ID]`: Fetch updates from a specific site. The site ID is typically the site name in lowercase and without cases or special characters. For example, Teens Like It Big is teenslikeitbig. * `--site [site ID]`: Fetch updates from a specific site. The site ID is typically the site name in lowercase and without cases or special characters. For example, Teens Like It Big is teenslikeitbig.
* `--network [network ID]`: Fetch updates from all sites of a specific network. The network ID is composed similarly to the site ID. * `--network [network ID]`: Fetch updates from all sites of a specific network. The network ID is composed similarly to the site ID.
* `--after "[time]"`: Do not fetch scenes older than this. Example values are: `"1 month"`, `"2 weeks"`, `"3 years"`. * `--after "[time]"`: Do not fetch scenes older than this. Example values are: `"1 month"`, `"2 weeks"`, `"3 years"`.

View File

@ -19,6 +19,18 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.container {
height: 100%;
display: flex;
flex-direction: column;
overflow: hidden;
}
.content {
flex-grow: 1;
overflow-y: auto;
}
.content-inner { .content-inner {
padding: 1rem; padding: 1rem;
} }

View File

@ -90,7 +90,7 @@ function scrollBanner(event) {
} }
function photos() { function photos() {
if (this.release) { if (this.release && this.release.photos.length) {
if (this.release.photos[0].role === 'poster') { if (this.release.photos[0].role === 'poster') {
return this.release.photos.slice(1); return this.release.photos.slice(1);
} }

View File

@ -177,6 +177,16 @@ body {
margin: 0; margin: 0;
} }
.container[data-v-4f86a868] {
height: 100%;
display: flex;
flex-direction: column;
overflow: hidden;
}
.content[data-v-4f86a868] {
flex-grow: 1;
overflow-y: auto;
}
.content-inner[data-v-4f86a868] { .content-inner[data-v-4f86a868] {
padding: 1rem; padding: 1rem;
} }

View File

@ -53,7 +53,7 @@ async function scrapeScene(html, url, site) {
const data = JSON.parse(json)[0]; const data = JSON.parse(json)[0];
const entryId = new URL(url).pathname.split('/').slice(-1)[0]; const entryId = new URL(url).pathname.split('/').slice(-1)[0];
const title = data.isPartOf.name; const title = $('meta[name="twitter:title"]').attr('content');
const date = moment.utc(data.dateCreated, 'YYYY-MM-DD').toDate(); const date = moment.utc(data.dateCreated, 'YYYY-MM-DD').toDate();
const actors = data.actor const actors = data.actor