Adult Script Pro Community Forums

The forum is here for legacy reasons. No new posts will be created. User registration is disabled! If you have any questions, please email us or check https://www.adultscriptpro.com for more details!

You are not logged in.

#1 2012-08-22 15:26:24

ptsguy
Member
Registered: 2012-08-06
Posts: 135

[INPUT NEEDED] mass csv embed

only importing one at a time before quitting...can you please post a fix for this? I am trying to import some embed dumps today..bangbros,oyeachicks and have tried those two and several others and none going past one.

Offline

#2 2012-08-22 16:07:04

ptsguy
Member
Registered: 2012-08-06
Posts: 135

Re: [INPUT NEEDED] mass csv embed

your $counter is not getting incremented for whatever reason...
I do not think that whole block is being executed...going to investigate further, but count is 0...never got incremented

if ($ignore === 1) {
                                        if (!isset($list[$count]['flv']) OR empty($list[$count]['flv']) OR
                                                !isset($list[$count]['title']) OR empty($list[$count]['title'])) {
                                                continue;
                                        }
                                }

                                        if (($method == 'flv' OR $method == 'hotlink') AND !isset($list[$count]['flv'])) {
                                                $error = 'Import method set to FLV Source (or FLV Hotlink) and flv source url not present in the CSV file!';
                                        }

                                        if ($thumb_method == 'generate' && !isset($list[$count]['flv'])) {
                                                $error = 'Thumb method set to Generate and FLV Source URL not present in the CSV file!';
                                        }

                                        if ($method == 'embed' && !isset($list[$count]['embed'])) {
                                                $error = 'Import method set to Embed and embed code not found in the CSV file!';
                                        }

                                        ++$count;
                                }
                        echo $count;
                                if ($error) {
                                $errors[] = $error;
                        }

Offline

#3 2012-08-22 16:23:44

ptsguy
Member
Registered: 2012-08-06
Posts: 135

Re: [INPUT NEEDED] mass csv embed

for whatever reason your count is never incremented so the counter is stuck on 0 and only taking the 0 element of the $row array... for a temp fix I am incrementing count right after you call VArray::combine($ordering,row) and stick that inside of $list[$count]...

I've never been one to debug php code with an actual debugger so I wouldn't know where to start.. i can pick a syntax error from the cli or a 500 error from the apache logs...outside of that, this is a logic error and I'd need a debugger to step through it... I can't see it in putty, i've spent a little time this morning walking through the code and putting echos in.. also I added a check for tags that are seperated with ; instead of , to the get_tags function

 private function get_tags($title, $tags='')
        {
                if ($tags != '') {
                        if(strstr($tags,";"))
                                $tags = str_replace(";",",",$tags);
                        return prepare_tags($tags);
                }

                $title  = preg_replace('/[^A-Za-z0-9 ]+/', ' ', trim($title));
                $title  = preg_replace('/\s\s+/', ' ', $title);
                $tags   = array();
                $array  = explode(' ', $title);
                foreach ($array as $string) {
                        if (strlen($string) >= 4) {
                                $tags[] = $string;
                        }
                }

                return implode(',', $tags);
        }

have fun...its the counter though..

Offline

#4 2012-08-22 16:42:46

ptsguy
Member
Registered: 2012-08-06
Posts: 135

Re: [INPUT NEEDED] mass csv embed

Query: INSERT INTO video_csv_imported SET unique_id = '194bcd426d5b86ef81b01297daad13b7', video_id = 31973
Error Message: Duplicate entry '31973' for key 'video_id'
Error Number: 1062

this gets tossed on dupes...

Offline

#5 2012-08-23 07:05:42

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: [INPUT NEEDED] mass csv embed

I will also debug this.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#6 2012-08-23 11:32:47

ptsguy
Member
Registered: 2012-08-06
Posts: 135

Re: [INPUT NEEDED] mass csv embed

Lemme know if ya get it fixed, could really use a patch for this...

Offline

#7 2012-08-23 15:52:59

ptsguy
Member
Registered: 2012-08-06
Posts: 135

Re: [INPUT NEEDED] mass csv embed

I got rid of that error, probably did it the wrong way, but I truncated the video_csv_imported table... I am bound to have some dupes now I am guessing.

Offline

#8 2012-08-27 13:30:40

RawrPorn
Member
Registered: 2012-08-20
Posts: 1

Re: [INPUT NEEDED] mass csv embed

change:

Query: INSERT INTO video_csv_imported SET unique_id = '194bcd426d5b86ef81b01297daad13b7', video_id = 31973

to

Query: INSERT IGNORE INTO video_csv_imported SET unique_id = '194bcd426d5b86ef81b01297daad13b7', video_id = 31973

itll skip duplicate entries without error. used to use insert ignore when filtering large email lists.

Offline

#9 2012-09-14 05:31:41

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: [INPUT NEEDED] mass csv embed

The video_id should never be a duplicate (its generated for every video when its added, and its auto incrementing, so i dont know how you got to have a duplicate). Please email the CSV so i can also test.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#10 2014-04-02 15:54:20

mmpo
Member
Registered: 2012-01-23
Posts: 240
Website

Re: [INPUT NEEDED] mass csv embed

I have the same problem in 1.0.8 version how i can fix that?

Offline

#11 2014-04-03 05:14:46

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: [INPUT NEEDED] mass csv embed

Use the IGNORE for the mysql query. There shouldnt be any duplicates (for some reason its adding 2 entries for a video, which should never happen). I was not able to reproduce this. If you want you can me the CSV and i can test.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

Board footer

Powered by FluxBB