Author Topic: Problem with some root http path names  (Read 2431 times)

jeangot

  • Guru
  • ****
  • Posts: 233
    • View Profile
Problem with some root http path names
« on: September 03, 2008, 06:18:07 pm »
Hello,

I have the following item in my pluto_media table:

+---------+--------------+-----------------+---------------+--------------+---------------------+------------------------------------------------------------------------------------------------------------+---------------------+---------+-------------+------------------+-----------+---------------------+-----------+---------------------+---------------------+-------+--------+----------+----------------------------------+--------+--------+-----------+----------+------------+---------------------+--------------+
| PK_File | EK_MediaType | FK_MediaSubType | FK_FileFormat | FK_FileGroup | DateAdded           | Path                                                                                                       | Filename            | Missing | IsDirectory | EK_Users_Private | EK_Device | ModificationDate    | AttrCount | AttrDate            | DateLastViewed      | IsNew | Ignore | INode    | MD5                              | Source | psc_id | psc_batch | psc_user | psc_frozen | psc_mod             | psc_restrict |
+---------+--------------+-----------------+---------------+--------------+---------------------+------------------------------------------------------------------------------------------------------------+---------------------+---------+-------------+------------------+-----------+---------------------+-----------+---------------------+---------------------+-------+--------+----------+----------------------------------+--------+--------+-----------+----------+------------+---------------------+--------------+
|  557190 |            4 |            NULL |          NULL |         NULL | 2008-08-28 08:08:56 | http:                                                                                                      | 89.149.208.205:7070 |       0 |           0 |             NULL |      NULL | NULL                |      NULL | NULL                | 2008-08-28 08:12:39 |     1 |      0 |        0 | NULL                             | NULL   |   NULL |      NULL |     NULL |          0 | 2008-08-28 08:12:39 |         NULL |

This is for a valid shoutcast stream. The entry was created for me by the system when I tested this stream in a media scenario through the web admin.
When I try to playback this entry, the logic in LMCE build the full pathname as Path + "/" + Filename which gives http:/89.149.208.205:7070 and that of course won't play.
If I change the Path field in the database to http:/, then LMCE will correctly construct the full path as http://89.149.208.205:7070 and it will play fine, but my entry in the database doesn't last past a reload, probably because something is checking the format of the fields and cleaning them up.

So my thought was to find the place in the code where it concatenates those fields upon playback, and add a condition to have that extra / added for http: or mms: Path that don't go deeper than the root of the webserver.
The only place I found where I could maybe do this was Table_File.cpp, but I know this is not the right place because this is just used to retrieve the data from the database, but the concatenation happens somewhere else, I just couldn't find where.

So my questions are:

- Can anyone point me to the place in the code where upon playback of a media entry, the system concatenates the fields Path and Filename after fetching them?

- Or can someone tell me why my Table_File.cpp won't compile? I get the following error (which I think is unrelated to the changes I made):

/usr/bin/ld: ../db_wrapper/ClientSocket.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
../db_wrapper/ClientSocket.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [libpluto_media.so] Error 1


Once I have this working and tested, I would like to propose to include the change into the source code, unless someone things this would be wrong?

Thanks,

Jean

jeangot

  • Guru
  • ****
  • Posts: 233
    • View Profile
Re: Problem with some root http path names
« Reply #1 on: September 23, 2008, 05:16:21 pm »
Does nobody have any ideas where I should start looking?