Skip to content

Commit

Permalink
Merge branch 'release-next'
Browse files Browse the repository at this point in the history
  • Loading branch information
theMK2k committed Jun 29, 2023
2 parents 0f6f3c4 + ceb2d9f commit 3941b5d
Show file tree
Hide file tree
Showing 24 changed files with 393 additions and 136 deletions.
15 changes: 15 additions & 0 deletions DONE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# DONE

## v1.2.2

- [x] #rip-rating-demographics (see <https://www.imdb.com/title/tt4154796/ratings>)

- [x] remove rating demographics (also: don't utilize chosen default demographic)
- [x] remove tests (watchdog, in-ui)
- [x] remove during scrape
- [x] remove on-click dialog in MediaList
- [x] test with scan

- [x] imdb scraper: v3 plotkeywords
- [x] imdb scraper: v3 locations

- [x] Settings: sort list of source paths by name

## v1.2.0

- [x] WIN: update VLC, mediainfo-cli
Expand Down
7 changes: 5 additions & 2 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# TODO

## NEXT Minor (current v1.2.0)
## NEXT Minor (current v1.2.2)

- nothing
- edit movie: define audio / subtitle languages

### Defects

Expand All @@ -14,9 +14,12 @@

## LATER

- [ ] new filter: min. IMDB votes
- [ ] "IMDB score comparison game" (in context of the current list?)
- [ ] curl/wget easylist.txt automatically before build <https://easylist.to/easylist/easylist.txt>
- [ ] later: properly differentiate V1, V2 and V3 mainPageData handling
- [ ] later: async db funcs (initDb, syncSqlite)
- [ ] add "play random media" functionality to the List Actions menu

### Plugin System

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 4 additions & 0 deletions data/devdocs/imdb-scraper/imdb-scraper.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ The V1 imdb dumps were creted on 2020-12-12. The dump filenames do not contain a
## V2 (2021-06-08)

The V2 imdb dumps were created on 2021-06-08. The dump filenames contain a `-v2` suffix.

## V3 (2022-2023)

The V3 imdb dumps show that IMDB are now piece-by-piece switching over to a graphql API.
18 changes: 9 additions & 9 deletions docs/10-Release-Preparation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ This document describes the steps necessary to get a new release done.

## Precondition

- [x] we are on release branch `release-next` or `release-x.y.z`
- [x] Increase Version Number in [../package.json](../package.json)
- [x] create `public/history/version-x.y.z.md` from info in [../DONE.md](../DONE.md)
- [x] Update history.json (create new entry on top of the others in the array)
- [x] Test using `npm start` - it should show the new version incl. history
- [ ] we are on release branch `release-next` or `release-x.y.z`
- [ ] Increase Version Number in [../package.json](../package.json)
- [ ] create `public/history/version-x.y.z.md` from info in [../DONE.md](../DONE.md)
- [ ] Update history.json (create new entry on top of the others in the array)
- [ ] Test using `npm start` - it should show the new version incl. history
- [ ] git push

## Build Packs
Expand All @@ -19,7 +19,7 @@ This document describes the steps necessary to get a new release done.

```bash
git pull
git checkout release-x.y.z
git checkout release-next
npm i
./build-win.sh
```
Expand All @@ -32,7 +32,7 @@ find properly named `*-portable.zip` and `*-setup.exe` in `RELEASE` directory

```bash
git pull
git checkout release-x.y.z
git checkout release-next
npm i
./build-linux.sh
```
Expand All @@ -46,7 +46,7 @@ npm i
```bash
export APPLE_ID=%APPLE_ID%
export APPLE_ID_PASSWORD=%APPLE_ID_PASSWORD%
git checkout release-x.y.z
git checkout release-next
git pull
npm i
./build-mac.sh
Expand All @@ -73,4 +73,4 @@ npm i

## FINALLY

- [ ] merge `release-x.y.z` branch into master (this makes history.json public)
- [ ] merge `release-next` branch into master (this makes history.json public)
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "media-hoarder",
"version": "1.2.1",
"version": "1.2.2",
"private": true,
"description": "Media Hoarder - THE media frontend for data hoarders and movie lovers",
"author": "mk2k <[email protected]> (https://media.hoarder.software)",
Expand Down
7 changes: 7 additions & 0 deletions public/history/history.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
[
{
"version": "1.2.2",
"name": "SAL 9000",
"quote": "SAL 9000: \"Will I dream?\" Dr. Chandra: \"Of course you will. All intelligent beings dream. Nobody knows why. Perhaps you will dream of HAL... just as I often do.\"",
"quoteSource": "2010: The Year We Make Contact (1984)",
"description": "version-1.2.2.md"
},
{
"version": "1.2.1",
"name": "SAL 9000",
Expand Down
2 changes: 1 addition & 1 deletion public/history/version-1.2.1.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Media Hoarder v1.2.0 + v1.2.1 Changelog
# Media Hoarder v1.2.0 - v1.2.1 Changelog

## Improved: AI Recommendations powered by ChatGPT

Expand Down
51 changes: 51 additions & 0 deletions public/history/version-1.2.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Media Hoarder v1.2.0 - v1.2.2 Changelog

## Improved: AI Recommendations powered by ChatGPT

The integration of ChatGPT has been significantly improved. The dependency on IMDB IDs has been removed, so that you can ask the AI for lists of movies where the name and year suffices.

Examples:

- _Provide a list of christmas themed action movies_
- _Provide a list of mind bending movies_
- _Provide a list of Oscar winning best motion picture between 2000 and 2010_
- _Provide a list of classic Sci-Fi movies that were not made by Hollywood_

**Note (v1.2.1)**: in v1.2.0 we relied on a release year being returned by ChatGPT, which is not always the case. So our ChatGPT parser has been updated to also try finding movies without a given release year.

## IMDB Scraper updated

A larger overhaul of how **Media Hoarder** scrapes IMDB metadata was necessary and has been implemented.

**Since v1.2.2**:

- IMDB Plot Keywords updated
- IMDB Filming Locations updated

Unfortunately IMDB axed the rating demographics which provided ratings and number of votes for:

- genders
- US/non-US
- age ranges

At least the ratings by age ranges were quite helpful in order to find out if a movie targets a more mature demographic.

But, oh well, now they are gone and **Media Hoarder** had to remove that feature. We'll keep an eye out if the rating demographics return in a similar fashion.

## List Actions

Perform actions on the current list (filtered and sorted as is).

Access the list actions menu on the top right of the screen.

Currently the available actions involve:

- rescan of IMDB metadata
- **(v1.2.2)** copy info - _copies informations about the complete filtered and sorted list including your rating, title and imdb link_

## Other Improvements and Fixes

- the embedded trailer player has been improved, it doesn't load the imdb.com site's complete frame but directly plays the video
- Windows: distribution of VLC and MediaInfo CLI upated to their latest versions (VLC: 3.0.18, MediaInfo: v22.12)
- **(v1.2.2)** enhanced IMDB scraper checks
- **(v1.2.2)** Settings - Movies: source paths are now ordered by their given name
49 changes: 32 additions & 17 deletions src/components/MediaList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@
</template>
{{ $t("scan already in progress") }}
</v-tooltip>
<v-list-item v-on:click="copyInfo(itemsFiltered)">
{{ $t("Copy Info") }}
</v-list-item>
</v-list>
</v-menu>
</div>
Expand Down Expand Up @@ -389,7 +392,11 @@
v-if="item.IMDB_rating_defaultDisplay"
>
<v-icon small color="amber" style="padding-bottom: 4px">mdi-star</v-icon>
<a class="headline mb-2 mk-clickable" v-on:click.stop="onShowRatingDemographicsDialog(item)">{{ item.IMDB_rating_defaultDisplay }}</a>
<!--
#rip-rating-demographics
<a class="headline mb-2 mk-clickable" v-on:click.stop="onShowRatingDemographicsDialog(item)">{{ item.IMDB_rating_defaultDisplay }}</a>
-->
<span class="headline mb-2">{{ item.IMDB_rating_defaultDisplay }}</span>
<span
v-if="item.IMDB_metacriticScore"
v-bind:class="helpers.getMetaCriticClass(item.IMDB_metacriticScore)"
Expand Down Expand Up @@ -841,7 +848,7 @@
</div>

<v-row style="margin-top: 16px">
<v-btn text color="primary" v-on:click.stop="copyInfo(item)">{{ $t("Copy Info") }}</v-btn>
<v-btn text color="primary" v-on:click.stop="copyInfo([item])">{{ $t("Copy Info") }}</v-btn>
<v-btn v-if="item.IMDB_Trailer_URL" text color="primary" v-on:click.stop="showTrailerLocal(item)">{{ $t("Trailer") }}</v-btn>
<v-btn text v-bind:disabled="!item.IMDB_tconst" color="primary" v-on:click.stop="openIMDB(item)">
<v-icon small>mdi-web</v-icon>&nbsp;IMDB
Expand Down Expand Up @@ -1608,30 +1615,36 @@ export default {
});
},
copyInfo(movie) {
copyInfo(movies) {
const el = document.createElement("textarea");
let info = "";
if (movie.Rating) {
info += helpers.getStarRatingString(movie.Rating);
info += " ";
}
for (const movie of movies) {
if (info) {
info += "\n\n";
}
info += movie.Name;
if (movie.Rating) {
info += helpers.getStarRatingString(movie.Rating);
info += " ";
}
if (movie.startYear) {
info += ` (${movie.startYear}`;
info += movie.Name;
if (movie.endYear) {
info += `-${movie.endYear}`;
}
if (movie.startYear) {
info += ` (${movie.startYear}`;
info += ")";
}
if (movie.endYear) {
info += `-${movie.endYear}`;
}
info += ")";
}
if (movie.IMDB_tconst) {
info += `\nhttps://www.imdb.com/title/${movie.IMDB_tconst}`;
if (movie.IMDB_tconst) {
info += `\nhttps://www.imdb.com/title/${movie.IMDB_tconst}`;
}
}
el.value = info;
Expand Down Expand Up @@ -2598,6 +2611,8 @@ export default {
// TODO: properly handle array for the rescan (total time etc.)
this.onRescanItems(this.items);
},
async onListActionCopyInfo() {},
},
// ### LifeCycle Hooks ###
Expand Down
58 changes: 35 additions & 23 deletions src/components/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,26 +69,34 @@
<v-text-field type="number" v-bind:label="$t('Last Access Grace Period')" v-model="minimumWaitForSetAccess" style="margin-left: 16px"></v-text-field>
</v-row>

<v-row class="settings-row">
<h3>{{ $t("IMDB Rating Demographic") }}</h3>

<v-card-text class="mk-light-grey">{{
$t(
"{appName} provides the IMDB score and number of votes for each medium (where applicable)_ By default these are the numbers of all IMDB users_ You can, however, decide if you wish to see those of a certain demographic, e_g_ by gender or age_",
{ appName: $shared.appName }
)
}}</v-card-text>

<v-select
class="mk-v-select-dynamic-width"
v-bind:label="$t('IMDB Rating Demographic')"
item-text="long_translated"
item-value="code"
v-model="$shared.imdbRatingDemographic"
v-bind:items="$shared.imdbRatingDemographics"
style="margin-left: 16px"
></v-select>
</v-row>
<!--
#rip-rating-demographics
since v1.3.0 we unfortunately have to disable this feature as imdb.com doesn't offer the rating demographics by gender, US/non-US and age anymore
we keep the source commented-out however, if at some point in the future imdb.com decides to bring this feature back (find all occurences of #rip-rating-demographics in the code)
-->
<!--
<v-row class="settings-row">
<h3>{{ $t("IMDB Rating Demographic") }}</h3>
<v-card-text class="mk-light-grey">{{
$t(
"{appName} provides the IMDB score and number of votes for each medium (where applicable)_ By default these are the numbers of all IMDB users_ You can, however, decide if you wish to see those of a certain demographic, e_g_ by gender or age_",
{ appName: $shared.appName }
)
}}</v-card-text>
<v-select
class="mk-v-select-dynamic-width"
v-bind:label="$t('IMDB Rating Demographic')"
item-text="long_translated"
item-value="code"
v-model="$shared.imdbRatingDemographic"
v-bind:items="$shared.imdbRatingDemographics"
style="margin-left: 16px"
></v-select>
</v-row>
-->

<v-row class="settings-row">
<h3>{{ $t("Log Level") }}</h3>
Expand Down Expand Up @@ -834,9 +842,13 @@ export default {
},
moviesSourcePaths() {
return this.sourcePaths.filter((sourcePath) => {
return sourcePath.MediaType === "movies";
});
return this.sourcePaths
.filter((sourcePath) => {
return sourcePath.MediaType === "movies";
})
.sort((a, b) => {
return helpers.compare(a.Description, b.Description, false);
});
},
imdbRatingDemographic() {
Expand Down
15 changes: 11 additions & 4 deletions src/components/shared/CheckIMDBScraperDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,19 @@ export default {
async runChecks() {
this.isRunning = true;
for (let i = 0; i < this.imdbScraperChecksFiltered.length; i++) {
const check = this.imdbScraperChecksFiltered[i];
// for (let i = 0; i < this.imdbScraperChecksFiltered.length; i++) {
for (const check of this.imdbScraperChecksFiltered) {
check.isRunning = true;
check.result = await check.checkFunction();
let result = null;
for (const checkFunction of check.checkFunctions) {
result = await checkFunction();
if (result.status !== imdbScraperTests.status.SUCCESS) {
break;
}
}
check.result = result;
logger.log("[runChecks] check result:", check.result);
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function uppercaseEachWord(input) {
for (let i = 0; i < text.length; i++) {
if (/[\s\-,.:"!§$%&/()=?*+~#;_]/.test(text[i])) {
isNewBeginning = true;
logger.log(`[uppercaseEachWord] new beginning: "${text[i]}"`);
// logger.log(`[uppercaseEachWord] new beginning: "${text[i]}"`);
} else {
if (isNewBeginning) {
text = text.substr(0, i) + text[i].toUpperCase() + text.substr(i + 1);
Expand Down
Loading

0 comments on commit 3941b5d

Please sign in to comment.