MTDb - Ultimate Movie&TV Database

MTDb - Ultimate Movie&TV Database v3.2.4 - Patch Update

No permission to download

Aten90

New member
Oct 22, 2020
3
0
1
Found it. In the main.js file search for this.url.generate(this.mediaItem) before it just add '/' + and it will work.
JavaScript:
//change
shareUsing(o){const d=this.settings.getBaseUrl()+this.url.generate(this.mediaItem).replace(/^\//,"");if("mail"===o)
//to
shareUsing(o){const d=this.settings.getBaseUrl()+'/'+this.url.generate(this.mediaItem).replace(/^\//,"");if("mail"===o)
Or replace with fix file
hi this code not working
 

Aten90

New member
Oct 22, 2020
3
0
1
hi can someone help with this, when I go to edit role I can't find comments to let users comment.
is that in only in my copy
 

abel

New member
Jun 9, 2020
7
2
3
I am getting this error

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-1-App\User' for key 'permissionable_unique' (SQL: insert into `permissionables` (`permission_id`, `permissionable_id`, `permissionable_type`) values (1, 1, App\User))
 

falar

New member
May 10, 2022
4
1
3
hi bro...
how to fix .htaccess could not find error on niginx vps
 

Attachments

  • 9fbc916f-dc3e-4002-9c67-7ef9c55f2779.png
    9fbc916f-dc3e-4002-9c67-7ef9c55f2779.png
    16 KB · Views: 7

lostkid

Active member
Mar 18, 2021
131
54
28
25
hi bro...
how to fix .htaccess could not find error on niginx vps
rename example.htaccess to .htaccess

also ensure your directory has the correct permissions by running sudo chmod -R 777 directory/with/website/files

also ensure that overwrite is enabled in your nginx config file. Not sure how to go about this in nginx, i recommend using apache2 instead of nginx
 
Last edited:
  • Like
Reactions: falar

sheeper

New member
Feb 15, 2021
5
3
3
On hostinger cronjob code is rejected because of invalid characters, is there any other code to apply it? (custom is also rejected) cron.png
 

lostkid

Active member
Mar 18, 2021
131
54
28
25
On hostinger cronjob code is rejected because of invalid characters, is there any other code to apply it? (custom is also rejected) cron.png
Create a bash file with name script.sh in your website directory with
Bash:
#!/bin/sh
/usr/bin/php home/u794262590/public_html/artisan schedule:run >> /dev/null 2>&1

Then set type to custom and reference the bash script in command to run
 

sheeper

New member
Feb 15, 2021
5
3
3
Create a bash file with name script.sh in your website directory with
Bash:
#!/bin/sh
/usr/bin/php home/u794262590/public_html/artisan schedule:run >> /dev/null 2>&1

Then set type to custom and reference the bash script in command to run
Thanks I'll try now.
 

falar

New member
May 10, 2022
4
1
3
rename example.htaccess to .htaccess

also ensure your directory has the correct permissions by running sudo chmod -R 777 directory/with/website/files

also ensure that overwrite is enabled in your nginx config file. Not sure how to go about this in nginx, i recommend using apache2 instead of nginx
thanks bro..
 

Bubabulyt

Active member
Trusted Uploader
Jun 30, 2020
185
179
43
Russian
Hi tell me how to solve the problem with adding people, when I add an actor, the site gives an error. -> Undefined index: cast
 

alizka72

New member
Nov 1, 2020
1
0
1
I want to put a website link to the movie datasheet. Which file do I need to edit to make this link appear on all movie datasheets?
 

Insession

Member
May 27, 2022
107
18
18
Hello fellas, just wondering if any of you guys is getting organic traffic with MTDb because my site have not receive visitors none after 2 weeks.
 

Insession

Member
May 27, 2022
107
18
18
Hello community, just wondering if someone has problems with movies or some TV series like "Sons of Anarchy" there's no trailer and no cast? If so, any way to fix it?
 

lostkid

Active member
Mar 18, 2021
131
54
28
25
Hello community, just wondering if someone has problems with movies or some TV series like "Sons of Anarchy" there's no trailer and no cast? If so, any way to fix it?
Hi try again, I teste on 3.2.4 and worked. Edit file person.php

PHP:
<?php

namespace App;

use App\Services\Data\Contracts\DataProvider;
use App\Services\Data\Local\LocalDataProvider;
use App\Services\Data\Tmdb\TmdbApi;
use Carbon\Carbon;
use Common\Search\Searchable;
use Common\Settings\Settings;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Support\Arr;
use Illuminate\Support\Collection;

/**
 * @property boolean $allow_update;
 * @property boolean $fully_synced;
 * @property integer $tmdb_id;
 * @property Carbon $updated_at;
 * @property-read Collection|Title[] $credits;
 * @property string known_for
 * @property string description
 * @method static Person findOrFail($id, $columns = ['*'])
 */
class Person extends Model
{
    use Searchable;

    const MODEL_TYPE = 'person';

    protected $guarded = ['id', 'relation_data', 'model_type'];
    protected $appends = ['model_type'];

    protected $casts = [
        'id' => 'integer',
        'tmdb_id' => 'integer',
        'allow_update' => 'boolean',
        'fully_synced' => 'boolean',
        'adult' => 'boolean',
    ];

    /**
     * @param Collection $people
     * @param string $uniqueKey
     * @return Collection
     */
    public function insertOrRetrieve(Collection $people, $uniqueKey)
    {
        $people = $people->map(function ($value) {
            unset($value['relation_data']);
            unset($value['model_type']);
            unset($value['id']);
            $value['known_for'] = isset($value['known_for']) ? $value['known_for'] : '';
            $value['popularity'] = isset($value['popularity']) ? $value['popularity'] : '';
            return $value;
        });

        $existing = $this->whereIn($uniqueKey, $people->pluck($uniqueKey))
            ->get()
            ->mapWithKeys(function ($person) use ($uniqueKey) {
                return [$person[$uniqueKey] => $person];
            });

        $new = $people->filter(function ($person) use ($existing, $uniqueKey) {
            return !isset($existing[$person[$uniqueKey]]);
        });

        if ($new->isNotEmpty()) {
            $new->transform(function ($person) {
                $person['created_at'] = Arr::get(
                    $person,
                    'created_at',
                    Carbon::now(),
                );
                return $person;
            });
            $this->insert($new->toArray());
            return $this->whereIn(
                $uniqueKey,
                $people->pluck($uniqueKey),
            )->get();
        } else {
            return $existing;
        }
    }

    public function needsUpdating($forceAutomation = false)
    {
        // auto update disabled in settings
        if (
            !$forceAutomation &&
            app(Settings::class)->get('content.people_provider') ===
                Title::LOCAL_PROVIDER
        ) {
            return false;
        }

        // person was never synced from external site
        if (!$this->exists || ($this->allow_update && !$this->fully_synced)) {
            return true;
        }

        // sync every week
        return $this->allow_update &&
            $this->updated_at->lessThan(Carbon::now()->subWeek());
    }

    public static function getModelTypeAttribute(): string
    {
        return self::MODEL_TYPE;
    }

    /**
     * @return BelongsToMany
     */
    public function credits()
    {
        return $this->morphedByMany(Title::class, 'creditable')
            ->select(
                'titles.id',
                'is_series',
                'poster',
                'backdrop',
                'popularity',
                'name',
                'year',
            )
            ->withPivot(['id', 'job', 'department', 'order', 'character'])
            ->orderBy('titles.year', 'desc')
            ->where('titles.adult', 0);
    }

    public function popularCredits(): BelongsToMany
    {
        return $this->morphedByMany(Title::class, 'creditable')
            ->select('titles.id', 'is_series', 'name', 'year')
            ->orderBy('titles.popularity', 'desc')
            ->where('titles.adult', 0);
    }

    /**
     * @param int|null $tileId
     * @return BelongsToMany
     */
    public function episodeCredits($tileId = null)
    {
        $query = $this->morphedByMany(Episode::class, 'creditable');
        if ($tileId) {
            $query->where('episodes.title_id', $tileId);
        }
        $query
            ->select(
                'episodes.id',
                'episodes.title_id',
                'name',
                'year',
                'season_number',
                'episode_number',
            )
            ->withPivot(['job', 'department', 'order', 'character'])
            ->orderBy('episodes.season_number', 'desc')
            ->orderBy('episodes.episode_number', 'desc');
        return $query;
    }

    /**
     * @param int|null $tileId
     * @return BelongsToMany
     */
    public function seasonCredits($tileId = null)
    {
        $query = $this->morphedByMany(Season::class, 'creditable');
        if ($tileId) {
            $query->where('seasons.title_id', $tileId);
        }
        $query
            ->select('seasons.id', 'seasons.title_id')
            ->withPivot(['job', 'department', 'order', 'character'])
            ->orderBy('seasons.number', 'desc');
        return $query;
    }

    /**
     * @return DataProvider
     */
    public static function dataProvider()
    {
        if (
            app(Settings::class)->get('content.people_provider') !==
            Title::LOCAL_PROVIDER
        ) {
            return app(TmdbApi::class);
        } else {
            return app(LocalDataProvider::class);
        }
    }

    public function toSearchableArray(): array
    {
        return [
            'id' => $this->id,
            'name' => $this->name,
            'created_at' => $this->created_at->timestamp ?? '_null',
            'updated_at' => $this->updated_at->timestamp ?? '_null',
        ];
    }

    public static function filterableFields(): array
    {
        return ['id', 'created_at', 'updated_at'];
    }

    public function toNormalizedArray(): array
    {
        return [
            'id' => $this->id,
            'name' => $this->name,
            'image' => $this->poster,
            'model_type' => self::MODEL_TYPE,
        ];
    }
}
apply this fix then delete and re import the movie
 
  • Like
Reactions: Insession

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu