Skip to content

Commit

Permalink
Merge pull request #90 from lacymorrow/ai
Browse files Browse the repository at this point in the history
Ai
  • Loading branch information
lacymorrow authored Sep 15, 2024
2 parents 4292e10 + c188dd9 commit f1324ec
Show file tree
Hide file tree
Showing 38 changed files with 18,605 additions and 21,629 deletions.
63 changes: 63 additions & 0 deletions .erb/configs/webpack.config.main.dev.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/**
* Webpack config for development electron main process
*/

import path from 'path';
import webpack from 'webpack';
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
import { merge } from 'webpack-merge';
import checkNodeEnv from '../scripts/check-node-env';
import baseConfig from './webpack.config.base';
import webpackPaths from './webpack.paths';

// When an ESLint server is running, we can't set the NODE_ENV so we'll check if it's
// at the dev webpack config is not accidentally run in a production environment
if (process.env.NODE_ENV === 'production') {
checkNodeEnv('development');
}

const configuration: webpack.Configuration = {
devtool: 'inline-source-map',

mode: 'development',

target: 'electron-main',

entry: {
main: path.join(webpackPaths.srcMainPath, 'main.ts'),
preload: path.join(webpackPaths.srcMainPath, 'preload.ts'),
},

output: {
path: webpackPaths.dllPath,
filename: '[name].bundle.dev.js',
library: {
type: 'umd',
},
},

plugins: [
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
new BundleAnalyzerPlugin({
analyzerMode: process.env.ANALYZE === 'true' ? 'server' : 'disabled',
analyzerPort: 8888,
}),

new webpack.DefinePlugin({
'process.type': '"browser"',
}),
],

/**
* Disables webpack processing of __dirname and __filename.
* If you run the bundle in node.js it falls back to these values of node.js.
* https://github.com/webpack/webpack/issues/2010
*/
node: {
__dirname: false,
__filename: false,
},
};

export default merge(baseConfig, configuration);
32 changes: 18 additions & 14 deletions .erb/configs/webpack.paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ const path = require('path');

const rootPath = path.join(__dirname, '../..');

const erbPath = path.join(__dirname, '..');
const erbNodeModulesPath = path.join(erbPath, 'node_modules');

const dllPath = path.join(__dirname, '../dll');

const srcPath = path.join(rootPath, 'src');
Expand All @@ -21,18 +24,19 @@ const distRendererPath = path.join(distPath, 'renderer');
const buildPath = path.join(releasePath, 'build');

export default {
rootPath,
dllPath,
srcPath,
srcMainPath,
srcRendererPath,
releasePath,
appPath,
appPackagePath,
appNodeModulesPath,
srcNodeModulesPath,
distPath,
distMainPath,
distRendererPath,
buildPath,
rootPath,
erbNodeModulesPath,
dllPath,
srcPath,
srcMainPath,
srcRendererPath,
releasePath,
appPath,
appPackagePath,
appNodeModulesPath,
srcNodeModulesPath,
distPath,
distMainPath,
distRendererPath,
buildPath,
};
14 changes: 10 additions & 4 deletions .erb/scripts/link-modules.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
import fs from 'fs';
import webpackPaths from '../configs/webpack.paths';

const { srcNodeModulesPath } = webpackPaths;
const { appNodeModulesPath } = webpackPaths;
const { srcNodeModulesPath, appNodeModulesPath, erbNodeModulesPath } =
webpackPaths;

if (!fs.existsSync(srcNodeModulesPath) && fs.existsSync(appNodeModulesPath)) {
fs.symlinkSync(appNodeModulesPath, srcNodeModulesPath, 'junction');
if (fs.existsSync(appNodeModulesPath)) {
if (!fs.existsSync(srcNodeModulesPath)) {
fs.symlinkSync(appNodeModulesPath, srcNodeModulesPath, 'junction');
}
if (!fs.existsSync(erbNodeModulesPath)) {
fs.symlinkSync(appNodeModulesPath, erbNodeModulesPath, 'junction');
}
}

1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

"javascript.validate.enable": false,
"javascript.format.enable": false,
"typescript.format.enable": false,

"search.exclude": {
".git": true,
Expand Down
141 changes: 87 additions & 54 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,32 @@
Cinematic
===========
>
> 🎥 A gorgeous Desktop UI for your digital movie collection, works on Mac, Windows, and Linux!
# Cinematic 🎥

**Have a digital movie collection?**
A gorgeous Desktop UI for your digital movie collection, powered by Electron and React. Works on Mac, Windows, and Linux!

Cinematic is a desktop app to beautifully organize and automatically retrieve information about your digital movie collection, so you can spend less time searching and more time watching.
<div align="center">

[![Build Status][github-actions-status]][github-actions-url]
[![Github Tag][github-tag-image]][github-tag-url]

</div>

## ✨ Features

- 🎭 Filter movies by genre
- 🚥 Read plotlines and summaries before watching
- 🎬 Watch multiple trailers
- 🥃 Jump straight to the IMDB page
- 🍱 Keep track of recently viewed and watched movies
- 🍅 Cycle through ratings from IMDB, TMDB, and Metacritic
- ☔️ Network throttled requests to avoid timeouts
- 🐠 Built-in caching of genres and movies
- 🖇 Sort movies by name, popularity, release date, runtime, or randomly
- 🌙 Dark Mode support
- 🔄 Auto Updater
- 💾 Built-in Store with electron-store
- 🖱️ Context Menu
- ⌨️ Keyboard Shortcut Manager
- 🀱 Menu Bar for macOS, Windows, and Linux
- 🖥️ System Tray

[![Cinematic Light UI](https://raw.githubusercontent.com/lacymorrow/cinematic/main/public/demo.png)](https://github.com/lacymorrow/cinematic/releases)

Expand All @@ -20,70 +41,82 @@ Cinematic prefers filenames like `Independence Day [1996].mp4` but will happily
<img width="815" height="578" src="https://raw.githubusercontent.com/lacymorrow/cinematic/main/public/cinematic.gif">
</p>

### Features
## 🚀 Getting Started

1. Clone this repository

```bash
git clone https://github.com/lacymorrow/cinematic.git
```

2. Go into the repository

```bash
cd cinematic
```

3. Install dependencies

```bash
yarn
```

4. Start the development server

* 🎭 Filter movies by genre
* 🚥 Read plotlines and summarys before watching
* 🎬 Watch multiple trailers
* 🥃 Jump straight to the IMDB page
* 🍱 Keep track of recently viewed and recently watched
* 🍅 Cycle through ratings from IMDB, TMDB, and Metacritic
* ☔️ Network throttled requests to avoid timeouts
* 🐠 Built-in caching of genres and movies
* 🖇 Sort movies by name, popularity, release date, runtime, or randomly
```bash
yarn start
```

### Information provided
## 📁 Project Structure

* Title
* Plot summary
* Release date
* Multiple trailers
* Poster + backdrop images
* Genres
* Ratings from IMDB, TMDB, and Metacritic, and current popularity
* MPAA rating
* Actors, Director, Writer
* Awards
* Runtime
- `src/main`: Contains the main process code
- `src/renderer`: Contains the renderer process code (React components)
- `src/config`: Contains configuration files
- `src/utils`: Contains utility functions

## Installation
## 📜 Available Scripts

### [Visit the Releases page to download Cinematic for Windows, OSX, and Linux](https://github.com/lacymorrow/cinematic/releases)
- `yarn start`: Start the app in development mode
- `yarn build`: Build the app for production
- `yarn lint`: Run the linter
- `yarn test`: Run tests

[![Cinematic Dark UI](https://raw.githubusercontent.com/lacymorrow/cinematic/main/public/demo-dark.png)](https://github.com/lacymorrow/cinematic/releases)
## Built With

## Design
- [Electron](https://electronjs.org/)
- [React](https://reactjs.org/)
- [React Router](https://reacttraining.com/react-router/)
- [Tailwind CSS](https://tailwindcss.com/)
- [Shadcn](https://ui.shadcn.com/)
- [TypeScript](https://www.typescriptlang.org/)

UI design by [ShadCN](https://ui.shadcn.com)
## Development

> Original interface design by [Steve Hernandez](http://slhernandez.com/2013/09/10/Movie-App/) (No longer used).
### Tailwind CSS

* Built with [Electron](https://electronjs.org/)
* APIs provided by TMDB and OMDB
We use Tailwind CSS for styling. See the [Tailwind CSS docs](https://tailwindcss.com/docs) for more information.

## Road map
Some Tailwind plugins have been added for convenience:

**Update Oct. 27, 2019:** Currently refactoring the codebase to make a clear upgrade path to faster, leaner product.
- [Tailwind Animate](https://github.com/jamiebuilds/tailwindcss-animate)
- [Tailwind Container Queries](https://github.com/tailwindlabs/tailwindcss-container-queries)
- Child selectors to target immediate children like `child:w-xl`
- Group selectors: `group` (Parent) `group-hover:bg-gray-100` (Child)

* [ ] Save images to cache
* [X] A11y - tab index, keyboard controls
* [X] Speed boost
* [X] File open dialog
* [X] Windows Release
### Shadcn

### Need help?
Shadcn is a UI component library for React. See the [Shadcn docs](https://ui.shadcn.com/) for more information.
Use `npx shadcn-ui@latest add accordion ...` to add a component to your project.

Please post any questions or issues you come across to our [issues page](https://github.com/lacymorrow/cinematic/issues).
## 🤝 Contributing

## BuiltWith
Contributions are welcome! Please feel free to submit a Pull Request.

* [Electron](https://electronjs.org/)
* [React](https://reactjs.org/)
* [React Router](https://reacttraining.com/react-router/)
* [Tailwind CSS](https://tailwindcss.com/)
* [Shadcn](https://ui.shadcn.com/)
* [TypeScript](https://www.typescriptlang.org/)
## 📄 License

## License
This project is licensed under the CC-BY-NC-SA 4.0 License.

MIT © [Lacy Morrow](https://github.com/lacymorrow)
[github-actions-status]: https://github.com/lacymorrow/cinematic/workflows/Build/badge.svg
[github-actions-url]: https://github.com/lacymorrow/cinematic/actions
[github-tag-image]: https://img.shields.io/github/tag/lacymorrow/cinematic.svg?label=version
[github-tag-url]: https://github.com/lacymorrow/cinematic/releases/latest
Loading

0 comments on commit f1324ec

Please sign in to comment.